User-friendly distributions such Mandrake mean
that Linux is getting ever easier to install, but
problems can still occur We answer all your
installation-related questions, including difficulties
with disk partitioning, boot managers and how to
install extra extra software on your Linux system.
One of the advantages of Linux is its flexibility, but
this often comes at a price. More choice, means
more configuration – and Linux does not always
have user-friendly tools to go the job done quickly.
Look here for answers to your configuration
problems. We also cover question concerning
rebuilding the Linux kernel here.
These days, a computer is at its most useful when
it can access the internet, so not surprisingly
getting your Linux box online will be a priority for
many users. If you are having problems
establishing a dial-up connection with your
modem, or can’t talk to your ALAN via an Ethernet
card then head for this section.
Linux has driver support for a much wider variety
of hardware today, but certain classes of device
can still be a source of difficulty. Do you have an
unruly SCSI controller, have problems with a
removable disk, or can’t get Linux to use your USB
devices? We answer such common hardwarerelated
Linux might be popular as a server platform, but
that doesn’t mean it can’t do multimedia as well.
But are you having troubles make your Linux box
sound the best that it possibly can? See this
section for help and advice on getting your sound
card to work under Linux.
The Linux user has a wealth of options when it
comes to installing a desktop environment, but this
can be a source of many pitfalls too. We solve
those troublesome problems with configuring the
X Window System, graphics cards, monitors and
popular desktop suite.Server
Web serving might be Linux’s killer application, but
that doesn’t mean that its always easy to do. If you
are having problems setting up Apache, installing a
database engine or if you can’t get to grips with
PHR then read this section. We cover file and mail
servers here, too.
Linux is the platform of choice for many
developers because of the quantity and quality of
tools available, but it can be confusing for the
beginner. If you are having problems with Perl or
you can’t build against a shared library, then
consult this section for the answers.
With a robust security model and a built-in
network firewall, many opt for Linux because of its
security features, but just how do you ensure
yourself that your system is safe? We answer
questions such as how to configure a Linux firewall,
and whether you need to worry about viruses.
Categorising problems is always difficult Take a
look at this section for questions that have failed to
fit into the previous sections. This includes
problems with the shell and common shell
commands, tweaking your system’s start-up
behaviour, and mounting foreign filesystems.
If this booklet has whetted your appetite, then get
a regular diet of Linux solutions with a subscription
to our sister publication, Linux Format, the UK’s
biggest newsstand magazine dedicated to Linux.
Not only does it include a regular Q+A section,
you also get all the latest Linux news, reviews
and features.
Drive space
11 am installing Linux on a 8GB hard
| disk, the problem is that Linux only
j sees 1.9GB.
I know that this hard disk is working
because I have tried it in both Windows and
The motherboard does not need upgrading
because it’s new, and it see the rest of my hard
disks (two 40GB). I have tried Red Hat 7.2 and
Mandrake 8.1.1 get the same problem with
both of them.
What can I do to solve this?
Malkit Singh
Wj H The first thing to check is the BIOS, and
f | l s e e what the BIOS thinks the drive is.
f mm 1 Check that the drive geometry matches
up with that of the drive itself, otherwise the BIOS
will tell Linux that the drive is a different size from
what it really is.
If DOS FDISK can ‘see’ the whole drive, then
the distributions you are using may be only offering
you the free space on the drive to partition. Red
Hat and Mandrake use different methods in order
to partition your drives, but they will both allow you
to delete any Windows partitions, then create new
Linux partitions in their place.
No boot
| j | I run a dual boot Win98 and Win2K
system, and want to install Mandrake
v 8.1 on another partition. I have fully
prepared my drive, backed up, and all the
rest, and prepared my disks — at least I
thought I had.
The problem appears to be in writing the
bootable disk. I suspect that the root of the
problem is in the section that asks which
emulation is required e.g. FDD, hard drive, no
emulation (I use Nero 5). Whatever the cause,
I get a disk that starts up, but cannot continue
onto the set-up screen.
Without guidance on this I will not be
able to use any distributions. As I’m probably
not the only person with this kind of
problem, could you please give some
guidelines as to how to convert ISO images
to usable CDs? Are there any mailing lists
or websites that may also be of help with
this sort of problem? Any help at all would
be appreciated.
C. Anne Wilson
m W A s you’ve not given any indication as to
l i | what error you see when you try to boot
I _ * from a CD, it’s difficult to isolate the
problem. Your first option may be to try to write
the CD from a different package, and see if you
experience the same problem. The Eltoritto file on
the CD is almost always a floppy disk image,
identical to a boot floppy. CDs either boot, or they
don’t – there is no emulation, or anything like that
involved. What happens after that is entirely up to
the boot image.
As you’ve already burnt the three CDs, you
could just build a boot floppy which contains
the Linux kernel image required to install the
system, and boot using that. You will find the
image on the Mandrake website, or within the
ISO image when you mount it through the
loopback interface.
As the ISO images that you have used are
exactly the same as those downloaded from the
Mandrake site, so any problems you continue to
have with the images will hopefully be addressed
there. Mandrake has a number of mailing lists for
their users, so you may want to check archives, or
post a message of your own, to see if anyone else
has experienced a similar problem.
More problems
f .#> 1 * h« e a Red Hat Linux 7.0 with most
| | | l i of the rpms upgraded to packages
As».. 4 from Red Hat 72. My kernel is a
2.4.10 compiled from source. In recent months
I have had some problems which I believe my
be connected in some way.
I have had problems with compiling from
source. When I run ./configure in a directory
with a program source, all I get is:
bash: ./configure: bad interpreter: permission
When I write
8 | LINUX | ANSWERSWelcome
Let’s face it: Linux isn’t just for a minority anymore. The free version of
Unix is becoming increasingly popular with users not just for web and
mail serving, but as a general computing platform. The increasing take-up
of Linux has largely been because of the radical improvements in ease-of-use,
as well as the fact the leading Linux distributions such as Mandrake Linux are
now easier to install than Windows.
Linux may be easier to use today, but there are still plenty of pitfalls to trap
the unexperienced user. Part of the solution to such problems is to know the
right place to look for the answers. The smart Linux user will already be aware
of PC Plus’ sister magazine, Linux Format. With its regular Q+A section,
detailed tutorials on all aspects of Linux use, and its authoritative reviews, it is
the definitive source of information for all Linux users.
In the first 25 issues of Linux Format, the Q+A section has provided
answers to 200 of your technical problems. The questions have covered a wide
range of Linux-related topics including installation, networking, hardware
configuration and security issues, and each one has been answered in detail by
one of Linux Format’s experts. We have now compiled these into this unique
and indispensable 146-page guide which will serve as a handy reference for
Linux users of all levels of experience.
If this booklet has interested you in Linux Format, turn to the subscription
section on page 144 to find out how you can get 116-pages of Linux advice
mailed to your doorstep every month.
User-friendly distributions such Mandrake mean
that Linux is getting ever easier to install, but
problems can still occur We answer all your
installation-related questions, including difficulties
with disk partitioning, boot managers and how to
install extra extra software on your Linux system.
One of the advantages of Linux is its flexibility, but
this often comes at a price. More choice, means
more configuration – and Linux does not always
have user-friendly tools to go the job done quickly.
Look here for answers to your configuration
problems. We also cover question concerning
rebuilding the Linux kernel here.
These days, a computer is at its most useful when
it can access the internet, so not surprisingly
getting your Linux box online will be a priority for
many users. If you are having problems
establishing a dial-up connection with your
modem, or can’t talk to your ALAN via an Ethernet
card then head for this section.
Linux has driver support for a much wider variety
of hardware today, but certain classes of device
can still be a source of difficulty. Do you have an
unruly SCSI controller, have problems with a
removable disk, or can’t get Linux to use your USB
devices? We answer such common hardwarerelated
Linux might be popular as a server platform, but
that doesn’t mean it can’t do multimedia as well.
But are you having troubles make your Linux box
sound the best that it possibly can? See this
section for help and advice on getting your sound
card to work under Linux.
The Linux user has a wealth of options when it
comes to installing a desktop environment, but this
can be a source of many pitfalls too. We solve
those troublesome problems with configuring the
X Window System, graphics cards, monitors and
popular desktop suite.
Web serving might be Linux’s killer application, but
that doesn’t mean that its always easy to do. If you
are having problems setting up Apache, installing a
database engine or if you can’t get to grips with
PHR then read this section. We cover file and mail
servers here, too.
Linux is the platform of choice for many
developers because of the quantity and quality of
tools available, but it can be confusing for the
beginner. If you are having problems with Perl or
you can’t build against a shared library, then
consult this section for the answers.
With a robust security model and a built-in
network firewall, many opt for Linux because of its
security features, but just how do you ensure
yourself that your system is safe? We answer
questions such as how to configure a Linux firewall,
and whether you need to worry about viruses.
Categorising problems is always difficult Take a
look at this section for questions that have failed to
fit into the previous sections. This includes
problems with the shell and common shell
commands, tweaking your system’s start-up
behaviour, and mounting foreign filesystems.
If this booklet has whetted your appetite, then get
a regular diet of Linux solutions with a subscription
to our sister publication, Linux Format, the UK’s
biggest newsstand magazine dedicated to Linux.
Not only does it include a regular Q+A section,
you also get all the latest Linux news, reviews
and features.
Drive space 8 Creature feature 14
No boot 8 Installing Linux 15
Problems compiling 8 Missing package 15
Partitioning for dual boot 10 RTF Documentation 16
Losing the source 10 Library frustration 16
Compiling against libGL 10 db what? 17
Alien binary 11 Where’s the CD? 17
Root login shell 11 Wiped out 18
Floppies failure 12 Mandrake to go! 18
Location problems 12 Distro dilemma 19
Mandrake woe IB Selective KDE 19
Total confusion 13 Don’t panic! 19
Bad experience 14 Copy problem 20
e l— « « S ü «
m m
M § m ê
•’ v ï . / J – ‘ i i
Subject page Subject page
Hard drivin’ 20 Boot bother, part 2 25
Linux+Windows 20 Crypt for Linux 25
What’s the difference? 21 Install magic 26
Red Hat Upgrade 21 Distro dilemma 27
CD not booting 21 Putting a square peg
Deb and RPM 21 into a round hole 27
RPMs 22 KDE Problems 28
Debian packages 22 More KDE problems 28
Different class 23 Installing 28
Double drive dilemma 23 Laptops 29
Caffeine fix 24 Mandrake 29
Java: there or not 24
Boot bother, part 1 24
Drive space
11 am installing Linux on a 8GB hard
| disk, the problem is that Linux only
j sees 1.9GB.
I know that this hard disk is working
because I have tried it in both Windows and
The motherboard does not need upgrading
because it’s new, and it see the rest of my hard
disks (two 40GB). I have tried Red Hat 7.2 and
Mandrake 8.1.1 get the same problem with
both of them.
What can I do to solve this?
Malkit Singh
Wj H The first thing to check is the BIOS, and
f | l s e e what the BIOS thinks the drive is.
f mm 1 Check that the drive geometry matches
up with that of the drive itself, otherwise the BIOS
will tell Linux that the drive is a different size from
what it really is.
If DOS FDISK can ‘see’ the whole drive, then
the distributions you are using may be only offering
you the free space on the drive to partition. Red
Hat and Mandrake use different methods in order
to partition your drives, but they will both allow you
to delete any Windows partitions, then create new
Linux partitions in their place.
No boot
| j | I run a dual boot Win98 and Win2K
system, and want to install Mandrake
v 8.1 on another partition. I have fully
prepared my drive, backed up, and all the
rest, and prepared my disks — at least I
thought I had.
The problem appears to be in writing the
bootable disk. I suspect that the root of the
problem is in the section that asks which
emulation is required e.g. FDD, hard drive, no
emulation (I use Nero 5). Whatever the cause,
I get a disk that starts up, but cannot continue
onto the set-up screen.
Without guidance on this I will not be
able to use any distributions. As I’m probably
not the only person with this kind of
problem, could you please give some
guidelines as to how to convert ISO images
to usable CDs? Are there any mailing lists
or websites that may also be of help with
this sort of problem? Any help at all would
be appreciated.
C. Anne Wilson
m W A s you’ve not given any indication as to
l i | what error you see when you try to boot
I _ * from a CD, it’s difficult to isolate the
problem. Your first option may be to try to write
the CD from a different package, and see if you
experience the same problem. The Eltoritto file on
the CD is almost always a floppy disk image,
identical to a boot floppy. CDs either boot, or they
don’t – there is no emulation, or anything like that
involved. What happens after that is entirely up to
the boot image.
As you’ve already burnt the three CDs, you
could just build a boot floppy which contains
the Linux kernel image required to install the
system, and boot using that. You will find the
image on the Mandrake website, or within the
ISO image when you mount it through the
loopback interface.
As the ISO images that you have used are
exactly the same as those downloaded from the
Mandrake site, so any problems you continue to
have with the images will hopefully be addressed
there. Mandrake has a number of mailing lists for
their users, so you may want to check archives, or
post a message of your own, to see if anyone else
has experienced a similar problem.
More problems
f .#> 1 * h« e a Red Hat Linux 7.0 with most
| | | l i of the rpms upgraded to packages
As».. 4 from Red Hat 72. My kernel is a
2.4.10 compiled from source. In recent months
I have had some problems which I believe my
be connected in some way.
I have had problems with compiling from
source. When I run ./configure in a directory
with a program source, all I get is:
bash: ./configure: bad interpreter: permission
When I write
5*8^*»» ©bp
S t s a . ¡ 3
tiietusf ___„_______ …………………………………. ……….. . .. . 3 P ,
1 ■ fast t
4 0 <r> Directory 200 12-16 14 W rwxr-xr-x root root –
oe Dûs
1^1- èLîlntiudi K& Directory
8 0 KB Directory 200
-12-16 14 31
-11-17 10:16
0*xr-xr-x root root
200 11-17 1014
20.0 KB Directory 200 11-17 10 14 iw.i-.r-» root root
*3 j&tmp 1,024 B Directory
4 0 KB Directory
20 a
10-15 09.46
rwxrwxr«« root root /V«r/trt>P
nwr-xr-x root root
•S-SSatMC. 4.0 KB Directory
4.0 KB Directory
10-09 11.14
rwxr-xr-x root root
ivnr-xr-x root root
4.5 KB Directoiv
8.0 KB Directory 200
09-J2 »4-25
00-08 14:42
w « ‘ * ¡¡»«it root
4 0 KB Dliectory 20(1 06-21 17 li rv/xr-xr-x root root
4 0 KB Directory 200 06-13 12-53 rwxr-xr-x root root
e £?!iijsMc
S ÎUroot-BaOt
4.0 K0 Directory
4 0 KB Directory
04-06 21 33
04-06 19 59
Ky.r-.r-» r a t root
¡B g>*ic
É-25 Wonts
4 0 KB Directory
16.0 KB Directory
Û2-1S 16 24
02-05 23 59
rwxrrxr-x root mot
It) 4 o KB Otrtciory
td fcJUÛÛ iiaus-liass 4 o KB O.reoory 200
-02-04 16 35
02 04 16 34 ZTT* Z7, r°Z d
22 ¡terra ■ 0 f ttw-22 O-WHWW»
KDE’s Konqueror
application allows you
to sort files by last
modified time.
sh ..’configure host=i686-grai-tinux
It starts but halts at some point with various
error messages like:
checking whether getpgrp takes no argument.,
configure: error: cannot check pgrp if cross
checking whether setvbuf arguments are
reversed… configure: error: cannot run test
program while cross compiling.
When I try make xconfig in the linux source
directory it halts with this:
gcc -o tkparse tkparse.o tkcond.o tkgeao
cat »
/tkparse < JarttVi386/conflgJn »
/bia sh: ./tkparse: Ikke tilgang
makefl) :” ( Error 126
make(1]: Leaving directory
make: Ixcortfigl Error 2
(Note “Ikke tilgang” is Norwegian and means
“Access denied”)
And lastly: When I run /sbin/depmod I get
this weird message:
®modules/2.4.10/modules.ieee1394map is not
an ELF file
I am sorry if this is just too much, but I really
have no idea and would be very grateful for
any help.
Thank you in advance,
Dag Holland
i f WÊ As configure is failing with bad interpreter,
I i l i t would suggest that whatever is in the
I „ 1 first line of the file is not executable,
usually /bin/bash or /bin/sh. Both need to be
readable and executable, which you can do with;
ctimod 755 bin’fbæh.shî
If scripts cannot run /bin/bash or /bin/sh, then it is
difficult to achieve anything, although one has to
wonder how your machine starts up properly if
that is the case. As you’re running Red Hat, you
can use rpm to verify an RPM installation, so you
can see if anything has changed. For this, you do;
S rpm -V bash
Specifically, you want to look for the ‘IT option,
which suggests that the file permissions have been
changed. You may wish to reinstall the bash
module using RPM, or perform further verification
on other packages.
If it is a permissions problem, then it is probably
best to check I bin, /usr/bin and /usr/local/bln, to see
if any other programs within those directories have
experienced the same changes, and maybe
investigate what the pattern could be.
As for your depmod error, It would appear that
depmod thinks that the map file for the ieee1394
system is actually a module. This suggests that you
do not have the latest release of modutils installed,
which is 2.4.12 at the moment
As the format of the /lib/modules/ ‘uname -v!
directory has changed in the 2.4 kernels, prior
versions of modutils will not handle it correctly,
throwing up errors like what you have experienced.
Partitioning for
dual boot
I am a new Linux user. I need some
help installing Red Hat 7.2 to my
home system, as I wish to produce a
dual boot machine so I can still use Windows.
Will I need to get hard disk partitioning
software such as Partition Magic or does the
Red Hat installation contain an option to do
this? Also can you give me some idea of what
type of extra software you get if you buy a
copy of Red Hat so I can make a decision
before I go ahead and install.
Richard Hardy
W Red Hat wil,8ive you the option to
I F A « Partition your system and setup dual-
F _ * booting, as long as you select the
‘Custom’ installation. If you decide upon the
‘Server’ or ‘Workstation1 installation, it will proceed
to recreate partitions on your drive, removing
anything belonging to Windows while it is doing
its business.
Buying the boxed Red Hat system gives you
very little extra software, but it does give you
technical support from the people at Red Hat. If
you want extra software, and don’t want to
download it from the internet, you can buy Red
Hat Powertools CDs from
Losing the source
W Mk 1 I’m relatively new to Linux (about one
year) and it’s been co-existing with my
Win2000 set-up. Being a keen new
user I like to try software, when I can get it to
work, and end up downloading lots of
interesting things. I am getting confused as to
where to put downloads etc, especially the
.tar.gz and .rpm files. I see a lot in magazines
about using 7usr/src” or something in the
7usr” directory. Coming from a Microsoft
background, I tend to just put stuff in my
home directory and install from there. I get the
impression that this is maybe not the best
thing to do. As ever with Linux, there seems to
be no hard and fast rule regarding this. I just
wondered if you had any thoughts. I like to
keep a tidy machine as far as possible and
would welcome any advice.
Dan Harks
Where you put downloads is not an issue
– It’s what you do with them afterwards.
Packages, such as RPMs, can be installed
from anywhere, then you can either delete the
RPM, or archive it away for reference. You will
probably just download everything into your home
directory, then either install them straight from
there, or put them somewhere else with other
RPMs, then install.
Tarballs can, again, be installed from anywhere.
People sometimes use /usr/src to store source
code, but it really makes little difference at all. As
long as you perform the make install as root,
assuming that you need root access in order to
install the binaries, you can configure and build the
source tree from anywhere you like. Very rarely
does anyone keep source code hanging around, so
you’re not going to end up with a directory
containing everything you’ve built for the last
six months.
Compiling against libGL
I am interested in using SDL and
OpenGL, and I have been trying to get
it to work on my system.
I was using Mandrake Powerpack 8.0 now
I’m on SuSE 7.3 professional (with NVIDIA 3D
drivers installed) but I have the same problem.
When compiling a program (MesaDemos
cube.c) i get a list of undefined reference to
glClean.glutlnit.. etc.
These are in the /usr/indude/GL/gl.h (and
the header is being found) but they are in
the form
GLAPI void GLAPIENTRY glClearl GLbitfield mask
Could this GLAPI have some bearing on it?
Another demo, XFIame, compiles and runs
okay but doesn’t use those commands.
I have tried using the distro packages and
downloading SDL-develop, MesaDemos and
MesaLib rpms and tar files with the same
result. Hope you can help, this is the closest
thing I have found to programming on a PC
which is what I used to do on my old Amiga.
Thanks again,
Raymond flallard
S H lf you get undefinecl references, it
■ generally means that you are not
f — * compiling the program against the
relavent library. Usually when building an
OpenGL/Mesa application, you would include -IGL
and -IGLU in the gcc options, so you will first want
to check that As you’ve been installing rpms and
tarballs of Mesa, it may be that you have multiple
versions of libGL, and the appropriate header files,
installed which can cause a whole load of
problems. You should check /usr/local/lib for ‘libGL’l
and delete anything which exists, and also check
/usr/local/include/GL. Once you have deleted these,
you’ll have to run /sbin/ldconfig as root, then try to
build your programs again.
It’s quite likely that when you are trying to
compile cube.c, the Makefile is not aware of the
location of libGL, so does not include the
appropriate -IGL -IGLU options for gcc. The
MesaDemo’s use a ./configure script to build the
Makefiles, and checking config.log and the output
of Vconfigure will help you to diagnose the
problems which you are having with it not locating
the OpenGL libraries.
XFIame, as I understand it, does not use the
OpenGL system at all, so it has no bearing on your
problem at all.
Alien binary
n I’m running Debian testing/unstable
I and I bought a Lexmark Z13 printer
Da and am having problems getting it
working. It’s a USB printer so I tried to set it
up using a USB guides but this refused to work
(there were no devices listed under
/proc/bus/usb/). So I decided to try the Linux
drivers that Lexmark indicated on its website.
I downloaded these and followed the
directions. Running sh Iexmarkz13-1.0-4.sii
started the installation procedure. It listed the
printer port as/dev/usb/lpO. Clicking next
started the install, but then the following
error appeared:
error: cannot open Packages index using db3 – Mo
such file or directory (2) error: cannot open
Packages database in /var/lib/rpm while executing
“exec rpm -i —test Srpmfilename”
and the rest of the install fails. I think the
problem is that I am not running a RPM-based
distribution. Any idea how I can get round
this problem?
Nick Wilson
Wt H You are quite right. Debian uses dpkg,
1 ^ 1 where as RPil is used on distributions
f ___ 1 such as RedHat and Mandrake. If you are
able to extract the RPM, you can use the alien
program to convert it to a dpkg package, and then
install it You can get alien with;
apt-get Install alien
It is worth noting that Debian ‘testing’ and
‘unstable’ are two different distributions of Debian.
‘testing’ is what will become Debian 3.0, or Woody,
and ‘unstable’ contains unstable packages. If you
have both testing and unstable listed in your
/etc/apt/sources.list, then it will use the packages
from unstable as they will have higher version
numbers, which may be a problem if the packages
do not install properly.
Root login shell
I wonder if you can help me. I’ve
I recently converted to the Linux way
of thinking and installed Mandrake
8.0 onto my computer. The process went
extremely smoothly and all the hardware has
been detected and works fine (apart from the
modem and scanner, but I understand that it’s
quite normal to have this occur). But I have a
small problem.
I have tried to install several different
software packages but, so far, I have been
unable to do so. I understand the process of
installing from “tarballs” (I’ve read the
manuals!), but whenever I try. I’m told that the
file or folder is unable to be created and that
permission is denied.
I know it’s probably a very simple thing
that I’m missing, but any help you give would
be appreciated.
Mark Merryweather.
S s H General|y .when you want to instal1
m A * software, you need to be the ‘root’ user,
I _ ! rather than a regular user. The alternative
is to install software in your home directory, so that
you don’t need to be root to do it, but it’s a lot
simpler to install it system-wide as root.
The easiest way to become the root user is to
use su, which will ask you for the root password,
then you will be given a root prompt. However, this
only changes your UID to root, and it does not
behave as a ‘proper’ root login session. This means
that you have to use the full path to access some
programs, such as ifconfig, Idconfig and route,
which can become annoying. Instead, you can do
su -, which gives you a root login shell.
An alternative is to use sudo, which allows you
to run specific programs as root, as per the
/etc/sudoers configuration file. As this asks for the
user’s password, rather than root’s, it’s somewhat
more secure, plus you can limit what programs a
particular user Is allowed to run as root, so they
don’t have free reign over the entire system.
Floppies failure
Firstly I am very new to Linux. At
present I am running an evaluation of
the Linux platform for the company I
work for and this encompasses the Red Hat
7.1, SuSE 7.2 Pro and Progeny 1.0 distributions.
Where with Red Hat and SuSE I have easily
managed to create the setup floppies (the
machines we are running the evaluation on
won’t boot off a CD) Progeny is a different
matter. From your DVD release we have
burned the two CD’s required but have failed
miserably in creating the Install and Modules
floppies. Rawrite and Rawrite2 crash and the
manual dd routine appears to do nothing.
Assuming the two .¡mg files to be corrupt I
have downloaded new ones from the Progeny
Archive and still get the same results! I am
now working on the assumption that I am a
complete vegetable and must be addressing
the .¡mg files in the wrong way. Any assistance
would be most appreciated.
Dave Suart, via email
Since dd writes the .img files directly to
the floppy disk, it shouldn’t make any
difference if they’re corrupt or not. As
you’ve not said what dd line you are using, it’s
difficult to see if you’re doing it wrong, but the
general way to write something to a floppy disk is
to do:
dd if=bootimg of=/dev/fdO bs=2k
If this still fails, and since rawrite fails too, then the
only other obvious problem is that your drive, or
floppy controller, isn’t working happily, so you may
want to investigate looking at that, or having
someone else build the boot disks for you and
seeing if they work then.
Location problems
I I have used Delphi under Windows,
and was very interested in obtaining a
§ k 4 copy of Kylix. I installed the
application, registered it and constructed a
small test program. All appeared to be okay
until I tried to run the program by itself. By
running from the command line, I got the
following message:
Corrupt floppies can cause
no end of problems but do
not overlook a faulty drive
or controller.
Demon (
works great with Linux,
but there are plenty of
other good ISPs.
“error white loading shared libraries:
cannot load shared object file: no such file or
The installation is in /opt/kylix, and the start
script is in /usr/local/bin. All program files are
kept in a separate directory /spb/kylix/. What’s
the problem? Do I have to make some
reference to the location of the source and the
compiled files within the Kylix program?
D Coulton, via email
I libqtintfso is not a standard QT library, so
I It must come with Kylix. If you do ‘locate
I libqtinf; it will list all the locations where
the shared libraries will be, such as /usr/local/lib.
Once you know which directory it is In, add it to
/etc/, then run ‘Idconfig -v I grep libqtintf’
and It should list the library location. After the
directory has been added to, and
Idconfig executed, Kylix should run quite happily.
Mandrake woe
‘ ^ J l have the following configuration at
i f p home: A Cyrix 300MHz, 128MB
1 ., * PC100 RAM, 4GB Western Digital and
8.7GB Maxtor HDDs, Creative Labs Banshee
with 16MB SGRAM and an ESS Technologies
688 soundcard with a Sony Multiscan 15sf
monitor. I have no problems running various
flavours of Windows and have installed and
run Mandrake 7.0, Corel Linux second edition,
SuSE 7.0 and Caldera Open Linux all as dual
boot with Windows. I can install Mandrake 8.0
with no apparent problems or hiccups, but
when it comes to boot time I can’t get it to go
past the last set of lines after detecting the
hard drives and CD-ROM.
I wonder if it is having a problem with the
memory which is in two lots of 32MB and one
of 64MB because I did manage to get it to run
sort of by reducing the memory to 32MB. I
can’t see anything I have done wrong and the
components are all easily recognised as
testified by the installation of all the other
systems. Any advice?
Derek Logan, via email
| If Mandrake 7.0 and SuSE 7.0 run on the
I f A I I mactl’ne’ ttlen it’s almost certainly a
* _ 1 kernel problem with Mandrake 8.0, which
you can’t really get around. Mandrake patch their
kernels quite a lot, so they’re not really a standard
Linux kernel any more, so it’s somewhat difficult to
actually suggest a neat way around it. If you can
set it up using 32MB of RAM, you may be able to
rebuild a regular Linux kernel on the machine and
try that, or you may just want to stick to SuSE or
an earlier release of Mandrake.
Total confusion
I’ve recently bought a hard disk solely
for Linux Mandrake 7.2.1 don’t
understand the procedure for
partitioning the hard drive. I’ve read the
■ Installation
manual referring to this in total confusion.
Would you kindly advise me on a step to
step approach as to what to do? My system
hard drives are:
C: 1.3GB 5.90GB
D: 4.02GB Allocated For Mandrake
E: .835GB 16.1GB
Herb Spencer, via email
I l f H I Partitioning is split into three parts —
W k « Freein8 UP space used by existing
f «a» 1 partitions, creating partitions and
allocating them mount points. Your ‘D:’ drive
should be deleted, so that you can create a few
Linux partitions in its space. Using the partition
editor in Mandrake, just delete 7dev/hda5;
checking that it is actually 4GB in size.
You can then create some Linux partitions,
and while the exact nature of the partitions will
depend upon your own requirements, you can
usually set it up like this: — lOOMB/tmp —
lOOMB/var – lOOMB/usr – 2GB/home – 1.7GB,
or whatever is left. Some distributors use the
/opt directory, so you may want to reserve
500MB or so from that, and reduce Iusr and
/home slightly to free up the space. Your ‘E:’
partition in Windows will become ‘D:; as Windows
just ignores all Linux partitions and does not
include them in its lists. There is more
documentation on partitioning at
www.linuxdoc.ors and, which looks
at various ways to partition your media.
Bad experience
If ¿|g i For interest and professional reasons,
I bought Linux4Win 6.5, and was
– pleased I would now be able to set up
Linux without the dangers of repartitioning.
My Linux needs will be small, maybe restricted
to using Kylix and I only have one Linux game
(Terminus), while Windows and its games are
disk hogs. Unfortunately, the install program
was a total failure and I totally unable to
create the Linux virtual partition files. No
support was available from either Macmillan
(, who distributed it, or Mandrake
who developed it and a technical email
address that was given is defunct — I got no
reply to any of my emails. I was forced to
return the worthless software to GAME,
concluding that Linux is a Mickey Mouse set-up
worthy of the origins of DOS itself. I also
discovered that L4X appears to have a more
recent mcp-based release. I am still interested
in setting up Linux (within Win95), could you
advise on a reputable retailer?
Andrew Argile, via email
■if W It really doesn’t sound like you have had
If 4 1 muc^ success Linux so far To be
* „», 1 honest, if you’re actually going to use
Linux for something serious, such as Kylix, a
distribution which installs itself within a Windows
FAT partition is not going to be particularly great,
because the disc access times are considerably
worse than a standard Linux ext2 partition, and
you will really notice the difference if you start to
swap. If you can, just resize your Windows partition
and create a small Linux partition, using Mandrake
Linux, SuSE, or any other distribution you like the
look of, and dual-boot between the two.
It’s really quite pathetic that Macmillan don’t
provide support for what they sell, or at least point
you in the right direction of someone who can
help you with the specific problems you are
experiencing with the product Linux4Win is not a
typical Linux distribution, and certainly the way
that Macmillan deal with people is not the usual
way for people within the Linux community to
behave. We hope your next experiences with Linux
are more successful.
Creature feature
I am using Mandrake 8 .1 tried
to install the Creatures Docking
Station but received the following
error message:
189 46trg.bz2
I am just converting over to Linux from
Windows and was trying to install by clicking
on the link under run.htm after clicking on the
CD ROM icon. How would I install this using
BASH? Do you have any solutions?
Frank McKenna, via email
gjfr I I The easiest way is to manually copy the
■ f | dockingstation _189_46trg.bz2 to your
» __ 1 hard disk, or use the ‘Save As’ option in
your browser You can then bunzip2 it and untar it:
bzcat dockingstation_189_46tig.bz2 I tar xvf –
You will need to read the relevant documentation
within the created directory.
Installing Linux
¥ A 1 * have a SparcStation 20 without a
monitor or CD-ROM drive although it
ilhh. *41 does have an ethernet card. It
currently has Solaris 2.5.1 installed. Any ideas
about how can I install Linux on this machine?
Richard, via email
i f f l i Many distributions, such as Debian, Red
f 1 1 H S and SuSE, are available in Sparc
* _ ’ binary formats. I don’t think you can do a
remote installation of Linux, over a network, but
once Linux has been installed on the computer it
doesn’t need a monitor As far as a lack of CDROM
drive is concerned, you should be able to
boot from floppy disk or over a network using
BOOTP/DHCP and then install over NFS from a
distribution CD mounted on another machine.
BOOTP and DHCP are complicated to set up,
but there is an in-depth documentation at www. You don’t need a Linux machine for
the NFS mount, so you may have look elsewhere
to find out how to use BOOTP on different OSs.
Hissing package
After reading an article on
gphoto I was inspired to
purchase a Kodak DC3200 to
replace a non-Linux friendly product.
Gphoto2 works very well, as a
command line program, for
downloading the stored images and I
have devised a simple shell script to
help my failing memory. In the same
article a couple of GUI frontends were
mentioned, but I found that both had
many dependencies which my SuSE
7.0 box could not satisfy.
After a couple of downloads from
the net the number of outstanding
items was reduced, but my progress is now halted through the lack of a package. I cannot
find i.e libTDL. There seem to be a lot of people out there with the same trouble because
searching the net only returns cries for help like mine. Any ideas?
Robert Whitmore, via email
gphoto2 is heavily in development, and many of the GUI front ends for it just don’t keep up
with the features of the CVS build. If you head on over to, and find out
how to check gphoto2 out of their CVS tree, you can also check out gtkam, which is a front
end for it using GTK+. It will be a case of building it from the source code, so you may need to install
some development libraries from your SuSE distribution CD. You did not say what problems you were
having with the other Uls, but I should imagine that the appropriate packages will be available from
either your distribution CD, or from SuSE’s ftp server As far as libTDL is concerned, you should be
able to find out all you need to about it at
ut ,a tM
3» . a»#*
ft Carwi
Gtkam is definitely a nice little GUI for gphoto2,
but it’s still in development
RTF Documentation
I’m trying to install the GCC 3.0
update. I’ve copied everything to my
lb * . home directory, unpacked and
untarred everything. Then, as root, I did:
make install
However, the install fails with these errors:
make[2): Leaving directory vhome/darren/gcc/gcc-
Making install in libltdt
make[2): Entering directory
make[3j; Entering directory
,’bin/sh X./../mkinstalldirs ,’usr/local/lib
i.X./mkinstalldirs: J J Jmkinstalldirs: No such file or
make[3]: *” [install-libLTLIBRARlES] Errar 127
make[ 3]: Leaving directory ‘/home/darren/gcc/gcc-
make[2j: [install-aml Error 2
make[2]: Leaving directory 7home/darren/gcc/gcc-
make[1): [install-recursive| Errar I
makdl ): Leaving directory Vhome/darren’gcc/gcc-
make: [rnstall-target-libjaval Error 2
From a bit of digging around I’m pretty sure
the line:
should actually be:
Any ideas?
Dave, via email
H f H doesn’t use ^e standard ./configure
ï A * script’ and if you tate the fime t0 read
f ««» 1 the documentation which is distributed
with it, you will notice that it’s a bit more
complicated that you expect.
You need to untar all of the tarballs which are
distributed with gcc 3.0. You may not think you
need them, but they are all required for
compilation. Next, you need to do:
make bootstrap
make install
Which will set up, build, then install gcc 3.0 on
your system.
Library frustration
It has been a year now since I began
using Linux, and things are not as bad
as it used to be when I first started
this open source adventure.
But – and unfortunately there is always a
but – I still face problems with a very
important aspect for any Linux user, that
is compiling and installing applications
from source.
There is always an error message, and
being unable to interpret it to something
meaningful, the experience ends with a mix of
frustration and anger.
I’ll give you a recent example, and let’s
see what the gurus can do to help a new(ish)
Linux user.
When trying to configure Kconfigure, it
displays the following error message:
checking for fibz… configure: error: not found.
Check your installation and look into config.log
I guess this means it couldn’t find this libz
thing, but when I type locate libz I get:
By the way, I use Mandrake 8.0.
From the forums
W HI When you want to compile something
l | 1 against a library, you need a copy of the
* __ 1 headers as well as the shared libraries
themselves. The header for zlib is called ‘libz h; and
will probably live in /usr/indude/. Chances are,
you’ll be missing the zlib-devel package from
your system, which is required for compiling
anything against the zlib library. Once you install
this, you should be able to carry on ./configure, and
it may throw up a load of other similar errors, and
you will have to install the appropriate -devel
package. If that still doesn’t do it, checking
config.log within the directory where you ran
« t a *
= root
= /usr/local/sbin/ in. prof+pd
socket .type
= root
= /usr/sbin/tcpd/itiapd
service i
-flore–(31k) |
xinetd uses a slightly
different configuration
style to that of inetd,
but it still uses tcpd for
access privileges.
configure should tell you exactly what the error
is. You may be missing yet more headers,
usually from gli.bc or from the kernel, or you
may have to delete config.cache before
rerunning ./configure.
db what?
| I am running Mandrake 8 and the
included version of Glade. The old
ifes, «41 edition of Glade – the one without
Database facilities – ran perfectly on my
system. However, this new version, with
Database facilities, falls down with an error,
i.e.. ‘can’t load dbl’ or can’t load -Idbl’
every time I try to run Make. I can find ‘db3’
what is DB1.
I would be glad of any help.
Ken Book, via email
I f m dbl is version 1 of the GNU database
V i « manager library, and comes as part of
I 1 the glibc package. You have a number of
options to get around the problem.
The first is to symlink the /Iib/libdb3.* files to
/lib/libdbl*, then run /sbln/ldconfig and continue
the build process. This Is a little messy, so instead,
you could edit the Makefile, and replace every
reference of -Idbl with -Idb3.
You could also, of course, use an RPM
distribution of Glade for Mandrake 8.0, which will
be compiled against the correct version of libdb.
Check Mandrake’s website for the latest edition.
Where’s the CD?
I’m trying very hard to ditch Microsoft
altogether, but I keep getting in a bit
too deep for my ageing brain.
I upgraded from my Mandrake 7.0
installation to a new clean install of Mandrake
7.2, and decided to upgrade the kernel from
2.2.17 to 2.4.5.
However after a couple of tries which failed
to display anything on the screen, I eventually
got the system to boot but then discovered I
could not access the CD drives or the floppy
disk. Even when I attempt to Is them from the
command line absolutely nothing happens.
Clicking on the icons on the desktop results in
Konqueror coming up showing the path to the
floppy or CD drive but no files are displayed.
I decided I must have failed to set
something in xconfig and reverted back to the
old kernel only to find that I have the same
problem now in that. To solve the problem and
get my system back to normal I did a re-install
from the Mandrake 7.2 CD. I have just done a
third attempt using xconfig, carefully reading
every help page for each item to confirm if it is
needed or not, and the same thing happens.
Clive Pender, via email
The kernel which is distributed with
If A H Mandrake is not a vanilla 2.2.17 kernel. It
F « « 1 has been patched to the eyeballs with
various fixes, features and other things, which have
never been part of the main kernel distribution,
even in 2.4. One of the main patches in Mandrake
is the supermount system, which automatically
mounts devices, such as your CD-ROM drive,
when you access the directory which it mounts on.
Supermount isn’t available for 2.4 series kernels,
so you’ll have to build the kernel with autofs
support, a configuration option within 2.4 kernel
releases, which is slightly different to supermount,
but works equally as well. Naturally, you can
continue to mount the drives manually without
such an addition, although you will have to adjust
your /etc/fstab to remove the supermount
references, so that the kernel can correctly mount
the filesystems.
You could, of course, just stick to using your
2.2.17 – notwithstanding the unpleasant ptrace
exploit which it has. Mandrake may have released
an updated kernel, 2.2.19 with all their patches, for
Mandrake 7.2. Check out their website.
Mandrake to go!
f * I I installed the Mandrake 7.2 distro
from your Christmas 2000 issue on
fes» *C my Dell Latitude C600 laptop
preinstalled with Windows 98SE. I don’t have
any problems with most of the installation
procedures except that I don’t know which
Display option to use. Can you help me?
Harlun H. Valdez
* * * *
The.. aufewuwfttMr: :i s a ta e l: t a autMULttcşlİ» Mount f i 1» . « y s tw » :
;>n ■■Wusftci-Thi s ı «pi”ae.tvtafcj W: is partially .1 • h-î’* J to
ifi the 13 unlike’tho BSD
vhicb is a us« it 5{wı<î*
V<i th* «stonötBitet you ttwd tto to&ii. .fro», ,
« « » t to ? tt* “KPS- m * »yâtwt «tçpcut*,
If/you vont to canpil« this af a xodultt ( * coil« vfaich cafv ibo
in-a»i!,ed in and r*âov«d ftt’» till? running kemdi vheneveı you vxr.t),
sav K hits arw* tead Ooeu»e»ta;t:iûn/*<sdules m Tùt »«iu le v tu bo
csXlwi o Yw vxiX twed. t » add *alxw «utof» «utt>£»4 * to
I ? y»tt a s« not a ¡p a ît o f a f a t c ly la rge, ii2(fcribut«<t network a i
■ ■ rioa/fc have a laptop vhich oaod* to dynamically «con figu re to th*
lo c a l neWOrk, you ptobfciıly do «ot n»«d an «otojmrttfitw, aftd can »«y
H h«re.
Although the documentation
says it’s only for remote
filesystems, you can setup the
kernel automounter to mount
local filesystems in exactly the
same fashion.
Wiped out
I have Installed a second hard disk
in my Windows PC. On this t loaded
Red Hat Linux v6.1 I set up ULO to
boot into Dos/Windows unless my Linux boot
disk was in the a:\ drive.
Everything has been working fine, until I
Wiped my floppy disk by mistake. How can I
get back into Linux without this boot disk?
from the forma
Wt 1 1 Oops! You should be able to boot off
» Â 1 the Red ^ installation CD in
f 1 ‘rescue’ mode to get into Linux, and
from there use dd to write a new boot image to
a floppy disk:
dd iNvmlinuz of=/detffdO bs*512
then use rdev to change the root filesystem
according to your set-up.
rdev /dev/fdO /dev/Mat rdev -R /dev/fdO I
The first command will set the root filesystem to
/dev/hda1, the first partition on the primary
master; so you’ll have to use /dev/hdb if your
Linux root filesystem is on the slave device. The
second ensures that the root filesystem is
mounted as read-only.
If you’re using a boot floppy, ULO will be
completely bypassed, which makes its use rather
redundant Unless there is a particular problem
with using ULO and your hardware, it’s probably
best just to set tltO up to: let you boot into
Unux, instead of using a boot disk.
W I® Laptops are generally non-standard and
■ 4 w ^ave cut c*own or custom chipsets or
f — 1 custom to fit their limited size. Weird
hardware notwithstanding, Linux will happily install
on the vast majority of laptops if you perform the
installation in a text only mode, so as to avoid
having X run if the video card is not correctly
supported under XFree86. Fortunately, Dell is a
particularly popular brand of laptop and the
hardware is well tested under Linux, and as such,
many people have already installed Linux on that
particular model. All of the information, for almost
every piece of hardware on it is available from It usually involves
downloading customised configuration files and
doing a little poking around by hand, but it Is well
documented and explained in an easy to follow
fashion. It is best to start with one major feature,
such as X or PCMCIA before moving on to more
complicated and less important components.
Distro dilemma
t 1 1 have tried to find a reliable distro,
| I I I but have failed to find one without
H», « many problems. I am not looking for
the most up to date features (although the
more recent the better), I am just looking for
reliable. Is there someone who produces a
reasonably bug free distro and who keeps bug
fixes updated reliably?
Dragonhead, from the forums
| J f I | A distribution is purely a collection of
V i 1 numerous tools, utilities and services
F M 1 from discrete sources. It is practically
impossible for anyone to produce a distribution
which, by the time you install it, will not have any
exploits or bugs. The best way to handle it is to
install a recent distribution which will probably have
the latest releases of core tools, such as RedHat
7.1, and then maintain the major programs, such as
Apache, X, or whatever you will be using to suit
your requirements.
All vendors, or at least the major ones, issue
bug reports for almost everything on their
distribution, at least when security is a factor, but it
still relies on the third party source producing a fix
for such problems in the first place. As most distros
have some form of on-line package management
tool, it is fairly straight forward to make sure that
you have the latest version of a particular package.
Selective KDE
I am currently running Mandrake 7.1.1
want to upgrade KDE to version 2.1
from the Linux Format CD but don’t
know how! Obviously I don’t want every
language, nor do I necessarily want the
development stuff, but what do I install, and in
what order? Every file seems to be dependant
on something else that I have not got yet! I
tried kpackage, but maybe I should go with
the command line, but the dependency
problems will surely remain. Also If I replace
files then, will I lose the old ones?
Mark Roberts
With ‘rprrf you don’t need to install RPMs
In any particular order if you try to install
them as a batch. Simply doing: rpm -Uvh
/path/to/kde21/‘rpm as root, will return any
dependency errors for individual packages before
trying to install the whole set. If you have
dependency problems, or are finding that Mandrake
7.1, which uses RPM version 3, doesn’t like the
RPMs on the CD, you may want to look at
downloading compatible RPMs from, or upgrading to Mandrake 7.2,
which should allow you to use the RPMs on the CD.
Don’t panic!
I have recently installed Linux
| Mandrake 6.1. The install went fine,
¡¡Is,,, 4 | but now I can’t get into Linux! I ran
Rescue from the boot disk and it said “Unable
to open an initial console – Kernel Panic: No
init found. Try passing init= option to kernel.’’
Can someone give some advice to a newbie
like me?
Fishca, from the forums.
|jp ‘H Aside from the fact that Mandrake 6.1 is
i j j | l a very old distribution which has been
I _ 1 superseded by the 7.x, and even 8.x,
releases, you are probably having problems with
the rescue disk by either not passing the correct
root partition in the ‘root=’ option, or by trying to
boot an incorrectly installed distribution. You may
want to try:
linux root=/dev/hda5 init=/bin/sh
Of course, if you’ve got to the point of using the
rescue disk, there is a more important problem
which you’ve not explained, so reinstalling with a
recent distribution, should solve any problems.
Copy problem
I I am currently taking my first faltering
f steps in Linux and I have come across
I a problem in loading the kernel 2.4.1.
I have installed Caldera’s 2.3 on my system a
Pentiuml33, 48MB memory and Matrox
Mystique graphics card. My problem is cannot
copy from the CD to hard disk. What I would
like to know is how to copy files from the
CD-ROM. I know other people who have
had a problem in compiling the kernel using
SuSE 7.0, and I was told to do the following:
tar zxvf <path>/linux-2.4.0.tar.gz where
<path> is
Now taking this information, I tried to copy
from the CD with this line in LILO: tar zxvf
/mnt/cdrom/kernel/linux-2.4.1.tar.gz. I get this
message back: ‘cannot open archive tar zxvf
/mnt/cdrom/kernel/linux-2.4.1.tar.gz no such file
or directory’.
I have tried loading the 2.4.0 kernel from
issue 11 using tar zxvf /mnt/cdrom/
and get the same answer.
Would it not have been easier to put in the
correct text, as there are people like me who
want to try Linux but with problems like this
will give up and revert to Windows.
RobertL Reeves
g l i VH To use the kernels you need to unpack w A ? the archive’whic^is what the tar
F »»« 1 xvzf <filename> line does, then
proceed to configure and install the kernel you
have built
You may want to just use the kernels from
Caldera, rather than trying to upgrade to 2.4 and
install all of the required packages until you feel
confident in doing so. Building a kernel from the
source tree is not a simple thing to do, and if
you’re not comfortable with Linux and each
individual component you are using, such as the
kernel source, LILO, tan et al, then you can quickly
become confused and disorientated.
Hard drivin’
I am interested in using Linux
alongside Windows on my computer.
Ah». 41; but I have a problem with installing it.
When trying to install TurboLinux, the installer
cannot find my hard drive. I am running an
ATA100 HD which I have to define as an ATA
100 device in my BIOS, rather than an IDE
hard drive. Does the Linux installer recognise
ATA 100s or will I have to wait until a driver
comes out?
Liam Sheridan
■r I S Linux will recognise the IDE controller,
W A ■ w*le^ler or not ^ has support for the
f _ 1 UDMA extensions. You may want to
check to see if TurboLinux recognises the
controller and what it says about it during boot, as
it will list all drives which are attached to it. Also, it
might be useful to see if fdisk at the command line
(press Ctrl-Alt-F2 to switch to another console)
can find /dev/hda which would indicate any
problems with the TurboLinux installer. If you still
do not have any luck, it is probably best to try
Mandrake or SuSE, both of which come with
kernels compiled with UDMA support and should
recognise your IDE controller without any trouble.
I have Mandrake 7.2 on my PC but I
would like to add Windows 95 on as a
dual-boot I’ve tried installing from
the Windows CD but LILO just isn’t having it I
have seen lots of articles explaining how to
add Linux to a Windows machine but not the
other way round! Is there a way?
Scott Berry
Yes, but it is not exactly simple. Windows
is very picky about where it is installed,
and always like being on the first primary
partition on the disk. This may mean that you will
have to repartition your drive, or move whatever is
your current ‘/dev/hdal’ to another part of the
disk. You’ll then have to edit /etc/fstab to make
sure Linux knows what to mount Then, you’ll
have to use
dd if=/vmlirajz of=/dev/fdO bs=32
to write your kernel image to a floppy disk so that
you can boot the machine back into Linux when
Windows overwrites LILO.
A better option would be to backup the whole
Linux file system on to a CD-R or another hard
drive, and install Windows, then Linux, and
recover anything you installed or created from
the backup.
What’s the difference?
Why do we have different RPMs for
Red Hat and SuSE? What’s the
difference? Can i use a generic (that
is, probably Red Hat) RPM on my SuSE 7.0
installation? A good explanation of the
difference would be very useful, as I find this
all rather confusing.
David Hignett
m 1 ! Red Hat and SuSE use identical package
1 1 1 management systems, but their
f _ 1 filesystems and library versions are not
always the same. Often configuration files need to
go into a different place, or it needs the binary
compiled differently, so logs end up somewhere
else, but it is usually due to the main distribution
having differing versions of major system libraries,
which will cause things not to work quite right.
Red Hat Upgrade
I’m using Red Hat 6 at the moment on
my workstation with 6.1 on my file
server (used by Windows PCs on a
home network). I’m looking to upgrade to a
newer version on the workstation – this
doesn’t need to be Red Hat. Do you have any
suggestions about which to use in a dual boot
with Win98 and running on its own HD (hdc).
I’ve tried to install several, including Mandrake
7.2, but all the Mandrake versions that I’ve
tried lock up in the install.
■T V Any distribution should install happily on a IF k l dnve seParatE t0 Windows, as long as you
t ___ 1 choose a custom install method so it does
not try to decide itself where it should install. You will,
however have to remember to make LILO install the
kernel in the MESR of /dev/hda, as that will be the first
boot disk on the machine, rather than /dev/hdc. You
could also try Red Hat 7 or SuSE 7.
CD not booting
f gk I have a copy of Mandrake 7, not in an
iso format but laid out in directory/file
Ife*. format. I have copied this, complete,
onto a CD. The CD is readable in Windows, but
it won’t act as a bootable Linux disk and, after
creating and booting a cdrom.img boot floppy,
the install program tells me the CD isn’t a
Mandrake disk either!
Charlie, via email
Wjj SB You’ll need to burn the CD with the
‘RockRidge’ extension, rather than the
* _ * Joliet extension which Windows uses, so
Linux can correctly read the long file names
without needing any additional modules. As far as
making a bootable CD goes, you need to burn the
image file, which you would normally write to a
floppy disk, to the CD, and the exart method
depends on your CD creation software.
It’s worth bearing In mind that Mandrake 7.0 is
now rather old and you might prefer to use
Mandrake 7.2 or buy a cheap CD from Linux
Emporium (
Deb and RPM
I have an RPM-based system and I
want to install Debian packages. Is it
i; possible to do this with this kind of
set-up. I would appreaciate your help.
Hicheile, via email
■f U It would be difficult to install the Debian
* 4 ■ Packa8e handling system on an RPM-
1 »*» 1 based system, but it is possible to convert
Debian packages to RPMs and then install them as
usual. The tool you need to do this is called alien,
and if it’s not available with your chosen distro,
then you can search for a copy on
■ Installation
Rumours of dselect’s
demise have been
greatly exaggerated.
Install this and you’ll be able to convert a deb
package with a command like:
alien -r foobar.deb
This will generate a package called
foobarARCH.rpm – where ARCH is the architecture
that the package foobar has been built for, if any –
which you can then install with rpm as per normal.
The answer we gave last time is also incorrect
when it says dselect has been replaced with apt in
newer Debian distros. dpkg is the tool that is used
to install, build and configure packages on a
Debian system and apt is the tool that is used to
retrieve them for you from a specified package
source, resolve dependencies and so on. dselect is
just a menu-based front-end to both tools and has
not so far been replaced. You can, of course, use a
graphical alternative to dselect, such as KPackage
or StormPkg.
f III 1 *’m constantly having problems with
p rpms. My trouble is, I try a lot of stuff,
* : but I don’t have a huge amount of disk
space for Linux to play with. When I come to
remove it again (RPMs are supposed to make
this easy too, right?) I usually end up searching
for hours with something like kpackage to
remove it. I’m happy to do it from the terminal
because I find this easier, and frankly a lot
faster, but it’s often difficult to remember the
exact name of the package. Any suggestions.
Frank, via email
I P H Mrnmm-This sounds like one for gnep.
» k « You ran use the rpm —query to find out
f a»» 1 if a particular package is installed. You
can also query the database for all the packages
installed using:
rpm -qa
However, this will print off reams of names and
version numbers, and you’ll be in much the same
position as before. So the cunning way to do this is
to pipe the output through grep. Grep is a tool
which searches through input and tries to match a
given pattern. So, if you even know just vaguely
what the package might have been called, you can
search for it with the line:
rpm -qa I grep drak
This will find all packages with ‘drak’ in the name.
Alternatively, if you know the location of one of
the files installed by the no-longer wanted
package, you can use:
rpm -qf <filename-mduding
which will return the full name of the package
which installed it.
Debian pakages
| ^ I am using Linux Mandrake 7.2 and I
: % • am very happy with it. However, I
Ilk A would like to be able to install Debian
packages on my system e.g. smartdrive. Is it
possible to install dselect alongside rpmdrake
and kpackage. I have tried copying dselect
from the Corel Linux disk but my system won’t
have anything to do with it. I would appreciate
any advice you may have on this.
Steve, via email
t g S It is very difficult to migrate a RPM-based
f | l system to apt, so you may just want to
f _ 1 reinstall with Debian 2 2 and start from a
clean system. I imagine running dual package
systems is doable, given the time and
understanding of how apt works, but the time and
effort required would outweigh the resulting
improvements. Or you could add a Debian-based
distribution to your system.
dselect has been replaced with apt in newer
distributions of Debian, but as Corel is Debian 2.0
with extra bits, they’ve not yet caught up.
Different class
1 | I think I have installed the wrong
installation class of Mandrake 7.2.1
installed the ‘recommended’ class, but
I now realise this installation class does not
include all the programming languages and
other developer stuff. In order to install a
‘workstation’ installation class, do I need to
remove my current installation, or can I simply
update it, by installing the ‘workstation’
installation class over the top?
What is the difference between the
covermount versions of Linux and the
commercially available boxed editions?
And finally, do you know if there is a good,
stable Atari ST emulator available for Linux?
Samual, via email
Wf l ig You can use LinuxConf to install A H additional packages for the items you
* _ * missed out, or you can install them by
hand using RPM. You might also want to try to
‘upgrade’ the distribution using the Mandrake
installer as long as it doesn’t notice that your
already running the current release and stop you.
Boxed sets usually contain CDs containing the
actual distribution, the source code and some
variety of printed documentation. As well as that,
support is available from the distribution creators,
such as RedHat or SuSE, for a fixed time period
after installation should you become stuck. Boxed
sets are good for people who’ve never touched
Linux as they have something to follow when they
install, but as the distribution can be, er, distributed
freely, it’s useful for people who can obtain help
elsewhere to install Linux off a free, or cheap, CD
rather than shelling out on a boxed set which
they’ll hardly use.
On he Atari front, a quick search with Google
brings up a few hits, the most promising of which
seems to be
nino/stonx.html, which is the home of STonX.
Another good site is
ST/Emulation/Emulators/ which has a number of
interesting leads. We’ve not tried any of these out,
so we can’t promise anything… The alternative is to
get your old ST out of the loft and dust it down.
Double drive dilemma
r m 1 1 have recently intsalled a copy of
Corel Linux on my home computer, as
I have been wanting to use this
platform for a long time. I think I will install a
4.3GB extra hard drive, put all the Linux
applications on there and run a dual boot
system. I have not attempted the install yet, as
I want to be sure that I can run both Windows
and Linux on different hard drives although
not at the same time. I want to make sure I
don’t mess up all the software I presently have
and use. Do you have any suggestions?
Joseph Kramp
Wf <■ Windows is rather picky and needs to be
■ k ®installecl on ttle first partition of the
* _ * primary master drive in the system.
Putting aside that restriction, you can distribute
your Linux partitions as you choose. You might
want to put your second hard disk on the second
IDE controller and put your swap partition on the
first hard disk, so swap and the normal filesystem
don’t have to fight for IDE bandwidth all the time.
Other than that, you’ll want to install LILO on
/dev/hda, rather than /dev/hdb or hdc, so that
booting the machine will give you the LILO menu
where you can select the system to boot. Most
distributions will allow you choose where LILO is
installed, so you won’t need to edit any
configuration files later on.
Caffeine fix
I loaded the Kaffe onto my Linux
| Mandrake 7.1, system. I am fairly new
to Linux, so I was wondering if you
could tell me how I get it running. I did the
./configure, make, make install. Now I just
need to know how to get the application to
run, and maybe a website address that gives a
quick tutorial.
Daniel Smith, via email
m W If you did a plain ./configure with no
W k ■ ° P tions ttlen Kaffe should get installed in
I ___ 1 /usr/local/ with the Kaffe binaries in
/usr/local/bin If this directory isn’t already in your
system path, then you will need to add it with the
following command:
You should then be able to execute the various
Kaffe executables by name. For example:
would compile the file in the current
directory and create the bytecode file java.class.
You can run this with,
Note that when running Java binaries you drop the
‘.class’ suffix.
More information on Kaffe can be found at and on Java generally at The latter site has some
good tutorials for the complete beginner
Java: there or not
I I have an enquiry regarding Mandrake
17.2.1 don’t know if a Java compiler
I (jdk) was already installed on this
distribution or do I need to download the Java
software from internet? Thanks.
Carol, via email
WH n You can easily check to see if jdk is
a A * installed fust bV entering the following
* * simple command:
If it is not there, check the Mandrake CD to see if
it’s on there before downloading the rather huge
RPM from the internet
Reader seeks object orientated
language for mutual satisfaction.
Boot bother, part 1
: I am struggling to install Linux for the
i first time. I want to use an old PC
I which has Windows 95 on it and a
1GB hard disk. I want to erase the Windows
and use a single partition for Linux.
I can get so far attempting to use fips,
but it won’t run because there are hidden files
left on the disk. Windows no longer boots,
even from the startup floppy, and
MSDOS/Wmdows floppy does not seem to
recognise the D: CD-ROM drive.
How can I wipe the hard disk, reformat
it, create the partitions and load Linux from
my CD-ROM? Sorry if this sounds like a
disaster area.
Dougal Darvill, via email
Wj W It totally depends upon the type
■ A l°f drive it is. If it’s a general
f » » 1 ATAPI drive, Linux should pick it up
without any problems. Check to see if your
BIOS recognises it and, if it doesn’t, see if
2 4 | L I N K | ANSWERS
you can convince it to.lf it’s not ATAPI/IDE, you’re
in for a few problems. Usually non-ATAPI drives
have proprietary interfaces, which generally
don’t have drivers available for Linux. If that is the
case, you may want to see if you can borrow an
ATAPI CD-ROM drive from someone and see if
you do any better Failing that, you could install
over a network, such as a LAN or PLIP (parallel
lead) connection, or by installing a second HD into
the machine, after copying the Linux distribution
onto that disc.
Boot bother, part 2
W gm. 1 1 am trying to load Linux on a rather
ancient Compaq Prosignia PI with a
SCSI CD-ROM and a smart array
controller. I have used the 4.60 smartstart CDs
to erase the current set-up and prepare the
system for Linux. I must say I was pleasantly
surprised to see that Linux was
a selectable operating system on the
smartstart CD.
However, whatever I do, I cannot seem to
get the machine to boot off the Linux bootable
CD’s. Red Hat, SuSE and Mandrake 7.1 just
seem to leave the “blinking” cursor in the top
left and you are forced to reboot as the
machine fails to respond.
Mandrake’s boot floppy made from the CD
comes up a treat with TUX and the two
options: either auto or manual loads. Both
seem to start OK, decompressing what I
imagine is the boot instructions, then brings
up: “Boot Failed – Please change disks and
try again”.
I am reasonably new to Linux, but not to
computers so I’m not phased by having to do
things manually, but this has me stumped.
Have you got any ideas?
Thanks for your time and I hope you can
help me out.
Peter Harris, via email
WS 1 1 It seems like Linux is having difficulty
f j . 1 finding your CD-ROM drive. As it is a
If SCSI drive, the problem is likely to be
the SCSI controller itself, rather than the
particular drive. Most Linux distributions will be
able to auto-detect the SCSI device and use it, but
this seems to be not happening in your case. It
may still be possible to get it to work if it is a
supported SCSI device, but you need to know
exactly what it is.
If it is supported, you will be able to force LILO
to try and boot from it. Insert your boot floppy and
while LILO is loading press and hold Shift (or Alt
/control) to get the LILO prompt
Then you can supply kernel options, loading
the required module. For more detail, see the
SCSI HOWTO, The Installation HOWTO and
related documents (the HTML HowTos are on
the CD in the /LDP/html/ directory). It’s difficult to
answer this question without your exact hardware
specifcation, but I hope we have managed to solve
your problem.
Crypt for Linux
I’ve recently installed Linux on my
home machine and I am still trying to
get familiar with it. After years of
using Windows it is somewhat different to my
usual set-up.
However, things have not been completely
straightforward as I have encountered a couple
of problems along the way – I hope that you
are able to help me.
I downloaded a .CRYPT file from the web
and I have the password for it, but I’m unable
to decrypt it. The instructions say that you
should use the UNIX crypt command and enter
something like this:
crypt password <
filename.tar.gz.crypt l gunzip -c
When I type it in, I just get ‘command not
found’. Would any of the Red Hat packages
have the crypt command in (I’ve got Red
Hat 6.1)? If not, can I get a version of it off
the web?
Unfortunately, this is not the only problem
that I have encountered. When I try and
install a package using the rpm command, I
get the error message which says “cannot
open /var/lib/rpm/ packages.rpm”. When I
look in the directory, /var/lib/rpm.
packages.rpm is definitely there. Do you have
any idea what the problem is?
One final problem that I have been having
is that when I unmount a floppy disk after
copying data to it, the file /mnt/floppy still has
the copied files in. Shouldn’t unmounting the
diskette and removing it return /mnt/floppy to
an empty file?
I hope you are able to help me.
Paul Griffiths, via email
Most Linux distributions will not actually
have the crypt command, but instead
will use mcrypt, a more secure, GPUd
version of the old Unix crypt You can find the
source code for mcrypt at http:// mcrypt but it’s also available as a Red Hat
package Even if it’s not included on your Red Hat
CD-ROM, you can download it from their website
Go to the Downloads page at
and search for mcrypt
As for your next problem, you don’t say what
tool you’re using to install RPMs – is it the
command-line rpm or a graphical front-end?
Installing packages with the shell-based rpm is
dead easy You simply do
rpm -install package.rpm
I suspect the problem is that you aren’t logged in
as root, and so the rpm tool cannot gain write
access to the file packages.rpm to modify it
The solution is to log in as root before installation,
or, if you want users other than root to be able
to install packages, modify the permissions of
the various RPM database files in /var/lib/ rpm
so that they are writable by your chosen group
or users.
Your final problem is rather odd. Are you sure
this is what happens? It could be that at some
point you’ve copied files to /mnt/floppy and
forgotten about them. Then when you mount the
floppy, these files get hidden by the contents of the
floppy, only to reappear again once you unmount
the disk. Do files actually get copied to a floppy
disk successfully?
There is another possible cause to this
problem; it might be that if you were using an
automounter such as the kernel autofs system or
supermount You should not dismount drives
under the control of these systems with the
unmount command, because it will only confuse
the automount demon.
Install magic
f a 1 1 have repeatedly tried to install
Imagellagick onto my home
Ik ,. 41 computer under Corel Linux 1 (kernel
2.2.12) with kde 1.1.2,1 get the following
error message:
Update-menus; Cannot
remove lockfile
After this, the following files/directories
are installed:
/usr,’lib/menu/default/image ‘
but I cannot find the executable, so I cannot
start the program.
Do you have any ideas as to how I might
solve this problem?
Tom de Han, Leiden, Holland
U f H I think you’ll find ImageMagick has been
ffl A w successfully installed to your system. I
f 1 don’t want to install Corel Linux to verify
this, but the error message you’re receiving is just
telling you that the installer couldn’t create a menu
entry for ImageMagick. If it has got to this point in
the procedure, then it will actually have installed
the program properly. This error message is
probably due to Corel not using the same menu
system as Debian.
Your problems with starting ImageMagick might
be due to the fact that there’s no single executable
called ImageMagick in the package and, since no
entries have been added to your desktop’s menu,
you don’t know how to launch the various
components of the ImageMagick suite. Have a look
at the documentation in /usr/doc/ imagemagick
and at For example, the
GUI tool for viewing and manipulating pictures is
called display and the tool for converting image
formats is called convert
Distro dilemma
11 want to put Linux on a iow-spec 486
DX33, on which I will shortly increase
I * the RAM to 32 or 64MB. I remember
seeing somewhere that some distributions
were more suited than others to Iow-spec
PCs. I have a range of distros, up to SuSE 7.0,
but are any of these okay to use on lower
spec machines?
Paul Treuthardt, via email
Most distributions will happily run on all
systems, although some are compiled
with optimisations for Pentium class
CPUs. This won’t stop it working on a 486, but you
may have the odd problem. Usually with Iow-spec
machines, the problem is the amount of stuff the
distribution installs, rather than what the particular
packages are optimised for, so you’ll almost
definitely want to do a custom installation and not
include things which you know you won’t be
needing. The biggest CPU hog on Iow-spec boxes
is X, so if you can get away with just using a
command line and your typing skills, then you’ll
find your machine is a lot happier, quicker and
more usable.
Hff 1Ü
h }
Putting a square peg
into a round hole
I have recently installed Storm Linux
and, on the whole, I like it. One
problem I’ve found, though, is that
most software on the web is provided in RPM
format, not Debian packages. I can use the
rpm command to install packages, but it just
returns with unfulfilled dependencies all the
time. Is there a way that I can install RPMs
on Storm?
Eric Stirton, via email
Wjj I B The rpm command is a bit of blind alley
» k * as far as install’n§ RP|v|s on Debian-
* _ 1 based distros is concerned. It is a useful
command to have around, however for listing the
contents of RPMs and so on.
The best of way of tackling this problem is to
convert the RPM packages into debs and then
install them as normal. This is achieved with the
tool alien, which can be found on the Storm distro
CD in the admin section. To convert a package
called package.rpm, you will need to be logged in
as root, and then assuming that the RPM is In your
current directory, enter:
alien package.rpm
After some processing, this will churn out a
package called package.deb in the same directory.
You can install this as per normal with dpk. The
software will be under the control of the package
management system as per usual and all the
dependencies will be taken care of.
dpkg -install
While this method works perfectly well, it is
perhaps less than elegant You should really
consider building and installing software from the
source code.
If you really want software to be put under the
package manager’s control, then, in most cases, it
is not too difficult to create your own Debian
packages from a source tree. There are plenty of
documentation and scripts to help you get the
job done. Have a look at the Debian Packaging
Manual which should be supplied on your
distribution CD-ROM.
9 Installation
KDE Problems
f * I am having a little trouble installing
KDE 1.9, Qt in particular. It’s probably
¡¡Si*., me being a bit daft, as I am not fluent
with Linux yet. I’ve extracted the GZ file of Qt
to /usr/local/qt and have run the ./configure
command followed by the make command.
Both of these appeared to have worked fine.
The trouble is when I try and run make install:
Linux just throws back an error saying make: ’
• • No rule to make target ‘install’. Stop. I have
tried this many a time, including downloading
Qt again from the website. A helpful hint
would be much appreciated.
I really do believe Linux is the way forward
for the IT industry. Do you have any ideas as to
what I can do?
Dove Shaw, via email
■F i t If you build Qt in the default location
W A 1 /usr/local/qt, then you don’t need to f _ 1 perform a separate installation with make
install. It will work fine from the directory that
you’ve built it in, as long as you set the library and
search paths correctly with:
export QTDIR=/usr/!ocal/qt
export PATH=SPATH:$QTDIR/bin
This is all explained in the INSTALL file supplied
with the archive.
More KDE problems
While installing KDE 1.9,1 fell at the
| second hurdle. Being new to Linux, I
was keen to see it maturing into an
easier to use desktop OS but, after copying
the source files as you suggested and
restarting the desktop as FVWM1,1 went into
the xterm environment as root and typed:
tar xvyf Kdelibs-1.90
Guess what? The following lines tell a story:
tar (child):Cannot open archive Kdelibs-1.90;
No such file or directory tar (child):Error is
not recoverable:exiting now tar:Child
returned staus 2 tar:Error exit delayed from
previous errors.
Have I missed something? Are we all
expected to be so proficient in Linux command
line language that we know to fill in something
that has not been provided, or am I hoping to
get away from using MS Windows too much? I
hope never to utter the words ‘Long live
Windows’, and as much as I want to get
away from a system that insists you do
everything the Microsoft way, my patience is
being sorely tried.
Derek Logan, via email
W U You are missing something. Firstly, Linux
W A 1 is case_sensit’ve’ so the file Kdelibs is not
I — 1 the same as the file kdelibs. Secondly, it
seems as though the code supplied is wrong; it has
missed off the file suffixes from the the guide to
installing KDE. So, for example, to unpack the
kdelibs-1.90.tarbz2 package in the current
directory, you would enter:
kdelibs S i l l
1.90.tar.bz2 ■
If this returns tar: invalid option — y
then try
tar Ixvf
Some versions of tar don’t accept the y switch to
decompress files packed with bzip2; use I instead.
Whenever I download tar files and
decompress them, and then compile
source, I just end up with an
executable in that directory. Where should It
be, and whereabouts does Linux expect me to
store the source? There seem to be loads of
directories called “src”.
Maurice, via email
i want to install Definite Linux 7 on a Dell Laptop,
but I need to know if the hardware is compatible.
Stephanie, via email
|g j i j Laptops are always annoying when it comes to Installing,
f f ^ w as a lot of their hardware is non-standard. Your first port
I *** 1 of call should be the Linux Laptop homepage at
It has links to sites with information on how to install
Linux on a particular model of laptop, Including specific
configuration options and information on what particular
hardware features don’t work right.
There are two general ways to Install
programs in Linux.
The first is to use whatever package
manager is supplied with your distribution. This will
be R Pli in the case of Red Hat and its derivatives,
dpkg for Debian. This will provide you with a
sophisticated level of management It will install all
the files belonging to a package in their correct
places and it will also warn you if there any other
programs that you are required to install first to
make it work.
The second method is to compile the source
code yourself and then install it This is far more
complicated than using a package manager,
especially if you run into any problems.
Before doing anything else,make sure you
thoroughly read any documentation supplied with
the package. There will usually be files called
README and INSTALL that will give you tips on
how to compile and install it
The standard way to build a source tree is
to run ’./configure’ from within the top level
directory of the source, and then do make’. At this
stage you’ll end up with a tree with both the
source and binaries, which isn’t actually much
use. The final step, unless you want to do a ‘make
test’, is to do ‘make install’, which installs the
program, Its libraries, headers and general files into
it’s default place, usually under /usr/local. Since
most package managers have their program’s
install under /usn if you don’t remove the
package-based version before installing from the
source tree, you’ll run Into conflicts further down
the road.
There is no set place to install source code,
although most people tend to keep it in /usr/src,
/usr/local/src, or simply in their home directory. As
it’s not needed to actually run programs, it doesn’t
really matter
The exception to this rule is the kernel source
code, which is needed to build a lot of programs.
However as long as you have /usr/include/linux
linked to <prefix>/linux/include/linux, where the
first linux is your main kernel tree, you won’t have
any problems.
f , 11 have installed Mandrake 7 and
; everything is up and running except
\ < for the Gnome themes (eg’Pixmap’
‘Redmond’ etc) which have been left out. How
can I install these from the distribution disc?
Karl, via email
The themes are part of a package called
’gtk-engines! To install it, mount your
distribution CD with ’mount /mnt/cdrom;
then locate the directory containing the rpms for
the installation and cd into it. You can then instill
the gtk-engines package with the command
rpm -Uvh gtk-engmes-0.5-
You can then restart the Gnome Control Center to
pick which theme you want to use.
■ Configuration
. • ■ . i
•:- r – ■•-■
Subject page Subject page
Mounting SCSI disks 32 Penguin free 36
Compiling the kernel 32 Slouching Mandrake 37
Vfat support 33 Colour code 37
More on modules 34 Kernel query 38
Debian Woody system 34 The big freeze 38
Rescue me 35 Upgrade… shmupgrade! 38
LILO ill 35 The 1 has it 39
New / usr 35 What? 39
Path master 36 SuSE worries 39
Bash advance 36
Subject page Subject page
Problems with Small console-ation 42
kernel 2.4.0 40 Triple Boot 43
More problems Tapes of wrath 43
with 2.4.0 41 Silence is golden 44
The joy of 6 41 More Mandrake malarky 44
Modules and 2.4 41 Stopped clock 45
Aliases 41 Mounting Windows 46
And there’s more 42 Vanishing Alias 46
Losing your memory? 42 Supermount 46
Big drives 42 LILO defaults 47
Mounting SCSI disks
j I am writing hoping you can either
help or possibly point me to
somewhere I can obtain guidance.
I installed SuSE Linux and am having
trouble getting it to mount the hard drive on
my Adaptec Card. The card and disk show on
the dev. list. I think I need a script or
something to make Linux mount the drive.
Can you help?
Dave, via email
W§ 1 1 As the controller and drive are showing in
I f dmesg, you must already have the
i — 1 capabilities to access the controller, and
thus mount any device attached to it. The general
way to mount a partition on a SCSI device Is;
# mount /dev/sdal /mnt/partition
Unless you are using devfs, the drives will be sda,
sdb, sdc and so forth, and the partitions are
numbered exactly as they are on an ATA drive.
Once you are sure that you are able to mount the
partition, you can edit /etc/fstab and add the
appropriate entry to have the SCSI drive mounted
at boot time.
If you do not have the driver loaded for your
particular card, you will need to check to see
which chipset it is using, and either compile in, or
build as a module, the required kernel capabilities.
If you choose to use a loadable module, then
you need to add something similar to the following
to /etc/modules.conf, in order for the module to
be loaded automatically when you access a
SCSI device;
alias scsi hostadapter aic7xxx
Naturally, you need to replace ‘aic7xxx’ with the
appropriate module your card requires. If you’re
unsure as to which drive the /dev entries pertain,
you can use dmesg after booting the machine up,
to check, as it will list each drive, the SCSI ID, and
list the partitions on the drive. If the SCSI drive has
no partitions, you will need to use fdisk to create
them and mke2fs to create the ext2 filesystem
on it
Compiling the kernel
I’m wondering whether you can help
me on recompiling the kernel. I have a
particular problem with unpacking the
tar file concerning the Linux kernel. I have
tried with various distros including Corel,
SuSE7.0 and Mandrake 7.2.1 have also tried
with a purchased SuSE 7.0 personal edition.
I have been unable to unpack the kernel
files for both kernel 2.2.17 and have
followed the steps as follows. Enter system as
root user; copy kernel file from cdrom to
/usr/src by drag and drop then either Bunzip2
or gunzip to unzip file. The Unzipping part
goes OK but whilst in terminal unpacking the
tarfile you can see the machine go through the
routine and comes back to prompt. When
checking the list of files in /usr/src the kernel
source files remain as a tar file, then
/proc/scsi/scsi shows
you all SCSI devices,
and which controller
they’re on, but unless
you’re using devfs, it’s
not much use.
W Ê S m m 7:M2pn Hon Dec 17
day id. .i cat /proc/scsi/scsi
Attached devices;
Host: ses 18 Channel; 86 Id: 81 Lun: 00
Vendor: SEAGATE Hodel: ST33670MLM 088H
Type: Oirect-Access ANSI SCSI
Host: ses¡0 Channel: 00 Id: 02 Lun: 00
Vendor: SEAGATE Hodel: ST33670MLU 9004
Type: Oirect-Access ANSI SCSI
Host: sesi 1 Channel: 00 Id: 00 Lun: 00
Vendor: RICOH flodel: DPD/CORU rtPA120 Rev: 1.10
Tupe: CD-ROn ?:H2pti Hon Dec 17
david; i 0
Rev: 000H
Rev: 000H
revision: 82
Ù :3àvWniiifflî?«sr/m <p’U7/a ” ………….. – * # 1
1 E Ü Í , SiCtfpri Sun NoV 25
dar id: Is rl ■ í
to ta l 16 ■ »? + •
druKr.-Br-n 13 daw¡d • u s e rs • W A u g 12 22:54 .
IrwHruHruH . 1 root : root 13 Oct 15 0^:46 JinUK ->
drw~nr-H- 14 T0H6 181 H0% Oct 7 15:18
druKr-Hr-H■ m 18% 191 H0H6 Oct 15 11:31
1M 10H6 181
8: @’)pn Sun Noi> 25
.40% 301 7 10:35
4 |
A clean and tidy
/usr/src is a happy
/usr/src. Note the
symlink from Linux to
the latest kernel.
tar xvf (kernelfile-Verslon).tar
I have also tried:
tar xvzf (kernetfile-Version).tar.gz
I have followed the above procedures for
other tar files like Gnome 1.2.0 and Wine and
have been successful in unpacking software
and configuring.
I am a new user to Linux and this problem
has got me stumped.
Nick Edrupt, via email
O’: totniar COK^^urattnn j
•v v j ♦ « v n | i wofittjco tnwwr«) ifaeHTM m W
v i ! ♦ in v n. rfPpretscai support ***
V V« at Vwntxc* * * * * * *4* WWWK
•. V ♦ m IP taWw «of flnnrtagftaasqMAt) * * |1
V ‘ !♦ m v n ! tkoit match »«pjwrt *** |i
v > ’ «> oe mac ¡w *m mtfca su w n Ha* ji
« IB aetnier fcWuc laaltft scppart **■* l i
v r l ♦ m N /* | port rHttttb sujipwi | j
? ! ♦ « v ni H ^ j i J
w j * n* v » ! «rpmss <nato> support * + p
♦ tn
X * ï uiWHjcttoo slate svvptvt J K i i
– ■
« « V ” : Unoe» ovrtch Mipport <ÉXWW*»É*<mj J Í 2 Ü
– v | j ♦ » V * j tuppwt (EXPfeRtMlWIAL)
v v ) « A) v nj fKfcst Wtertntj
♦ m v », fttJlCTtti^etiupport
j a s J f
.. ^ -*-*•— — ——-■*— – — •* *………..
OK Be*» j B w |
Recompiling the kernel to give netfilter
support is simple with Xconfig.
(S ‘ I B The kernel source code is unpacked into
If a the current directory, in this case ‘/usr/src;
i ___ l within the directory ‘linux! You will want to
move your existing ’linux’ directory out of the way,
say to ‘/usr/src/linux-old; then proceed to untar the
kernel as before. Generally, once you’ve untared
the kernel, you would move it to ‘linux-2.4.0!
changing it depending upon the version, then
symlink that directory back to /usr/src/linux. There’s
no need to copy the targz file from the CD-ROM,
as you need only it to /usr/src/, then do
tar xvzf /mnt/cdrom/path/tol!nux~Z4.0 tar.g2
Your /usr/src/linux directory, after you have untared
a few kernels over the top of it, will be next to
useless, so you may just want to delete it and start
again from scratch with it
Vfat support
r *> V I’m having a problem with my Linux
installation. I installed Red Hat 7.2 on
, 4 a Toshiba Tecra 8100. The first 10GB
are with Windows 2000 and the last 10GB
with Linux. The problem is that I can’t mount
the Windows partition. The mount -f vfat (…)
command doesn’t work. How can I mount the
Windows partition?
LuisAugusto, via email
g f l|g You’ve not supplied us with any
V | 1 debugging information or error output,
F «». 1 but it could be down to your kernel
lacking ‘vfat’ support. You can check this with cat
/proc/filesystems, and if ‘vfat’ is listed, then you
have vfat support, otherwise you need to
recompile the kernel with support for such a
filesystem. The other likely causes is that you’ve
trying to mount the wrong device, and as you
didn’t give us that either there is little specific
information which can be given. The first Windows
partition, or ‘C’ drive, is generally /dev/hdal, so you
need to do;
mount -t vfat /dev/hdal /mnt/win
Which will mount the Windows partition under
/mnt/win, which must exist as a directory before
you try to mount it. You must also mount all
filesystems as root, unless they have an entry in
/etc/fetab which permit regular users to mount
them, although it should be quite clear that there
is a permissions problem otherwise.
More on modules
‘ I am using Mandrake 8.0 and am
trying to figure out how to load my
V modem modules every time at
startup. I am using the pctel modem 0.8.6
modules found at
linux/pctel.html. Whenever I wish to connect
to the internet, I must type the following lines
in the terminal:
insmod pctel
insmod ptserial
If you could tell me how to have Linux
automatically load the modules at startup, it
would sure help me. You don’t know how
many times I have started kppp and wondered
why the modem wasn’t found.
Do you any suggestion as to what I can do?
Thank you in advance,
Mike, via email
The simplest way to have modules load at
start-up is to add the following lines to
/etc/rc d/rc local,
/sbWmodprobe pctel
/sbin/modprobe ptserial
Alternatively, you can set up an alias in
/etc/modules.conf, which loads the ptserial module
when you access the TTY device for the modem.
Just add the following to /etc/modules.conf, run
depmod -a, and it should work automatically:
alias char-major-62 ptserial
below ptserial pctel
If you still have problems, there is a rather
extensive FAQ over at http://sayamindu., which covers module
loading and most other problems which you
may have.
Debian Woody system
* I am running a Debian woody system
: on an Athlon-based PC, and it runs
very nicely. However, Debian x86
binaries are all compiled for ¡386 architecture
and I thought it should be possible to get
some worthwhile improvements compiling the
likes of X and KDE for i686 architecture (much
like recompiling the kernel).
However, how do I set architecture and
other optimisations, either when building from
a tarball, or preferably after downloading a
Debian source package?
I know there is a Debian package that is
called pentium-builder but I can’t find
instructions on how to set the
DEBIAN BUILDARCH variable, or what options
it accepts other than pentium.
I have also found references on the
internet about setting CFLAGS, but again
without the basic instructions telling a newbie
how to do it. Can you enlighten me, or are the
gains not really worth the download and
compile time?
Another quick query I have is: can a USB
CD-RW (HP 8200 series) be made to work
under Linux?
I would appreciate any help,
Nick Baird
B f US c |:LAGS is an environmental variable,
f j | l which is used to set options for
F — 1 complication with a C compiler, such as
gcc or egcs. There are many options you can use
to optimise the binary it produces, by increasing
build time, but the ones you need are -mcpu, –
march and -m. The 686 CPUs are commonly
referred to as ‘pentium pro’ CPUs, and the
appropriate argument for each of the three flags
is ‘pentiumpro!
You may want to add something to your
-/.bash profile file, along the lines of:
export CFLAGS=”-manch=pentiumpro –
mcpu=pentiumpro -mpentiumpro”.
There are numerous other CFLAGS options to
optimise compilations, and you may want to have a
go with this to see how much benefit you get:
export CFLAGS=”-06 -fforce-mem -fforce-addr –
finline-functions -fkeep-inline-functions -ffast-math
-fstrength-reduce -fthread-jumps -fcse-followjumps
-fcse-skip-blocks -frerun-cse-after-loop –
frerun-loop-opt -fexpensive-optlmizations –
fschedule-insns2 -fcaller-saves -funroll-loops –
fmove-all-movables -fomit-frame-poimer –
mpentiumpro -mcpu=pentiumpno –
march=pentlumpro -mali0i-loops=2 -malignjumps=
2 -malign-functions=2”
A complete list of flags is found in ‘man gcc;
although there are, no doubt, many examples of
optimisations for specific CPUs available on Usenet
and on websites.
Rescue me
{1 messed up my fstab file while trying
: to do perform a function. I need a
I mini Linux distro for one floppy disk,
based on the 2.2 kernel, as my ext2 partitions
don’t support the 2.0 kernel.
Robert, from the forums
jgjf l | j ext2 is fully supported by both 2.0 and
9 ^ 1 2 . 2 , so you should be able to access your f „ « 1 existing filesystems via whichever
distribution you’re using which is based on the
2.0 kernel.
A rescue distribution, such as tomsrtbt (Tom’s
root and boot), may be of some use, as it fits
onto a couple of floppy disks and can be
downloaded from the Internet. It features a
good selection of tools that can be used for
system recovery.
However, you may not need to actually do that
to get your machine back up and running, as by
booting the machine into single user mode using
linux single at the LILO prompt, then changing
/etc/fstab from there using whichever text editor
you prefer; may sort out your problems.
LILO ill
f mt ‘ -1 have a dual boot system with
Windows He and Linux Mandrake 8.0
A , 4 – on separate hard drives. Sometimes
when booting it stops at LILO 21.7 and just
hangs. This happens about every third or
fourth time that I boot up. I can’t find any
reference to this exact error in any book or
manual that I have. Do you have any ideas as
to what I can do?
From the Forums
The first thing to do is to reinstall LILO by
^ I completely removing it from the MBR,
then reinstalling it
# /Sbin/iito S Ï Î t K Â S i ; –
Doing both as root If this still doesn’t solve the
problem, you may want to reinstall the MBR in
Windows using fdisk/mbr, then use a rescue disk
to get back into Linux and re-run LILO. As it only
does it on occasion, it’s somewhat difficult to figure
out exactly what is causing it, notwithstanding the
fact that you’ve got Windows Me installed on your
system with Linux.
New /usr
f 1 t*o months of an
install/upgrade/ break/install… etc.
I!«. 4 i cycle I finally have a computer with
everything I want; everything installed,
configured and working just as it should.
Stupid me though, I created three
partitions: root, /home and /usr. Except I typed
/src instead of /usr so I now have /src mounted
on an empty gigabyte partition and / is full.
I think I know mostly how to sort
everything out, but I’d really like confirmation
that I’m not going to break my system again
because the thought of all that drives me
completely round the bend.
I think I should:
1) copy the executables, cp, mv, mount and
unmount to my home directory.
2) cd /usr; mv * /src
3) umount hda7 (currently /src)
4) mount -t ext2 hda7 /usr
If I’m right then doing all this should move
everything to the right place and give me a
workable system.
The only thing I don’t know is how do I tell
Mandrake to mount hda7 on /usr instead of
/src as I get a horrible feeling that if I get this
stage wrong my machine won’t boot.
Thanks for any advice you can give.
■F V | Firstly, you want to reboot the machine
W k « int0 single user mode (type linux sir®le at
f _ ” th e LILO prompt), so you don’t have any
running processes which might have files open on
/usr Mounting the /dev/hda7 partition on /mnt,
then copy the contents of /usr over to /mnt using
cp -fra /usif ,’mnt
This will keep all permissions and file ownership, so
the new filesystem will not have everything owned
by root.
Once you’ve checked that everything’s copied,
you can safely delete everything out of /usr You’ll
then need to add an entry to the end of /etc/fstab
which reads:
/dev/hda7 /usr ext2 defaults 1 2
and then mount /usr and check that it’s all set up
right If it looks right, then you can reboot the
machine and it will be using your wonderful shiny
new I usr filesystem.
Path master
W I Under X the /usr/local/bin directory
isn’t in path when I start programs
llis„ 4 ! from GNOME menus or by using my
mini-commander applet. If, however, I type
‘echo SPATH’ in an Xterm (gnome-terminal) it
tells me that /usr/local/bin IS in SPATH.
Also, the /sbin isn’t in path either under X
when root.
From the forums
m V i t fully depends upon where the
» A s ‘/usr|,|oca|/tl’n/’ directory is added to the
r « , 1 PATH variable. Generally, adding it in
/etc/profile is the best way to go, as other locations
such as -/.bashrc or /etc/bashrc are not executed
when the parent process is bash. By doing ‘echo
$PATH’ from gnome-terminal, you’re just looking
at the PATH variable within bash.
Bash advance
# -, • I’ve just installed the JDK 1.3 with
absolutely no problems by following
1 . -4 the instructions that were supplied
with it. However, when it comes to setting
the PATH to runide automatically, I have
no idea which bits are to go where. I have
tried every conceivable option (as far as I
can see!). If I show you what my .bashrc
looks like, can you show me exactly how it
should look?
Current .bashrc:
User specific aliases and functions
Source global definitions
if [ -f /etc/bashrck then
. etc/bashrc
There is no PATH=/sbin… line as suggested
in the installation guide.
I would appreciate it if you could tell me
how this is can be done in an easy and
uncomplicated way.
Many thanks in anticipation.
Steve Murphy
The PATH variable is generally set in
/etc/profile, unless it’s specific to an
individual user You can set the JDK path
> the following:
export PATH=”$PATH•./usr/locat’jdkí^)¡n’,
in your -/.bashrc
Penguin free
if m 1 1 have a problem with a penguin logo
at kernel boot up. When I configure
| my kernel (2.4.3) with frame buffer
support, the documentation of the kernel
states that I’ll get a penguin logo for free. But
I get nothing after booting this new kernel.
Are there any patches to apply or any
configuration parameters I’m omitting?
Thank you,
Toni Soueid,
Wt V You only get the penguin if you are
IF 4 s runninB console ustn8 the frame
* 1 buffer (FB), so even if you’ve got FB
support compiled in, you have to tell the kernel to
use it This is in the form of a ‘vga- extension, the
values of which are listed within the FB
configuration documentation within the kernel
source tree. If you want to test a few out, set the
‘vga=ask’ option in /etc/lilo.conf, run /sbin/lilo,
reboot, and it will then ask you for a value. If
you wanted, say, 800×600 in 256
colours you would pass ‘303’ to
the kernel. Once you have decided
on the value that you want, you
need to convert it from a
hexadecimal value to a decimal
– 0x303 being 771. You
can then enter this in
lilo.conf as vga=771.
There are also a number of options you can pass
as the ‘video=’ parameter, such as the way it
buffers text for scrolling, which is covered in the
vesafb.txt file – Note that the ‘video=’ option
needs to be used as an append=”video=vesa:mtrr”
option in /sbin/lilo.conf.
You will need to ensure that you have
compiled in the fonts, otherwise the kernel will
just default to the normal VGA non-FB console.
Once you do have the FB up and running, you
can use the fbset program (available from fbset/int
1week.html) to both change the FB resolution
and colour depth, and display the currently
selected mode information.
Slouching Mandrake
If 1 *have recent|y started on the road to
1 r« Linux conversion and loaded
<4: Mandrake 7.2, sharing the hard drive
with my other OS. But the system seerns
rather slow. Is this because of the shared
disk space?
I have also had several problems while
trying to load GNOME. I chose to use it
alongside KDE and, while it loaded okay, a
gdm icon appears at the login screen and
demands a password which I was not
prompted to supply. How can I gain access
Roland Crump
Colour code
I recently read an article regarding customising the bash prompt There was a short
piece of code with it that set up your prompt to include cool ANSI characters with
colour. I edited my .bashrc and added the code, restarted bash to find the prompt did
not look as I had expected. The colour was there but the ANSI characters were nowhere to be
seen. I imagine that this is due to the font I am using in my terminal? How do I change it?
Lawrence, via email
t g l j j You need to use a font which supports the extended ANSI characters used within the prompt.
f | i Popular fonts are Nexus and Shine, both of which should be easily located via any popular
I 1 search engine by searching for nex6x!0.pcf and shine.pcf.
You then need to tell your font server that these fonts exist, and you can do this by copying the pcf,
or pcf.gz, files to /usr,0(11 R6/lib/X11/foms/misc/ and running mkfontdir from that directory. You then
need to restart the font server with /etc/rcd/initd/ xfs restart, or if the fonts are being handled by X
directly, with xset fp rehash. You will then need to tell your terminal emulator, be it xterm, Eterm or the
KDE terminal, which font to use which will be either ‘nexus’ or ‘shine:
Fancy prompts are nice, as long as you have the right fonts.
W V If Linux behaves slowly, it is more likely
ffl I I to be due to having an excessive number
f 1 of services running, rather than a fault
with the installation – lack of disk space certainly
would not cause it If you login from a shell as root
and type:
it will list all processes on the machine and you can
find out, via either man or rpm -qi package what
they do and decide if you think they should be
removed or not
As for GNOME, gdm is the session manager, so
is most likely asking for the password for the user
You can’t run both GNOME and KDE together as
their sessions conflict, but you should still be able
to run GNOME applications from the command
line in KDE, or vice-versa.
Kernel query
– – I’ve just installed kernel 2.4, but on
startup I get error message: “mount fs
w type devpts not supported by kernel”.
My question is, which configuration option
allows support of devpts?
seaodyssey, from the forums
I f H ‘devpts’ is a virtual filesystem which stores
I i l a l l the pseudo terminal devices, and is
f 1 usually mounted on /dev/pts. You need to
compile in support for ‘Unix98 PTY support; which
is usually kept at the default value of 256, as well
as insert a line in to /etc/fstab to make sure that
/dev/pts is mounted at boot time before anything
can try to use the PTYs
none /dev/pts devpts gid=S,mode=620 0 0
A reboot of the machine into the new kernel
should solve the problem.
The big freeze
1 1 I’ve just compiled a new kernel from a
r tarball and the whole process seemed
41 to go fine, but once I’ve copied the
bzlmage to the boot directory and used
linuxconf to get lilo to point to the new kernel
and then reboot the damn thing freezes at the
first line.
Jeremy Inglis
I f ’ I S As LILO booted the kernel, then it is
W A » Probably down to a mis-configured
f — * kernel. Start by getting the latest release,
which is 2.4.4, or 2.2.19 if you’re sticking to the
2.2 series, and start again from scratch with a
kernel configuration. Generally, any configuration
options which have been set when you did make
mrproper should be left alone, unless you are
100% sure that you don’t need them – such as
SCSI options on a IDE only system. Once you
have a machine that works, you can disable any
options which you think you might need, one by
one, then find out which one caused the machine
to stop booting.
Upgrade… shmupgrade!
If <% 1 * *>een experiencing a problem –
which I believe is rather common –
– since I upgraded from Linux Mandrake
7.1 to 7.2.
I have a Pll 350MHz CPU dual-booting with
Win 98, a Matrox G400 (which is supposed to
be well supported) and a 17-inch WYSE
screen. In 7.1 I had 1024×768 resolution,
sound, links to my USB Zip drive and all four
Windows partitions automatically set up.
I decided not to bother with the upgrade, I
just deleted the relevant partitions and did a
new install. All went well until it got to
configuring X. I had a choice of two versions of
XFree86, and I tried both (this involved reinstalling
from scratch each time). My Matrox
G400 was recognised and my monitor as a
screen capable of 1024×768 at 85Hz; but the
highest display rate offered was 800×600.
Hitting ‘Show All’ gave access to 1024×768
but on selecting that I got a black screen.
Finally accepting 800×600,1 let the install
finish at the third attempt.
When it booted up, I had no sound,
although it was showing it had correctly
identified my Soundblaster 64 card; all of the
links to my Windows drives were gone, also
the USB zip, and I gave up on resetting the
modem with my UK Linux account.
I went in to Drakconf and reset the
resolution to 1024×768, and it black-screened
on me. After a reboot it would not go to the
graphical login and startx said “time out error”
and refused to play anymore. So I wiped the
lot and went back to good old 7.1.
I will not upgrade any part of my 7.1
system unless I can be convinced that this will
not happen again. Perhaps I should wait for
version 8 which is in beta already and has
XFree86 4.something-better, KDE 2.1 and
kernel version 2.4.1 the last time I looked.
David Robertson
Mf 0nce you have a functiona| L’nux IF A H installat’on’there is reason to do a
F 1 mass update to the new release, other
than if there are major security or stability issues,
and there is no guarantee that whatever you install
next isn’t going to have it’s fair share of problems.
Apart from major things, including glibc, gcc and a
couple of others, everything else just needs
upgrading as, and when, problems are found.
Why upgrade XFree86 if it’s working fine
already? Why upgrade the kernel, apart from the
security issue in pre-2.2.19 kernels, when the
sound Is happy?
If you want to upgrade, then do it in stages.
Before you begin, back up all configuration files,
such as /etc/X11/XF86Config, and then install the
new version of XFree86. If it works, great. If not,
you can reinstall the original release from
Mandrake 7.1 and pop your original configuration
file back in. Of course, by the time they release
8.0, the kernel and lots of components will be out
of date.
The I has it
• ^ I have tried to install the Linux kernel
2.4, but make zimage fails and gives
* the message: “make cannot find a rule
for zimage”.
Do you have any advice?
Eric Oibert
W I B Like just about everything else In P A 11 L’nux’the command make is case-
‘ _ 1 sensitive. You need to use the rule make
zimage with a capital T to build a compressed
kernel image. If the resulting kernel is too large for
LILO to handle, you should try make bzlmage
instead. This will use the more efficient bzip2
method to compress the kernel rather than the
usual gzip.
if a 1 Every time I log in the following
message appears in the xconsole:
“linux kernel: cannot find map file”.
Then, straight after that, the following
appears after it in the messages file:
“linux kernel: No module symbols loaded”
Is this a serious problem, or can I simply
ignore it? Do you have any suggestions as to
what I can do to correct it?
Lindsay Francis
B F V The map file which your system is
W A « referring to is /, or
f _ 1/boot/, which contains all
exported symbols for modules.
From the message that you’ve been getting, it
does not appear as if your kernel has been
compiled with support for modules included, so it
won’t export any, as nothing will be able to use
them anyway. The kernel will work fine like this, but
it is often best to build a minimalist kernel and
have as much extra stuff, such as filesystems and
support for various types of hardware etc, loaded
in as modules.
Many drivers don’t need to be present all of
the time and, if they are compiled as modules, can
be loaded and unloaded on demand to save on
memory usage.
SuSE worries
f in I; I have enjoyed using Linux since I tried – if the SuSE distro several months ago.
– Since installing it on a dual boot
system, I have now upgraded my computer
with an additional IDE hard drive. I have
managed to install Linux on the new drive
(which I want to keep just for Linux), but when
I boot up I still get references to the old distro
I had installed.
This is still there on the original HD drive,
so how can I remove it, and stop it coming up
in the menu when I boot?
Jeff Long
Partition Magic can
reclaim disk space if
you’ve removed a distro. Confirm partition merge
; C : W IN 9 f t ? ” *
: 1,389.9 MB \ titm …….
………………………………………………………………; . BSPu f C : ‘W IN 9 f t ;
11,389.9 ME RAT32 I g B in r i
;Tbë’.ftvô p a rtitio n s win b e ccrrihmeci a s sn oy vn ab o v e. P r e s s
F in is h to co nfirm pa rtitio n m e r fle . ;
F ir s t çartitron £ – OATÀ-
B e c o n d partition, F B A C K U P
R e s u lt in g file s y s t em : FAT3 2 ’
Fo lde d n am e ; J o e . ‘ Æ I
I f f V You basically have two problems, one of
» À a which is flxing your boot mana8er- the
f _ * other Is to reclaim the space from your
hand drive. The boot problem is fairly easily fixed.
You don’t say whether you installed SuSE again on
the new drive, or which boot manager you are
using (grub or Lilo).
In either case you will need to edit the
configuration files. First of all, determine which
drive the old distro you wish to remove is on
(probably hda something, If it Is on the same drive
as Windows). Next, find the appropriate
configuration file. If you are using grub you’ll find
this at
/boot/grub/menu. 1st
For UlO it will be:
Using your favourite editor (e g. emacs, vi or
whatever) load up the file and remove the sections
that make reference to linux on the ‘old’ drive
For lilo this will be something like:
Make sure you remove all the lines between
the image= and the next Image info section. The
process is similar for grub. For Lilo, you now need
to run lilo from a terminal to update the settings.
When you reboot, the old partition should be gone.
Reclaiming the space from the old partition is a
slightly different matter, especially If you want to
use it under Windows. To be honest, If you are
unsure of what you are doing, you are better off
using commercial Windows tools such as Partition
Magic to reclaim the space and add it back onto
your windows partitions.
If you definitely want to do things the Unux way,
use Parted (,
but in either case, you should make sure that
you read the documentation thoroughly and
make backups, as you can seriously trash all your
data otherwise.
Problems with
kernel 2.4.0
f & 1 When builtlin8 the 2-4 kernel and I do
make xconfig I get the following error:
make: wish: Command not
make : ” [xconfig] Error 127
Any ideas? I’ve scoured the ‘net but with no
joy. I am running Unux Mandrake 7.2, currently
with kernel 2.2.18, through KDE2 and XF86
W V Wish is part of the TCL/Tk toolkit and is
B used by xconfig to create the graphical
I _ 1 configuration screen. You obviously
don’t have this Installed on your system. On
Mandrake these should be available in two
packages, one called tel and one called tk, and
should be on your Mandrake Install CD. If not, pay
a visit to
4 0 | U N I X | ANSWERS
More problems
with 2.4.0
f m 1 1 am trying to build a kernel from the
I – 2.4.0 source code. It works fine until
Rbk. – 4 1 enter ‘make zimage’, where I get
the reply:
make:No rule to make taiget
zimage’. Stop/,Vend1//
What’s going wrong?
Keith, via email
Wj l | j There may have been a mistake in the
V code. Make is case-sensitive: you need to
I ««. 1 use make zimage/ rather than make
zimage. In actual fact, you’ll probably want to do
make bzlmage instead. This compresses the
compiled kernel image with bzip2 instead of gzip
and so creates a smaller resultant ‘vmlinuz’ file.
The joy of 6
f ik l ve successfully loaded Netscape 6
but I don’t know how to make it the
default browser for when I launch
help files and the like. At the moment I still get
4.7(lsh) when I click on them.
Justin, via email
Wj I I You can either change the
■ j | l 7usr/bin/netscape’ file to run the
* — * Netscape 6 binary, either by moving it
out of the way and creating a symlink from the
NS6 binary, or you could reconfigure your MIME
types, in either GNOME or KDE, to use the specific
Netscape 6 binary, rather than the 4.7x binary.
How you do this will depend upon the desktop
environment you are currently using.
Nodules and 2.4
I’ve got a few problems with
Mandrake 7.1.1 recently upgraded
4 kernels to compiled the
network card as a module. The module was
made no problem. However, it fails to find the
module. This happens with my soundcard too.
Modprobe doesn’t see it either, even though I
can see the module sitting there.
Michael, via email
Wj Ijg The structure of the module directory has
I F A H ctlan§ed significantly in 2.4, and it
i 1 requires an updated version of ‘modutils’
in order to function correctly. There are a large
number of packages which require specific
versions in 2.4, including binutils, mount and
procps. Mandrake 7.1 will, probably, contain the vast
majority of the packages, but if you intend to run
2.4 release kernels, you need to go through the list
and ensure that you have the required releases.
f A l l am happy running Mandrake 7.2,
and have managed to get to grips
41 with KDE2 and the terminal too, to
some extent (I’m new to Linux, but some
experience with Unix in the past). I understand
that I can use the alias command to create
new commands I can run in the shell, but once
I close the shell, I have to type them all in
again. Is there any way to create the aliases
and have the computer remember them?
Callum, via email
The answer is that question is yes, you
can. But rather than set up a process to
run on startup, you should edit the
.bashrc file, which is run every time a bash shell
is created.
You’ll find the bashrc file in your SHOME
directory, that is, the home directory for the
account you are logged in under. Edit the file (it
has a full-stop at the start of it, which means that it
is normally hidden by file requesters and the list
command) in your favourite editor and add the
alias commands on separate lines. You’ll probably
find, running Mandrake, that some useful aliases
have already been set up like:
alias rm=’rm -i’
Which basically means that when you type: rm
fred’ the shell will interpret it as:
rm-i fred-
This is a very useful feature (in this case, it means
that you are always queried when removing files),
but otherwise you have to be careful that you don’t
assign an alias to a name that already exists –
bash won’t check this, and, if it happens, you’ll be
unable to use that command from the shell.
And there’s more
I’m running SuSE 7.0 and trying to
t compile a 2.4 kernel. When I enter
Msik. make bzlmage, I get the following text
on the screen:
gcc -wall -Wstrict -prototypes –
02 -fomrt-franie-pointer -0
In file Included from
from scripts/spfit-tndude.c:26:
lirtux/errno.h: no such file or
Error 1
Wj W This is a problem is to due to where you
W k « *lave unPacked the kernel source code,
r »«• *The default location for this is
/usr/src/linux and some of the header files expect
the kernel source to be there. The usual practice is
to create a symbolic link from that path to
wherever you have actually unpacked the source
code. This allows you to work with several kernel
source trees at the same time more easily.
Login as root or gain superuser privileges with
su, and cd to /usr/srt If you already have a symlink
called ’linux’ here remove it with
If there’s a directory called ‘linux’ here, move it to
another directory with, for example:
mv Bnux linux_old
You are now ready to unpack the kernel source
tree Enter
tar zxvf <path>/linux-
where <path> is wherever the kernel archive is
located. It will be something like
Rename the newly created Linux directory to
something more helpful with:
mv Bnux kernel-sounce-2.4.0
and create the symlink with:
In -s kernel-source-2.4.0 Bnux
You can now cd to this directory and follow the
usual build procedure.
Losing your memory?
I first installed Linux a couple of years
ago, and always used SuSE in versions
6.0,6.2 and 6.4. A few weeks ago, I
tried Mandrake 7.1. and found this to be very
easy to install. It presented no problems,
except that I always felt I was missing the
control that I had with SuSE.
I have recently installed SuSE 7.0, which
was very easy, and was done inclusive of
formatting the partitions. The only problem is
that my PC has 96MB RAM, but SuSE only
recognises 64MB. How can I let the system
know that the total RAM is 96MB?
B.D. Roma, via email
We like it when we get a simple question
to answer: at the lilo prompt do:
Linux mem=96M
or, alternatively, add
to /etc/lilo.conf, then run /sbin/IHo.
Big drives
w – 1 1 have a 2GB Seagate drive which I’ve
just installed in an old tower (486),
■41 hopefully to use as some form of
server. The problem is that this old piece of
junk has a 520MB drive limit Can Lilo handle
this problem like the Seagate boot manager, or
do I have to have that running, then boot Lilo
to start Linux?
Annabel, via email
W V The drive limit is probably a BIOS
■ A ■ restriction – can you update your BIOS?
1 ___ * This won’t effect Lilo or grub or whatever
else you want to install.
Small console-ation
1 1 am very new at this and have only
I started using Linux today. I have just
I installed Linux Mandrake 7.2;
everything went well until Linux stopped
loading up KDE (the thing where you choose
which user name to use and whether to use
GNOME, KDE etc.). I was wondering how to get
h \
Tape drives are very
handy for backup
purposes, but your
backup software is
unlikely to find them
unless you configure the
kernel to use them!
back to this screen or to get KDE to load up. It
just keeps loading up to the DOS ‘type’ screen,
which isn’t very helpful for new users.
Jonathon, via email
I If you login from the text mode using the
I i * root user and the password you supplied
f «»« 1 when it was installed and open
Yetc/inittab’ in a text editor such as emacs or vi,
you can change the line reading:
and than save it If you then do init 5, it should
then start up with a graphical login, which will be
the default for the next time that you reboot
your machine.
Triple boot
Most people have a dual boot system,
but I want to set up a triple-boot
\ •* system with Windows 98, Windows
NT and Linux. I have plenty of drive space, but
I’m wondering how I’ll be able to boot into all
three systems. Several friends have told me
that it is possible, but I’ll have to boot Linux
from a floppy.
Carolyn, via email
m 1 1 Not necessarily so. The easiest way
V i l around this is to install Windows first. If
* _ “you subsequently install Linux, you can
use LILO to either boot from NT or Windows 95.
LILO should detect the presence of both OSs, or
you can manually edit Lilo and add an entry for
NT, such as :
# Windows NT boot
label=Windows NT
# End Windows NT
Tapes of wrath
W gk 1 Having read a article recently on
* backups, I have downloaded and
A- installed the RPM for Dump. I would
appreciate it if you could advise me as to how
I can configure Dump to work with my IDE
tape drive.
John Wallis, via email
■p f i Aha, the trick here is that you don’t. You
S k « confiSure your tape drive to work with
I _ 1 Linux, then use Dump to dump to it as a
device. For example:
dump -Ou -f idev/tapel /home
where tapel is whatever your tape drive is
configured as.
If you haven’t yet configured your tape drive to
work under Linux, you’ll probably need to do a
kernel recompile and include IDE/ATAPI TAPE
support, which can be found in the IDE/ATAPI
Block devices section.
Silence is golden
§ | ‘ I’ve been using Linux for several
-1 months now and really beginning to
-4 get to grips with it. I like using the
shell, but one thing that really annoys me is
the console bell. It rings all the time – when I
hit TAB to complete a filename, when I try to
scroll outside of a buffer, and so on. How do I
turn the damn thing off?
Dave Roberts, via email
i f f I I There are several ways to turn off the
IF k ® bel1, the simplest and most effective
F — 1 probably being to physically disconnect
your motherboard’s loudspeaker!
It is also possible, however, to modify the pitch
and duration of the bell for a particular console by
echoing some control codes to that console (have
a look at the Linux Console Controls section of the
console_tools manpage for more details on these
codes). You can turn off the bell completely by
setting its duration to 0.
This can be achieved from the shell with
the command
echo-e “\033t11«r
The -e’ switch here tells echo to interpret what
follows as an escape sequence, the quotes are
required so that the shell doesn’t parse the
semicolon as an instruction separator and ‘\033’ is
the octal (base 8) code for the ESC character If
you add this command to your ‘/.profile script,
then every console that the shell runs in will
be silenced.
It is also worth pointing out that GNOME’S X
terminal emulation has a configuration option to
silence the terminal bell, while with KDE’s terminal
you can turn it off in the KDE Control Center in a
similar manner to the above process, by setting the
bell duration to zero.
Ilore Mandrake malarky
I have installed Mandrake 7.2 onto my
I computer (a Compaq with a 6GB hard Ik. •* drive, 128MB RAM and an AMD
processor) and followed the instructions as
best I could.
However, this has given me something of a
dilemma. The machine, along with a laptop
is used as a business tool and also as a
domestic machine for the family. The
implementation of Linux has introduced a load
problem in that during the sequence the user
is presented with a short menu of operating
systems to choose from: Linux, Fail Safe,
Windows or Floppy.
This is fine except that the menu times out
after a few moments and defaults to Linux –
which is not very practical when one s mind is
elsewhere assuming that the load will offer the
usual Windows interface.
It will be a while before I can totally adopt
Linux and this niggling and inconvenient
situation will cause some bother. Is it possible
to rearrange the menu so that the default
becomes Windows?
Some observations:
1) I use two mice – a wired in or infra red
remote. Each has a wheel. None of the options
for inclusion during the configuration section
of the load procedure would accept these
devices. I got the USB mouse off the laptop
and it worked OK.
2) The method of getting online (I use
Netscape 4.6) failed completely. I thought that
perhaps I had done something wrong but it
seems awkward.
3) Is it possible to drag some of my files
from Windows into the Linux utilities (for
Follow our guide and get your
Linux box to stop beeping at you.
example, my business files such as letters
and spreadsheets)?
4) Is there a good general reference book I
can buy about Linux?
I would appreciate any help.
Perry, via email
The problem you have with booting is
easily solved. First, you’ll have to be
logged in as root. Then open the file
/boot/grub/menu.lst with a text editor – it doesn’t
matter which one, KWrite will do fine Near the top
of the file you’ll see a line which reads line
default 0
This tells the boot menu which is the default option
in the menu. In your case, you want to change the
O’ to a ‘2’ to make Windows the default (the count
begins at 0, so the third entry is Identified as 2).
Save the changes, reboot your machine and it
should default to loading Windows.
As for your other points:
1) You need to supply more information here
for us to help. What exactly are the types and
models of the mouses you tried.
2) Again we could do with more information.
What type of modem do have? If it is an internal
PCI model (or Winmodem) then it is probably not
supported by Linux.
3) Yes. First you have to tell Linux to access or
mount the Windows partition on your drive. Again
you need to be logged in as root.
When you mount a drive, you need to mount it
somewhere within your existing filesystem. Typical
places are /cdrom or /mnt/cdrom for the CD-ROM
drive /floppy or /mnt/floppy for the floppy drive, etc.
For your Windows partition, we’ll create a directory
called /mnt/windows for it to get mounted on. First
check whether this directory exists already. Enter Is
/mnt. This will list the contents of the directory
Annt. If there’s not a directory in there called
windows then create it with mkdir /mnt/windows.
Okay, you’re ready to mount now. Enter mount
/dev/hdal /mnt/window -t vfat.
This tells Linux to mount the first partition of
your first IDE drive on the directory /mnt/windows
and that the filesystem used on this partition is
vfat’, which is what Linux uses to read Windows
FAT filesystems.
You should now be able to browse your
windows drive in the file manager and drag and
drop files on to your Linux drive. Whether you can
open those files in any meaningful way when you
get them there is another story.
Instead of typing in that long mount line every
time you need to access the Windows partition,
edit the file /etc/fstab and add the line /dev/hdal
/mnt/windows vfat rw defaults,user noauto to the
bottom and save it. You’ll then be able to mount
the drive with mount /mnt/windows.
4) There are hundreds of Linux books out
there. For the beginner, we quite liked Linux in Easy
Steps (ISBN 1-84078-072-X).
Stopped clock
j I’m having problems with the onboard
| clock. I’ve set it to GMT, GB but the
I time is alway wrong. When I make
any changes to the system, it keeps telling me
that the system time is wrong. How do I sort
this? My computer is a Toshiba Satellite 4030
cds laptop.
Josh, via email
| |S I® You can change your time settings by
| | 1 running “timeconfig! This will allow you to f mm is e t the hardware time and the system
time zone – you should then be able to set the
actual time displayed. Another utility you could use
is timetool, if you have it, which will allows you to
set the system time.
If your clock is not working, you may have
difficulty adjusting these. A common cause for this
is if the power c£ll which powers the clock has
become flat (e.g. if your laptop is not in frequent
use). The best thing to do in this case is to plug the
laptop in and leave it for a long period of time (e.g.
a day) or consult your technical manual.
Vanishing Alias
I I have got the hang of using the Alias
t command and I’ve set up some very
I useful ones, but of course, every time
I restart Linux I have to set them up again. I
have thought of adding them to the inild files
but I guess that would be wrong, and also
unlikely to work, because that’s run as root
isn’t it? Any words of advice here?
Wf V | You are right that you shouldn’t put them
v A i in with your init scriPts ~ the c° rrect
f ««. 1 place for this Is the bash config file
(assuming you are using Bash), the .bashrc file.
You may not have noticed this file because it is
usually hidden by the system (it begins with a ‘.’)
but it lurks in the home directory of every user
The .bashrc file is just a script and it is run
every time a bash shell is generated. This is
important, because it means that anything
specified here applies to every shell that Is opened,
including ones that are spawned as the result of
you running scripts.
As the .bashrc file is just a script, you can edit it
to do anything you like. There are some commands
in there which are best left alone, but you can tag
your aliases on with the others which will
undoubtedly already be there.
There is also another, slightly less useful file
associated with a bash session – the .bashjogout
This file Is not always automatically created for you,
so you may have to just generate it with a text
editor and save it in the same place as the
bashrc file.
As you might imagine from the name, this
script is executed whenever you logout from a
bash shell. It can at least be used to clear the
screen, or perform any specific clean up tasks
before the next user logs in.
j I have been running Linux for a while
s f |} and I want to know how to set up a
f t , 8 drive to use supermount?
Carrie, via email
HT f l Supermount behaves just like any other
W k 1 filesystern’ except it automatically mounts
» __ ith e filesystem when you access it
mount -t supermount -o
<mpt> <mpt>
would be an example supermount mount
command, with <superfs-options> containing
options for the supermount, such as filesystem*
and dev=. <subfs-options> contains options for
the subfilesystem, such as the floppy disc or
CD-ROM. <mnt> is the mount point for the
file system.
This is translated Into a /etc/fstab option, which
is similar to:
<mnt> <mnt> supermount
<superfs-options>, ~,<subfsopt
»ns> 0 0
So, if you wanted to mount /dev/fdO on /mnt/floppy
you might use
/mntifloppy /mnt/floppy
supermount filesystem=ext2,
dev=/dev/fd0,— ,user,noexec
a kernel you h a v e compiled i
Do you know where you’re going
– or where your source is going?
You are allowed to define the default
boot mode of this computet
Lite | M ode] Configuré ULO defaults (UnuK Boot loader)
i LILO imux configurations
LILO other OS configurations
default boot configuration
Add to LILO a new kernel
Jtf l j j Okay, this isn’t so hard. If you have Linuxconf on your distrbution (and most people do), you’ll
if you click on Boot mode (at the bottom of the panel that opens) you get to change a
» oea, 1 lot of ULO stuff To change the time you get to type in your OS choice, click on “LILO Defaults
and enter the time in the “prompt timeout box”
To change the default OS, click on Change Default boot configuration, and pick the OS from the list
that appears. Then save these and you’re away
If you don’t have Linuxconf, you’ll probably need to manually edit the lilo.conf file. You’ll find this in
/etc, and you can just open it in a text editor to alter it. You’ll find the values you want to change
preceeded by “default“ ‘ and “timeout=” respectively.
LILO defaults
My wife is rather angry with me for
several reasons, but one of the
most pressing concerns LILO. I have
a dual-booting system, so I can run Linux
and the rest of the family can run some
other OS. The trouble is, they complain that
i’ve made it too hard to boot into, er, that
other OS, because they have to watch like a
hawk and type in, um, a specific word at
the right time.So basically, my question is,
how do I change my LILO set-up so a) Linux
is no longer default and b) I get longer to
make up my mind.
Dave, via email
Linuxconf is useful for all sorts of tilings,
including sorting out LILO
Subject page Subject page
USB networking 50 SlowNet 55
NIC’s missing module 50 Fat pipe problem 56
Dial-up solutions 50 Use Linux! 56
Lost in time 52 Network knowhow 57
Modem won’t work 53 Sick squid 57
America offline: problems with Student network 58
AOLs proprietary protocol 53 The old favourite 58
Connection query 53 No net 59
Return to sender 53 Proxy browsers 59
Nearly there! 54 Live and clicking 59
Getting access 54 Speed daemon 60
No clients 55 Fat pipe concerns 60
Networking ■
f I
Subject page Subject page
Directing traffic 60 Taking a Gnap 67
Upgrade now! 61 Not networking? 67
Modem problems 61 Password perils 68
ISP catch-22 62 Modem misery 68
ISP suggestions 62 Identity crisis 68
Feeling flushed 63 Get it right 68
Traffic master 63 1 want to be me 69
Redial 64 Modems, printers and more 69
Telnet 64 Networking 70
Modem solution 65 Ethernet 70
Net gateway 65 Checking the mail 71
Reader response 66
ANSWERS | l l l l l l 1 4 9
USB networking
1 I have ordered via mail order Belkin’s
I USB Connect, which will enable me to
i network my laptop and my desktop
PC under Windows. Both my laptop and my
desktop are set up as dual boot systems,
running SuSE 7.3. Would it be possible for me
to network my laptop and desktop under
Linux via the USB connection? If so, how
would I go about it?
I would appreciate your help in respect of
this matter.
Yours faithfully,
John Wallis
Wj l l Linux supports a number of USB based
W A 1 Ethernet NICs, but unless you know
f _ 1 which chip set the NIC has, it’s difficult to
say if it will work or not. You may need to upgrade
your kernel to the latest of the 2.4 series, so that
you are sure that you have the most recent
versions of the modules and that you know that
anything which may be available is not missing. If
you still have problems, lists
all of the Linux USB drivers, so there may be links
to Ethernet modules which are not included as
part of the vanilla kernel tree.
NIC’s missing module
f jg, 1 1 am running SuSE 7.1 with kernel am trying to install a Netgear
v.;s, 4 . FA311 Fast Ethernet Card on my
system (Pill 750, 512MB RAM, 13GB HDD) I
have read that it requires the natsemi.o
module which I compiled into the kernel. But
every time I reboot it isn’t loaded, worst still I
spend about half an hour trying to get YaST2
(YaST doesnt even show the module at all!) to
activate the card. I have done so many things
that I am losing track of them – they include:
1. Editing /etc/modules.conf – no joy
2. Removing the card from YaST2 and
reinstalling – getting several error messages
about “Device EthO wasnt started.”
3. The Last thing I tried was insmod,
modprobe and Ismod – which did get it
installed, but again a reboot de-activated it
and I can’t get the thing up again.
When the NIC eventually decides to load it
works fine (except for the fact I forgot to
compile SMB support – I don’t think that’s the
problem though!) and I can ping my LAN and
get onto the internet.
All help greatly appreciated!!
Regards, Craig Wilson
Wjj V You really have two options. If you
I f k 1 wanted’ you could rebuild your kernel,
I _ 1 Including natsemi.o as a Y option, so
you don’t need to deal with loadable modules.
Your ethO device will be setup automatically, and
you can just use YaST to setup the IPs and such
like on it
If you want to stick to the modular system,
which is usually a lot more organised, you need to
edit /etc/modules.conf, and add the following:
alias ethO natsemi
Then run depmod -a, then try to ifconfig ethO The
only problem you may have is that if SuSE decides
to rebuild your /etc/modules.conf from a database
at boot time, or after you’ve run YaST. If that
happens, then there should be an option within
YaST to add entries to /etc/modules.conf, although
you must remember not to include the ‘.o’ in the
module name.
Using modprobe will only load the module
while the machine is running, and once you
reboot, the module is unloaded until you try to
load it again. By using /etc/modules.conf, the
kernel will automatically try to modprobe ethO
when you perform an operation on the ethO
device and it does not exist As we’re using an
alias, when it tries to load ‘ethO’ it will modprobe
natsemi instead, which will load the device
for your NIC and provide the ethO interface
for configuration.
Dial-up solutions
{ I recently got really annoyed with
f Windows Me, it didn’t like having to
} separate the profiles for my family
(we each have our own account), so I replaced
it with SuSE 7.2 personal. I’m very pleased
with the system and it works like a dream, well
for the things I can do. I do have one problem,
how do I go online? Presuming my modem
Networking ■
g??. – GKU project Fortran Coup ¡1er (i»Q. 5. 2M>
g?? Copt ¡or» ! f i tenane Ü.
The irifornation in this nan page is an entrad;iron the
fu ll docunefitat ion of the’GNU Fortran conpiler (version
0.5.2M), and is 1 in ¡-ted to the Meaning.of sone of the
opt ions. . – , .. _
This nan page ; i S’not op to/date, since no volunteers want
to Maintain it, I f you find a discrepancy between the tian
page and the software,’ please check the Info f i le ; which
is the authoritat ive docunentat ion..
I f , we find that the .things, in this «an page that are out
of date cause significant:confusion or conplaints, we will
stop distr.itiiJt ing the nan page. The alternat ive> updat ing
works with Linux what service provider will
also work well with Linux?
I have been learning to program with
Windows and so was happy to find a copy of
Kylix on a magazine coverdisc, but the website
does not seem to work so I cannot register it
(this was before I ditched my Windows
partition) and it doesn’t seem to be able to
defer registration. Can you help?
Martin Heathcote, via email
I f f I I As a general rule of thumb, all external
1 s e r i a l modems will work under Linux, but
f a«* 1 if you have an internal PCI modem then
it is quite likely that it is a software driven modem
which will not work correctly under Linux. A
hardware modem will appear as a serial port in
Linux, so by running dmesg I grep ttyS, after the
machine has booted up, you can get a list of all of
the serial ports on the machine. It should be quite
obvious if you have the right number, so if you are
one short, then you have a winmodem. There are,
in fact, some drivers for specific winmodem
chipsets at, but your
mileage will vary and it’s quite likely that it won’t
work at all. If you have a USB device, or are
thinking of heading in that direction, then
information on USB serial drivers is available at In general, if the modem is a
real modem, (some USB devices are software
modems in disguise), then it will just behave like a
serial port too.
The GNU Fortran
compiler g77 has a indepth
man page for all
the Fortran fanatics
out there.
Once you have a modem which actually works,
you can pick out an ISP from one of the many
which exist All ISPs, apart from AOL and
CompuServe, should work under Linux, and indeed
anything which uses the standard Windows Dial-Up
Networking system to connect you to the Internet,
will work happily. The only caveat which you may
face is that many ISPs distribute CDs for their signup
which, of course, only work under Windows, so
you may want to investigate those which allow you
to sign up online or over the ‘phone. You can use
gnome-ppp, wvdial or kppp to configure the dialup
connection under Linux, the one you pick
depending upon what you have installed and what
you are using, and they all have options to enable
non-root users to initiate the connection to the
net. Which ISP you choose to use will completely
depend upon your requirements and budget, but
any arguments which people have for, or against, a
specific ISP, such as cut-offs or port blocking, will
apply equally to connecting under Linux.
As far as Kylix is concerned, you can register it
either on-line at, or by
using the kreg utility:
export LANG=en_US
source /usr.local, kylix/bin/ky lixpath
Replace /usr/local/kylix with the proper path to your
kylix installation. The command line based
registration will only work with Kylix 2, so those
with Kylix 1 have to stick to using the website to
register Kylix.
You cannot be serialist!
If you are short a serial
port then blame the
• 8: IHpn Sun ttty 25
daw¡dr sudó set se r ia l /deu/tty50 -a
/deiVHySe/ Line 8, URRTs 16550ft, Port: 0H03f8, IRQ; 4
6aud_base: 115206, close.delay; 50, divisor: 0
clos¡ng_uait¡ 3080, closingj^aH2: inf inte
Flags: spd_nornal skip J e s t
I S Ü ^ W : 8s IHpn Sun Now 25
daw id: i sudo se tse r ia l /dew/ttyS1 -a
/dew/ltySI, Line 1, UflRT: 16550ft, Port: 0H02Í8, IRQ: 3
Baudjsase: 115200, close.delay: 50, divisor: 0
closingj4ait: 3060, closing_Mai*2: inf inte
Flags: spdjiornal skip J e s t
daw id; 1 1
8 :14pn Suri Now 25
Lost in time
I would be grateful if you could
I , i steer me in the right direction to cure
4 a problem.
History: I installed SuSE 6.4 three times last
autumn (KDE and Developer units) just for
practice, without any problems I couldn’t
handle as a beginner. A month ago, however, I
got too big for my boots and lost chunks of
the installation when trying to repartition, and
I had to re-install with the ‘use whole disc’
option. The problem with the mailer occurred.
Immediately after this, I installed a new bigger
hard-drive and repeated the installation with
the same result. The problems I have are:
1: When my mail arrives, it has the correct
‘subject’ and ‘sender’ details but the date is
sometime in March 1973 and the time is
random. If I click on a message to display it,
the header shows the correct date and,
probably, the correct time. If I click on ‘date’,
the inbox is reorganised and the highlighted
message is now dated correctly. But after
rebooting, the date goes back to 1973.
2: If I send a message to a newsgroup,
the ‘sender’ column shows the correct date
and time, the ‘date’ column shows a date
in 1970, and the ‘lines’ column shows my
name, my user name and my computer’s host
name (oldbuffer@Rosecott), and the ‘subject’
is correct but has the ‘Locked-keep in cache’
icon. If I click on the message, the header
shows the correct time and date, but ‘from’ is
given as oldbuffer@Rosecott instead of my
address <> (just in case
you’re getting the wrong one) and the
message body contains the additional lines:
NNTP-Posting-Host; 195.8.xx.xx (195.8.
is presumably Clara); NNTP-Posting-Date:
correct date and time; Lines: 0-not the
previous practice.
The KMail problem makes it more difficult
for me to sort recent, and find older,
messages, and krn makes me look a jerk,
which is true but I don’t like to boast. Have
you any ideas?
Ken Parkes
This seems like a library problem, or a
IF A » °f KMail to be able to work
I mm, l properly, for whatever reason. Reinstalling
KDE, or upgrading to KDE 2.2, is most likely the
best option, and would hopefully rectify your
situation in either circumstance. Since the date
appears as 1970, that is indicative of a parsing
failure which is, presumably, returning ‘0; rather
than the correct UNIX timestamp. ‘O’ seconds is
1/1/1970, or the epoch, and this is most likely the
fall back for failure to interpret the data properly.
As you’ve done three installations, it would
seem that SuSE 6.4 is not at all happy, so you
may want to choose to have another go with SuSE
7 or a different distribution, and see if you have
more success.
Networking ■
Modem won’t work
I am happy with my Alcatel
SpeedTouch USB modem, but it only
runs under Windows. I just cannot get
it to work (I am using Mandrake 8.0).
HenrikJorgensen, Belgium
As you did not give specific information
as to your problem, it’s somewhat difficult
to provide a complete answer which will
allow your ADSL bridge to work properly under
Linux. However, you could check out the
documentation, regarding the Alcatel SpeedTouch
device at
America offline:
problems with AOL’s
proprietary protocol
I am an avid Linux user and I have a
problem with a dependence on
Windows. I have to use my Windows
machine to access the internet because my ISP
is AOL (I use them because they do not cut me
off every 2 hours).
Unfortunately, I know of no ways to get
AOL to work under Linux.
Daniel Snowden
m I S AOL uses a proprietary protocol for the
W A 1 serial connection’ so it,s completely
I _ 1 impossible to dial-up to AOL using a
Linux box. Notwithstanding the recent reports that
someone cracked the closed protocol for AOL, it
may well be some time before someone produces
software for Linux to take advantage of this. Even
then, it will certainly be in breach of AOLs Terms
and Conditions, and they’ll most likely take it upon
themselves to ban all users from the service who
neglect to use their own software.
There are many other ISPs out there, such as
Demon, Freeserve and Nildram for example, that
have unmetered services that do not cut you off
after a couple of hours. These are considerably
more expensive than AOLs £14.99pcm (except for
Freeserve) but they do offer a service you can use
without expecting them to disable your access for
breach of contract PPP is the standard system for
a dial-up internet connections, but that is not the
way AOL works.
Connection query
‘■ £ | I’ve got Progeny Debian installed and
* I cannot seem to get connected to
* BTIntemet. In KDE I get the message
‘Exit status:1’ and in GNOME the pppd just dies
on me. I have managed to connect with SuSE
6.4, Caldera 2.4 and Red Hat 7.x so I know I’m
doing something not quite right. I installed
wvdial 1.42 and get the message:
—> Carrier detected. Waiting for
prompt.fieturmng not ok!!—> Disconnecting at
Owen Kennedy, via email
The first port of call should be to check
the PPP configuration, to ensure you’re
using the correct /dev/ttyS file and that
you have the appropriate permissions to read and
write to it The fact that wvdial knows there is a
carrier and that it gets as far as it does would
suggest that there is something a little more
interesting going on. I would be tempted to use
minicom, using exactly the same options as wvdial,
to see if you can query the modem and have it
dial-up your ISP properly.
If you can query the modem, but it won’t dialup,
then it’s an issue with your modem or the
phone line, but if you can’t query the modem at
all, you’ll have to ensure that you’re using the
proper /dev/ttyS device for your modem. It may be
useful to chmod 666 /dev/ttyS? for the time being,
so you need not worry about having the wrong
permissions on it
Return to sender
1 1 have moved to Egypt and I have a
| problem with my Linux box and the
| configuration of Netscape.
I’m using version 4.75, and if I send an
email to any user from my ISP
(, it works fine. But
as soon as I try to email to another address,
Netscape sends the following warning:
Relaying denied
Please check the message recipients.
I’ve tried many different addresses and
always found the same problem.
Can you help me?
Thanks in advance.
Michel, Egypt
Wjj flg This is because you’re still trying to use
W A H your ISP’s mail server, rather than the
i ■«»» 1 one for your new ISP ISPs set up their
relays so that people not on their network cannot
send messages through them, so as you are no
longer using them for access, you will not be able
to use their mail server You should change the
SMTP server for outgoing mail within the Mail
configuration section of Netscape. If you are
sending mail through something like qmail or
sendmall which then relays mail on-to your ISPs
server, you will have to reconfigure that to use the
new mail server, then restart it for the changes to
take effect.
Nearly there!
I’ve been working at it for a while,
| and now have my connection to
Demon nearly working. The only fly in
my ointment is that when online the system
doesn’t pick up the email in the queue. I’ve
looked into everything I can think of:
1) Is sendmail running? Yes
2) Can I “telnet localhost smtp”? Yes
3) Is the firewall blocking anything? No
4) Is tcpwrappers configured to allow
sendmail connections by Demon? Yes
So what gives? As always Caldera worked
first time, no bother, but Red Hat 7.1 just
doesn’t want to play ball.
Paul Reece, North Yorkshire
W 1 1 Demon’s SMTP punts connect to your If A « machine on the external IP allocated to
i 1 you by Demon, so checking that
sendmail is listening on localhost isn’t of much use.
When your Demon connection Is up, try telnet
<username> 25 and see if
sendmail is actually listening on that interface. If It
is not listening, you will need to edit file files in
/etc/mail/, and of course, check to ensure that your
machine won’t be operating as an open relay.
As you’ll now be realising, Sendmail isn’t the
easiest thing in the world to set up, and if you just
require basic mail collection, postfix or qmail may
be a better option.
Getting access
I am always looking for hints and tips
and I am particularly interested in
I k , . puting my Linux distro on a floppy, for
when I move my server system to another
computer. Anyway, what I have read about this
so far seems promising, but I still have to set it
up to work as a router/gateway and firewall.
I am connecting to the internet using a
modem. My IP address is dynamic and I have a
dynamic DNS service which is automatically
set to my IP.
Basically, I need PCs on the LAN to be able
to connect to the internet through the server
(I’m using socks at the moment and it works
fine). After that is set up, I then need to
configure forwarding in some way, although
I’m not sure how to do this.
My LAN consists of three PCs, PCI and PC2
run Win98SE and PC3 runs Win95
I want all ports >768 forwarded to PCI, so
that PCI is effectively on the internet, able to
do things like IRC DCC, send files on icq, host
games and so forth.
I also want specific ports (any port number
0 to 65536) to be directed to ethO so that
certain services can be used from the Internet,
some of these ports will be accessible from
any PC on the ‘net, while some (i.e. telnet) will
be restricted to a list of predefined IP
addresses. It should deny any access to nonspecified
ports <768 and ports which are
restricted to certain IPs using stealth mode.
I think that’s everything I need, but the
tricky part is probably setting up the Windows
pc’s, which have fixed IPs which are:,, and the server is
Paul, via email
jW V I think you’re a little confused as to what » A « exact|y you need to do to provide access
r 1 for internal machines, and going into it in
depth is a little out of the scope of the Answers
Networking ■
section. However, we’ll look at the basics and you
can follow it up with the extensive documentation
available on the internet.
Firstly, you need to install Linux 2.4 on your
gateway, the latest of which is 2.4.8. You may need
some updates for your distribution, if it was
released before 2.4 was on the go.
Once you’ve done this, and set up the
networking on the machine, the rest is really
quite straightforward.
On each of the Windows machines, set the
default gateway to, and the DNS IPs to that
which your ISP should have given you for your
account. You should be able to ping from
each of these machines.
Next, you need to setup IP Masquerading on
your Linux machine, so that the three Windows
boxes can connect to the outside world. You do
this using iptables:
iptables -t nat -A POSTROUTING -o pppO -j
iptables -A FORWARD -i ethO -o pppO -s -j ACCEPT
iptables -P FORWARD -j DROP
The fact that you want to forward ports 0-768 to
one of your machines makes little sense, as IRC
DCC, ICQ and game servers use high IPs, rather
than low port numbers, which are 0-1024.
Forwarding specific ports to a machine is done
using the DNAT option in iptables, so if you wanted
to forward a specific port for a games service from
the gateway to an internal machine you would do;
iptables -t nat -A PREROUTING -p tcp -I pppO —
dport <port> -j DNAT —to 10.1.11
Where <port> is the specific port you wish to
forward to your internal machine. Since IRC DCC
uses a completely random high port, it’s next to
impossible to securely allow DCC transfers without
opening a whole load of ports on the gateway and
forwarding them in, which would impact on other
services. There is, however a connection tracking
module for netfilter which allows IRC DCC transfers
through, although it’s very much in development
and you may not have much success with it.
There are a couple of stripped-down distros
which are designed specifically to offer these type
of services, including SmoothWall and Mandrake
Single Network Firewall to name just a few, there
are many others available.
More information on netfilter and iptables is at and
has a number of HOW-TOs pertaining to IP
Masquerading and simple networking.
No clients
I have SuSE 7.1 set up on my PC and
want to run dhcp from it The clients
are a Windows 2000 machine and a
pair of Windows 98 ones. I have set up my
ip range on the SuSE box but the clients
don’t find it.
From the forums.
M • Assuming you have set up
1 1 1 /etc/dhcpd.conf appropriately, you just
( . 1 need to run ‘dhcpd’ as root to start up
the DHCP server.
/etc/dhcpd conf should look something along
the lines of:
subnet netmask {
option routers;
option broadcast-address;
option domain-name-servers
> is the best place to stan when
your X server isn’t playing nice – Just make sure
you have the latest release first.
If it doesn’t like your configuration, it will bail
out and tell you what the problem is. You will, of
course, need to enable dhcpd at boot time, using
the run level editor in SuSE.dhcpd.conf contains a
list of the IPs which machines can be allocated by
your DHCP server.
I am installing Linux on a laptop with
ftp, but When I connect the laptop to
4| the server through a hub the install is
very slow, taking up to two hours.
When I connect the server and laptop with
a crossover cable the install is fine.
Both machines have 100Mbit cards and the
hub is dual speed. Do i have a problem with
the hub, cables etc. or is this normal?
James, via email
■ Networking
f f V The most likely cause for this problem is
S 4 1 that the hub ancl the N,Cs are not
f —« 1 negotiating correctly, so the NIC might be
working at 100Mbit, but the hub at 10Mbit,
although duplex issues are more common. The
way to debug this sort of thing is to use mli-tool on
the Linux machine to find out what the NIC is
working at. You should be able to check the hub
by looking at the various little lights on it You
should then be able to change the NIC’s
configuration using mii-tool, changing the duplex
settings or the main speed to whatever the hub
thinks it should be using.
There isn’t really much that you can do, as it’s
often down to incompatibility between the hub and
the NIC. As one is a laptop, you’ll have two
different NICs, so you should be able to compare
the settings and see which isn’t working correctly.
Fat pipe problem
i f is® I have SuSE 7 which I think is a great
distribution and has never let me
! . down – that is until I upgraded my
Internet Service Provider from slow modem to
ADSL. Under the contract I have to use D-Link
530TX Ethernet card. Great, no problem…
until it was time for SuSE to find it, and it
can’t, no way.
Windows runs it with no hick-ups, so it
pains me that I have to use that to access the
internet. How can I get this Ethernet card to
be recognised? Someone told me that it is not
unusual for D-link cards not to be recognised.
Ian, via email
W IB The D-Link 530TX is quite a common
W 4 U rietwwk card (NIC), and is based upon
1 mm ’ the VIA Rhine controller You should be
able to manually select this kernel module for the
NIC, even if It can’t auto-detect It.
However, there are two releases of the D-Link
530TX card, and the latest version won’t work
with the via-rhine.o module within 2.2. You
have the option of upgrading to 2.4, although this
will probably disable many features of the
distribution if it does not come with a regular 2.2
kernel. Fortunately, you can obtain the latest
release of the via-rhine module from,
which will happily compile against a 2.2 kernel. If
you follow the instructions on that site exactly as it
tells you to, then you should be able to compile
and install the new module, completely overwriting
the existing one in the process, then the NIC
should work as expected. Of course, updating the
module does not mean that the YaST tool will
be able to detect the NIC. In fact, because it is
using a different release of the controller, YaST
won’t automatically detect the card itself even if
it’s working.
Use Linux!
: ‘ I need a little advice, I have built a
Linux file and backup server from an
I . old box for a small office network of
eight Windows 98 boxes. It was physically
installed recently and I intend connecting it to
the network. I am planning this well in
advance to minimise disruption.
Installed on the box is a cut down version
of Mandrake 8.0, with no graphical desktop, a
minimal set of admin tools and the required
tools for file sharing. ethO is set to ask for an
ip address using DHCP. The ‘main’ Windows
box is configured for Windows Internet sharing
and automatically allocates ip addresses to the
other seven machines, i.e. I have not given any
machine a permanent ip address. Will this
work or does Windows use BOOTP?
m « I P allocation is done using DHCP, which is
| i l what ICS uses. BOOTP is a completely f mm 1 different protocol for supplying a boot
image to a diskless machine, so that it can boot a
kernel without having to have a copy of it locally.
Having a Linux box use DHCP is simply done by
selecting ‘DHCP’ in the network configuration, or
manually grabbing an IP from the DHCP server
using /pump/. However, given that Linux is a much
more secure operating system, it doesn’t really
make sense to use Windows to access the
Internet, when you’ve got a machine happily
running Linux already. It will require a modem of
some variety, or whatever else you use to connect
to the Internet, but it can happily dish out IPs via
Networking ■
Network knowhow
I’ve got two PCs both running
Mandrake 8 each with a 10/100
mbps PCI full duplex adaptor and a
category 5 UTP crossover cable to link them.
I’ve read the HowTos but got a bit lost – can
you suggest the way, in fairly simplistic
terms, as to how I can get the machines to
link to each other so I can share files, a
printer and modem.
telboy, from the forums
Once you’ve got the two machines
‘talking’ to each other, by giving them
I an IP each in the 192.168.0.x range, or
one of the other private IP ranges, it is simply a
matter of setting up the various services to
enable access to the other machine, Ipd, the
printer daemon, can enable remote access, by
putting the remote machine’s name in the
/etc/hosts.equiv of the server and setting up
/etc/pnntcap similar to:
:rm= 10.11.5′.
Where /var/spool/lpd/lp is the local printer
spool, 10115 is the remote IP and ‘Ip’ is the
remote printer name on the machine with
the printer attached. Restarting Ipd will then
enable you to access the remote machine’s
printer queue
File sharing can be done with NFS, and it’s
simply a matter of setting up /etc/exports with
iptables can become quite complicated once
you start forwarding ports, and doing it
incorrectly can easily cause you to end up
with an insecure configuration.
the appropriate entries, according to the ‘man 5
exports’ page.
More information on both of those topics is
available at
Modem sharing is similarly easy to configure
and is setup using IP Masquerading, whicn is
covered in detail at
HOWTO, 1P-Masouerade-HOWTO.html This is
simply a matter of setting up the machine that
has the modem attached as the gateway cn
each of the other machines, so that all external
traffic travels over it then setting up the
appropriate ipchains – or iptables if you’re using
a 2 4 series kernel – entry to enable
masquerading for network traffic going out of
the pppO interface/proc/scsi contains all the
information about your SCSI sub-system, so you
can find out which drives you have connected
and what your controller thinks they ate.
DHCP to the Windows machines, so no
reconfiguration of the clients will be required.
Sick squid
| I’m new to Linux but I have a lot of
| experience with Wintel. I have set
1 up a RH7.1 dial-on-demand (diald)
router with Squid as a non-transparent
proxy and using iptables for filtering. I did this
for fun, and because I had a low-spec PC
which wasn’t doing anything useful and I
would rather understand what I have got
than use one of the pre-built firewalls such
as SmoothWall.
It seems to work really well for browsing
(from two Win98 machines) but email won’t
work. Outlook tries to connect to the specified
mail servers but can’t find them.
I’ve tried removing all access controls on
squid (briefly) and simplifying iptables to a
simple MASQUERADE Instruction (briefly) but it
still won’t work.
jmangan, via email
r l l j It sounds as if the DNS settings on the
j | I I Windows machines are not correct,
1 although that would be affecting all
network services which rely on DNS lookups, such
as web browsing, and of course, collecting email.
The DNS servers In Windows should be set to that
of your ISP, unless you’ve got a caching DNS
server running on your Linux machine.
Try accessing the mall servers, by telnettlng to
port 110 on them, from the Linux machine and see
If it works.
Student network
I’m about to move into my eight
person student house up in
Sheffield, and with about four PCs
and one Mac I figured it would be best if we
just got an ADSL or cable modem and shared
that between everyone. So, is it possible,
with my Pentium 750 with 320MB RAM and
SuSE 7.2 to use my computer as a shared
internet connection for everyone on this
small home network? And could I also set it
up as a web and mailserver as presumably
ADSL or cable modems have a static
IP address?
What would I need to do this?
From the forums.
Setting up connection sharing In Linux Is
a breeze, assuming you have Ipchains
support compiled into your kernel. Then
It’s simply a case of doing;
and pointing all the other machines to the Linux
box for their gateway. If you are running a 2.4
kernel, setting up masquerading is slightly different,
but the rest of the iptables filtering system Is far
more secure, so it may be preferable to upgrade
your kernel purely for that.
As for web- and mallservers – Apache is a
perfectly capable Webserver, and you can use one
of the many dynamic DNS services to make sure
that the hostname for the machine follows the
DHCP leased you get over DSL or cable. Mail can
be provided by one of the numerous servers,
Including sendmail, qmall, exim and so forth, so it’s
purely a case of finding something that you can
configure securely. It’s not preferable to run an
incoming mail server off a dynamic DNS service,
for the sake of security, but you can avoid that,
by using fetchmail to collect email from a
remote mall server There are POP3 and IMAP4
servers available for Linux, which you could run
on your machine to allow Windows users to
collect their email from your box using their own
email client
The old favourite
IT , 1 Do you have, or do you know where I
IS can find, an up-to-date list of linuxfriendly
ISPs in the UK? I’ll be using
SuSE 7.1 if that has any baring on things.
James Baldwin
I f ‘ I S Almost all ISPs will work with Linux, at
| | I least those which use PPP or SLIP for f _ Ithe connection. The vast majority of ISPs
will use PAP for authentication, but the occasional
operator such as BTInternet and BTConnect use
CHAP If you’re after a basic 0845 ISP,
is a nice choice, as It uses Linux for its hosting, mall
and DNS services, as well as being reasonably
knowledgeable when It comes to troubleshooting
users’ problems.f you ever need to transfer a large
set of files from one machine to another, rsync
( Is the best way to do it.
Many ISPs are less than Interested with people
who use their services with Linux, as they lack the
resources to train their support staff In the ways of
Unix. There Is always the problem, with those sort
of ISPs, that when they have a problem, be it
anything from dial-up failures to reverse DNS
problems, they will immediately put the problem
down to your own configuration, so it takes a little
time, patience and determination to get It through
their heads that it’s not your problem. Of course,
the more traditional ISP, someone like Demon, are
more than happy to guide Linux users – they
certainly aren’t going to give you a walkthrough as
to how to setup your machine to connect to their
service, but they at least hear you out when there
is a fault.
No net
S’ * 1 1 am trying to configure my SuSE 7.1
| machine to share an internet
1 1 connection with the internal network.
I am using SuSE firewall, and my problem is
that I do not know what the value of
FW DEV WORLD (I am connected via 56k
modem) should be. I have tried several options
but each time the startup log states that it
can’t find the particular module. What should
be the value?
From the forums
Wt I I The quickest way to set up masquerading
W k I I is iust doing by hand using iPchains f mm 1 Simply do:
echo 1 > /proc/sys/net/ipv4/ipJorward
ipchains -A forward -s -j MASQ
where ‘′ is the subnet which your internal
network uses. You will, of course, need to ensure
that it is run at boot time, so you might want to put
it in /etc/rc.d/rc.local, as well as setting the internal
machines up such that your Linux box will be their
default gateway.
Proxy browsers
I have Windows Me and SuSE 7.1
installed on my PC, and I’m connected
to a Windows NT server with MS
proxy server installed. I have a username and a
password created on that server.
To access the internet I have to be
authenticated on that server, so with Internet
Explorer 5 I have no problem, but with
Konqueror I cannot authenticate, each time
while browsing I have to enter a username
and a password but still get “invalid password
or username unknown”. I don’t know what
to do, is there a way to join that domain or
save that username and password in
Konqueror and get a successful
authentication? I would really appreciate your
help. Thanks.
Rabi’N. Haddad
S f H I Within the proxy configuration section of
P ® » Konqueror you need to set the proxy in
r _ ” th e form of:
rather than just
The username and password authentication box
does not behave as you would expect, as it
doesn’t work correctly in the KDE2.1 release of
Konqueror You may want to check the mailing
lists, over at, to see if anyone else has
been having similar problems or to check to
make sure that there is not a new release of
Konqueror which has the correct support for
authenticated proxies.
Live and clicking
: I have recently installed SuSE Linux
7.1 Live. Now it is not the full
b . , – edition, as I installed it from a
magazine’s cover CD, however, I was
wondering whether or not under this
version you can set up a modem in order to
connect to the internet? All I’m using is a
common-or-garden USR 56.6K modem to
dial-up. I have tried running the YaST modem
connection program that is in X-Windows, (for
example, the desktop) and it seemed to be
working absolutely fine, however it didn’t
write/create the file etc/devmodem as it said
it had.
I am a relatively new user with Linux (I
have seen the light and I’m not going back
to Windows!), so any help would be very
much appreciated.
Wf W i t is possible to set up various network
I | 1 options from the SuSE Live CD, but it
f 1 can never be fully configurable when
running of a CD, as there’s nowhere to save
the files to!
As you seem to be interested in Linux, it’s
probably worth getting hold of a proper distribution
which you can install, either from a cover CD, or
by downloading the ISOs straight from the internet
if you’re a madman with lots of bandwidth and a
CD burner.
Speed daemon
IF Hi I I l’ve noticed that every time I look at
the running processes on my SuSE 7.1
4 box there are at least five occurrences
of NSCD running. Is this really needed? I’m
only using an AMD K6-2 400 and 128MB RAM
and it is running a little slow, so I’m pruning
the system down. I haven’t gone to the trouble
of recompiling the kernel yet as I think some
sensible rc script pruning should have a
reasonable effect.
Oliver Thomas
M W nscd Is a fairly simple DNS caching
P k * daemon, and even if there are five
r _ 1 processes running, it’s unlikely that It will
cause any great slow down on the system. In fact,
It is probably best to keep it running, as it will
improve the speed at which DNS lookups are
done, assuming that it is configured correctly, when
a program has to do repeated lookups on a
particular hostname. You may want to run ‘top1
from a terminal when the machine Is up and
running, so you can see which processes are using
the most RAM or CPU time.
Fat pipe concerns
f *% 1 I’m getting an NTL cable modem
connection next weekend. I need to
t” ^ -4| know what the best way is to set up
my network.
I have a RH7 server that acts as my
Windows PDC, printer server and web server.
I have Windows 95 and Linux (various
flavours) clients.
I would like to be able to expose my web
server to the Internet in a secure fashion (i.e.
using a firewall). I have an old 486 that I was
going to install SmoothWall on, but from what
I read I don’t think that will allow me to
expose the web server unless it is in a DMZ
(third NIC). I don’t have another spare machine
to stick in a DMZ.
Is the best approach to use my existing
RH7 server for all its current functions plus
acting as the Cable Modem host? Or is there a
way to use SmoothWall with my 486? If I go
with the former, will this put the security of my
network as risk, or can I tie things down
properly without resorting to SmoothWall?
Tenjin, from the forums
The most secure method is to get 2.4
running on the Red Hat machine, which
should require a few updates, and use
Iptables to secure the machine and allow external
services You can then do something similar to;
iptables -t nat -A POSTROUTING -o ethO -j
iptables -A INPUT -i ethO -dport 80 -j ACCEPT
iptables -A INPUT -m state —state NEW,
ethO -j DROP
Which will allow connections on port 80. drop all
other incoming data, and masquerade all internal
machines behind the Red Hat box, assuming that
the cable modem is on ethO. Any other services
can easily be allowed or forwarded to an internal
machine using the DNAT option with iptables. You
can find more information at
You will, of course, have to ensure that any
services you run and enable external access to,
such as Apache, mail and such like, are secure
so that your gateway can not be exploited. It
certainly isn’t as neat having a gateway as its own
DMZ, but it is better than not having any firewall
at all.
Directing traffic
f 4 t% 1 Is there any way to set up BIND so
that is directed to a
certain port (ex.160) on
So instead of it would
be read
W V BIND’ or rather named’ only assigns
| | 1 hostnames to IPs, and not port numbers,
i ™> 1 HTTP, as default, runs on port 80 and
this will be what the web browser will use to
connect to the machine. You might want to look at
using name based Virtual Hosting, that is, where a
separate server configuration is used depending
upon the hostname used to access the site, so
‘’ might serve a
h \
completely different site than ‘
If port 160 is to be forwarded to an internal web
server, it is possible to use modrewrite to proxy
requests to the external web server onto an
internal machine with something similar to:
RewriteEngine On
RewriteRule/?(.*) http;//10.11.2:160/51 [P,l|
mod rewrite will need to be compiled as part of
Apache with the —enable-module=rewrite, or by
building it as a DSO and having the existing
Apache installation run it and the use of the P
option to proxy the requests will require
‘mod_proxy’ which should be built in exactly the
same way with —enable-module=proxy.
Upgrade now!
f „n When I was running my previous
kernel 2.2.161 didn’t have any
Ik * . 5 problem with running KPPP to
establish an internet connection. Indeed this
email has been sent to you using a 2.2.16
kernel. However, if I reboot and use the newly
compiled 2.4.0 kernel I get the dreaded, old
“PPPD Died unexpectedly” message. I also get
the following PPPD.Log messages:
pppd 2.3.11 started by root, uid 0
Perms of /dev/cua1 are ok, no mesg n’ necessary
ioctl (PPPKKGFLAGSk Invalid argument
tcsetattr: Invalid argument
I have been unable to locate or identify the
cause of this. Quite frankly I don’t really know
where to start to find out.
m V The PPP daemon, pppd, is one of the
S A » numerous required updates if you want to
r 1 use a 2.4 series kernel. At least, it is
required if you still want to be able to dial up to the
Internet The PPP code has changed a lot, and I’m
afraid 2.3.x won’t cut the mustard any longer You
just need to get the latest stable 2.4 build of pppd,
available from or the ftp update
server for your distribution, and it will work fine.
You should also switch to /dev/ttySO, rather than
/dev/cual, because the latter is no longer the
proper device to use with PPR and has not been
since 2.2.x was released.
Modem problems
^ iH 1 1 have a P233MHZ, 64MB, ESS1868
I soundcard, S3 virge 4MB, Rockwell
HCF 56 PCI modem (on C0I13); I
installed WinLinux2000 over Windows Me.
1. WinLinux2000 has detected my modem,
but it is still not working properly. I get a
message ‘modem is busy* under kppp dial up,
but when I try to correct this problem by using
minicom and change ttyl to tty2, my
computer hangs. I’m a newcomer to Linux so
be as detailed as you possibly can.
2. WinLinux2000 doesn’t detect my
soundcard, so I forced it with the same IRQ,
DMA, 10, and memory range that Windows
used but it still not working. When I try to
used mixer I get: ‘do chmod a+rw /dev/mixer’
and I do it properly, but nothing happens.
3. When I try to update WinLinux2000
kernel 2.2.13 with the version that comes on
your CD, by using ‘patch-linux’ I get a message
‘cannot detea kernel version’.
4. Is there an Arabic version for Linux? I
found StarOffice from Sun better than MS
Office, however it doesn’t support Arabic. Is
there a version that does?
Abbas Al-Hutawa, Bahrain
W V Thanks for your letter. Abbas. Firstly,
» k M thou8h’ nobody here is particularly
I _ 1 familiar with Win4Linux, so while the
answers below should apply to any version of
Linux, we don’t know precisely how Win4Linux
differs from a standard distribution. You should
check out any documentation that was supplied
with your distro.
1. Your modem is a so-called ‘Winmodem’ and
is therefore not supported by Linux at all. You
should consider buying an external modem
instead, since any external model will work happily
with Linux.
2. Your soundcard, however, is definitely
supported under Linux. The ESS1868 is an ISA
plug-and-play device and will work with the
kernel’s Soundblaster driver Configuration may be
tricky, though. You need first to set up Linux’s plugand-
play tool to initialise your card. This can be
done by adding an entry to the file /etc/pnp.conf.
ISP catch-22
I’m quite new to Linux and have just
discovered that my ISP have no
intention of supporting Linux users.
I’ve seen some stuff about Linux-friendly
ISPs but they all seem to have online signup
procedures, which I can’t do because I
can’t actually get online.
WK ® This catch-22 situation is depressing
V j [ l common, and as long as service
f *»* 1 providers such as Freeserve and Line
One cater for Windows and Mac users only, we’ll
probably get lots more. There are solutions.
To sign up with, set up your
dialler as follows:
Tel No: 0870 090 0301
login Name: signup
Password: signup 1
DNS etc is dynamically assigned
You can then dial out and sign up through’s dedicated page.
Alternatively, call 0870 740 6575, where
you’ll be able to get all the details you need. To
sign up with without an internet
connection do the following:
Set up your dialling program with the
following details:
Tel No: 0845 B096691
username: signup@scotfree
password: signup
Dial out, then point your browser to
Next click on the Join Scotfnee button and fill
in the required details. After this a screen
will appear with your new account details and
the like displayed Print this out for safe-keeping,
then amend the details in your dialling prog and
enter the details for your email program.
ISP suggestions
All ISPs are Linux friendly, if one knows how to
extract the necessary information from a signup
CD The following works for all operating systems
and browsers,. One should browse the signup
CD and look for a ‘.INS file (occasionally the file
is MSP). There may be several files that match.
Each one should be examined in a text
editor/word processor to look for the info that
one needs to connect to the sign-up server:
Entry_ Name=LineOne
(User] Requires_logon»No
[Phone] Dial As Js=No
Country JD=44
[Device] Type=modem
(This assume that the main card I/O Is at 0x0220,
the FM synthesiser at 0x0388, the MIDI port is at
0x0330 and the card uses IRQ 5. You may have
to change these to suit your set-up.)
(10 0 (BASE 0x0220))
(10 1 (BASE 0x0388))
(10 2 (BASE 0x0330»
(INT 0 (IRQ 5 (MODE +E)»
This file can be generated with pnpdump
command. See the Plug-and-play HowTo for more information about
plug-and-play configuration with Linux.
You then need to tell your machine to load and
configure the relevant kernel modules to use your
particular card.
/sbin/modprobe sound
/sbin/lnsmod uart401
/sbin/insmod sb io=0x220 irq=5
dma=l dma16=-1
/sbirVinsmod mpu401 io=0x330
[Server] Type=PPP
¡TCP/IP] Specify_IP_Address=no
Specify.Server Address=No
IP Headef Compress*Yes
[Branding] Flags* 16319
Use this info to set up pppkppp etc to dial up
the server and use the username and password
to log on at the signup URL
At the end of the process, you will either be
presented with all the info to be printed out to
manually set up one’s account or you will be
offered a file to download, usually CONFIG.INS.
You should download this file and again view it
and use it to set up your definitive account,
Guy, via email
,’sbin/insmod op!3 ¡0=0x388
/sbin/lnsmod v_midi
You may find it easier just to switch to a more
modern Linux distribution, such as Mandrake 7.2
or SuSE 7.0, which does a better job of configuring
audio for you.
3. The kernel source that we have provided on
many Linux magazine’s coverdiscs have been
complete source archives, not patch files. To build
a kernel image, unpack the archive, and CD into
that directory. Configure the image to build by
executing /make menuconfig/ or if your are running
on X, /make xconfig/. Then enter the following
series of commands to build and Install the new
kernel image:
make dep
make bzbnage
make install
make modules
make modules Install
You should really know what you are doing before
installing a new kernel image, however, so check
out the Kernel HowTo.
4. You are probably better-placed for finding
out about Arabic versions of Linux, since there is
very little information available on this topic
which is not written in Arabic. You could try the
web page It looks
interesting, but obviously we can’t read it! Debian
Linux ( also have an Arabic
page. As for a word processor, we don’t know of
any available yet. The KDE project have a
translation team working on an Arabic localisation,
but I suspect it will be some time before a
translation of KWord is ready to go.
Feeling flushed
f ¡in f My problem is with using Elm and
‘ I Fetchmail. When I use FETCHI1AIL, I get the following
skipping message 1 not flushed
Can you help? i am only using Linux in text
mode – SuSE, at the moment – because of
memory restraints.
Do you have any suggestions as to why this
may be doing this?
Cerry, via email
■f I f When an email has been marked as read
■ j | « in a mailbox, Fetchmail will not download
r _ I it You can stop it skipping read mail with
the —all switch at the command line, or you can
do it by putting fetchall at the end of the
appropriate line of your -/.fetchmailrc file.
Traffic master
Can you tell me if it’s at all possible
to do the following on a Red Hat
5.2 machine:
as Networking
I want to be able to automatically divert
traffic from one host (a) to another host (b) on
another network from the originating host’s
network – in other words, Packets destined for
ip address (a) are to be sent to (b).
The default gateway on the machine (host
a) is and the local network is
The default gateway on the machine (host b) is and the local network is
Ilf you run 2.4 on the gateway, it is simple
enough to redirect traffic, as long as all
traffic heads through the gateway. So,
rather than having link level traffic just going out of
the NIC and hitting the network, you will need to
send it through the gateway, then onto the
network. This, of course, reduces bandwidth
considerably, so isn’t a good option. You could,
always, setup an IP alias, so the appropriate
machines on the network also have a IR but they will need to have the
appropriate routing set-up so packets end up at
the right place.
You really need to decide what it is you are
trying to accomplish by doing this, rather than
what you are trying to do, as there will be a far
better option than NATing packets on the network.
W * | 1 1 use a dialup service which places
| restrictions on my internet
\ – connection. You know the sort of
thing, logs off after an hour, can’t use certain
services and so on. I won’t name them
because I don’t want them finding out what
I’m doing (or am I just paranoid?). Anyway,
I’d really like my connection to be available
pretty much all the time. I am hoping to set
up an old box as a server and network two
other machines to it, and I’d like to set it up so
that I can always access the net. Surely, this
must be possible.
w m You have a ,ew pnob|ems here ° ne is
» k m certain|y that the ,ine is dropped after a
r 1 certain amount of time. This is easily
solved, as most dialup clients can automatically
reconnect – check the documentation. In kppp
for example, you can access this option under
the Misc. tab in the settings section. For other
systems, you may need to edit a conf file (wvdial
for example).
Another problem might be that the connection
will be dropped after a certain period of inactivity
(usually about 20 minutes). You could easily write
a script that pinged the DNS server or whatever
every few minutes to get around this.
More to the point though is why you are doing
this? Keeping your connection up all the time on
such a service is a bit antisocial isn’t it, especially if
you aren’t really using it during all that time.
Another thing you might face is that various
schemes have thrown off their “high use”
customers for being on-line all the time.
If you just want internet access to be available,
why not install something like SmoothWall on
your server (, although
there are more recent updates that are now
available. This will enable you to cause the
server to dial out when required, and not annoy
everyone else.
I want to be able to access my Linux
box (mainly used as a server)
->> A remotely from a PC, so I can install,
update, change settings and so on. I
understand I can use telnet to do this, but
what do I need to install?
Darren, via email
I Telnet is fine for this sort of thing, as long
as your network is secure (i.e. you are
behind a firewall, and you trust whoever
else is on your network). It may be worth checking
out SSH as an alternative, as this uses encrypted
access (otherwise snoopers might be able to
detect your password when you log on). Telnet
may be running. To check is to type:
If you get a line with something like:
tq> 0 0 “:teinet ItSTHN
then telnet is already installed and running
You can then run a telnet client on your
Windows machine. If it is administration stuff you
Modem solution
I notice questions about connecting
to the internet under Linux, and
the answers seem to be rather
complex for what should be a simple task.
Can I offer the method I use? This is all
done as root
1. Ensure that the wvdialpackage is
installed. I have just installed Red Hat Linux
7, which includes wvdial-1.41-10.i386.rpm
therein, so I would presume that is the
current version.
2. Run the following command:
wvdialconf /etc/wvdial.conf
This will auto-detect your modem and
insert the relevant details in the file stated.
On my system, it created the following file:
{Dialer Defaults] Modem » /dev/ttySl
Baud = 115200
tnitl = ATZ
Wt2 = ATQ0V1 £1 S0=0&C1
&D2 S11 =55 +FCLASS=0
; Phone = Number
; Username * Username
; Password = Password
3. Edit /etc/wvdial.conf and delete the three
comment lines at the bottom, then insert a
separate block of lines at the bottom with
the following format, separated from the
previous blocks of lines by a blank line:
(Dialer FreeiSP] Phone = 08081 570 980
Username = ThislsMe
Password = Secret
The word in the square brackets after
“Dialer” should be an easy to remember
mnemonic for the ISP in question, and the
«am» ) I «Mtat ] O>0 t ] «»[I
ï’:; *W>P Setrçt – -…… ……………………—……. ……………..
I pppd v’ersfdn.
i ppp. d Umcottt: j
Dock info Panel m Connect
!x Automat Resfiai on -Oteeaftnect
ix Stww Own on Cspfion
•X Di?cow«t on S-swvw shutdown
i tisat on Disconnect
i * Mfeifiwae Window on Connect
kppp can be set to auto,automatically redial
if the connection is broken.
phone, user name and password should
obviously be the appropriate ones for the
ISP you’re using.
The phone number shown is from the
‘Reserved for Drama Use’ section on OfTel’s
website, and is guaranteed never to be
issued. Refer to
mimberVdrama599.htm for details.
4. Save the file.
When you wish to go online, the
command is wvdial FreeiSP with the
’FreeiSP’ replaced by the mnemonic chosen.
Riley Williams, Aberdeen
Wf 1 | Thanks for your advice, which I’m sure
| | 1 will be of help to RH7 users. Our
f 1 previous instructions have concentrated
on packages such as kpp (provided with KDE),
as these tools are more widely used.
are doing though, a really good option Is to install
Webmin on your Linux box. This allows you to
change all sorts of things on the server through an
easy-to-use web Interface (which will be easier to
run from Windows), and you can use telnet
through that too if you need to. Check out
Net gateway
I have recently installed Linux
Mandrake 7.1 on my PC. I want to
connect to my ISP and share internet
access with other computers that are on my
network, do you have any suggestions as to
what I should do?
– Networking
W V Without knowing which ISP you are using,
■ 4 V it’s difficult to give specific details, but a
* — * tool such as kppp or gnome-ppp can be
used to configure a dial-up interface. Simply pop in
the number to dial, username, password and any
specific authentication options, and hopefully you
should find yourself connected to the Internet If
your using an ISDN TA, rather than a standard
serial modem, you should look in the direction of
the ISDN4Linux software, at
To share the Internet connection with other
machines on the network requires you to compile
IP Masquerading support into the kernel. If you are
unfamiliar with recompiling the kernel, there are
HOWTOs on various web sites, including Once you’ve rebuilt the kernel
and rebooted, ensure that you have ipchains
release 1.3.9 installed. If not, head along to your
nearest Mandrake mirror and install it
Assuming your LAN is using as the network, the LAN is
on ethO and your machine is, you simply do:
ipchains -P forward DENY
ipchains -A forward -i ethO -s -j MASQ
echol > /proc/sy5,’net/ipv4/ipJorward
After setting the gateway for the other machines to; they should be able to access the Internet
once you have supplied them with appropriate
name server IPs.
Reader response
Wj I have enclosed some details that
^ « may help people to sort out their
« 1 modem set-up, perhaps you would
forward it on.
I have configured a modem (US Robotics
56K voice modem 9190 & a Creative labs
sound card (Vibra 16) with both Red Hat and
Mandrake. Both were quite difficult, but
achievable. Configure the sound card first
using Drakconf or the command pnpdump -c
from a command line. This creates file in /etc
called isapnp.conf. This has the settings for the
card and the modem. Alternatively, use
Drakconf in Mandrake and adjust the settings
for the DMA8 and DMA16 until you get a
sound test. The same file is created using this
method. My settings are:
(CONFIGURE CTL0070/-1 (LD 0 (DMA 0
(IRQ 5 (NODE +E))) (10 0 (SIZE 8) (BASE
0x220)) (NAME “Creative Labs SoundBlaster
Vibra 16″) (ACT Y ) ))
Set up the modem using Windows, if you
have it, and read the modem interrupts and
IRQ from the My Computer>Properties. Then
boot into Linux.
To set up the modem, copy the
/usr/doc/setserial 2.X/RC.serial file to
/etc/rc.d/init.d/serial (read setserial manual
pages (setserial man) and Setserial HOW TO),
create a file called serial.conf in /etc, with a
text editor type at the first line of “serial.conf”
At a command line type Setserial ttySO
then repeat for ttySl, ttyS2, ttyS3, taking note
of the settings.
I set my modem to run to ttyS2, IRQ 3,
UART 16550a 0x03e8 ensuring that there are
no conflicts (you may need to play with these
to get the modem to work after you have
changed the linuxconf settings).
Next run Linuxconf and change the
modem setting to ttySX i.e the tty (COM port)
you have configured your modem to e.g. ttyS2.
At a command line type /etc/rc.d/initd/serial
stop. This will save the setting to a file
called serial.conf
Test the modem, and if it says ‘modem
busy’ try changing the 0x0 setting or IRQ or
ttySX. If it says ‘modem not found’, it is
possibly the incorrect ttySX is symlinked. After
each change of the serial setting repeat
/etc/rc.d/init.d/serial stop.
If the modem works, copy the files
seriaLconf, isapnp.conf and isapnp.gone to a
floppy for safekeeping in case you reinstall
the system.
As for the ISP information, you will need to
enter the Ip address of the ISP into KPPP
(Freeserve & BT are quite good at providing
this information – why not change)
Reboot the system.
Hopefully this will result in the soundcard
and modem working.
SJ Walker
Taking a Gnap
My version of Gnapster doesn’t seem
to be working anymore. It used to be
fine, but now it just sits there forever,
saying that it’s trying to find the best server,
before returning an “unknown fatal error”
dies, via email
i f f Hmm, you don’t say what version of the
| | 1 Linux client you are using, but it is
f 1 possible that it’s out of date. Napster
changed some parts of it’s protocol, so if your
version is below 1.3.12, it probably won’t work. Get
the latest version from
Not networking?
I have been setting up a new Intel Plil
PC running both Windows 98 and
Mandrake Linux 7.1. Everything is
working perfectly apart from one thing: I can’t
get Linux to work properly with my network
card, a 3CS09B by 3Com.
Under Windows 98 the whole thing
(network card and peer-to-peer networking)
works in PNP mode, so I am assuming that the
physical installation is fine. Under Linux, I have
run Etherdrake and it seems to allow me to
select this particular network card with the
correct IRQ and 10 Base settings although
when I run Harddrake, there is no sign of my
card under the Network heading.
Having hunted around, I found a 3c509.o
module, so I added the line:
#alias ethO 3c509
to my etc/conf.modules file, as suggested on
3com’s website. I also tried running:
#insmod 3c509.o
to install this module.
Like this I can set up ethO using ifconfig (for
some reason it doesn’t become active on boot
up), and get the smbd and nmbd daemons up
and running, and smbdient confirms that all is
well. However, the PC still appears to be
invisible to the other Windows PCs on the
network (they can see each other). I have
carried out the Windows 98 network
properties set up, and also added the TCP/IP
settings recommended in Peter Morton’s
Complete Guide to Linux. Can you suggest any
tests to trouble-shoot the problem or are
there inherent difficulties with this particular
combination of hardware and software?
Martin, via email
■ It should be fairly straightforward to get
I? k i your 3c509 card to work under Linux –
f saas 1 We have one running on a machine here.
First some diagnostics. We need to see if the
driver is actually finding your ethernet card. So
install the module as you do above. Now view
the file /proc/net/dev. If the card is working, then
you should see an entry for ethO in there. If so,
you should then be able to bring up the network
with ifconfig.
If there’s no entry for ethO, then there are a
couple of things you can try. Firstly, the fact that
you have your card in PNP mode could be a
source of problems with Linux. The Linux 3c509
driver can probe for cards, but PNP mode tends to
confuse it – so switch the card into legacy mode
from DOS using the tools provided on the 3Com
driver disk. (If you haven’t got the disk, you can
download a copy from 3Com’s website
You will have to reconfigure the card under
Windows, too, if you do this and install 3Com’s
legacy driver rather than the PNP driver While you
have the 3Com floppy out, check that the card is
using the correct transducer To be ultra sure,
switch it manually to lOBaseT (twisted-pair) or
10Base2 (coax) as appropriate, rather than leaving
it on automatic. If it still doesn’t work after all this, I
suggest rebuilding your kernel with the 3c509
driver built-in.
If the card seems to be working, then it is
possible that your network configuration has gone
awry. To check, try something simpler than Samba.
Set up a telnet or ftp server on your machine and
try telnetting or ftp-ing in. The most useful tool in
the network administrator toolbox is ping, which
just tries to bounce packets off of a particular host
on the network. Try getting a version of ping for
Windows or DOS and pinging your Linux box.
Also, check out for
the latest Linux ethernet drivers and info, and the
IS Networking
Ethernet HOWTO at is also a
great source of Information.
Password perils
I have Red Hat Linux 6.0 on my PC
and I connect to my ISP with PAP
Authentication. The problem is that
my secret password is visible.
Bill Varkas, via email
W W, It depends on what exactly you are using
■ 4 l t o connect to the internet. Most dialers
f _ 1 will not show the password, so if yours
does, you may want to check to see if there is an
updated version of it. It also depends where
exactly the password is being displayed. If It’s in
logs, it probably won’t make much difference as
they are usually only readable by root Try dialing
up as a different user, rather than the one you
normally use.
Modem misery
1 I have a Compaq Presario 5060 and
I couldn’t wait to try Linux Mandrake,
«1 and so far have been really impressed
with this Distribution.
It took some effort to get the on-board
ess1869 sound chip working, I nearly jumped
out of my skin when after two weeks and
several configuration attempts I heard the
magical testing voice sample emanate from
the monitor mounted speakers.
Alas, I cannot get on the internet nor
retrieve my junk mail as I can’t get the
confounded DFIV56 modem configured. I
have tried using KPPP and I blindly fiddled
with the settings. When the modem seems
to be queried, all of the AT response fields
are blank.
I am desperate to configure the modem,
have you any ideas? The ISP that I currently
use is LineOne, I am aware that i need
several more parameters than Dial Up
Connection under Windows needs, but so far
haven’t been able to extract these settings
from my ISP.
I look forward to your answers.
Kim Beadle, via email
SSf I B It may be worth trying to use minicom to
9 A S test m°dem ant* having it dial-up
* _ * LineOne with a ‘ATDT<number>’ line. If it
connects, then it could be that your using the
wrong ttySx port in your dialer If it doesn’t, it may
be a fault with the modem under Linux, which may
indicate that it Is a WinModem, which – as you
may know – means you could have some difficulty
getting it to cooperate with Linux.
We can’t find any conclusive documentation on
this exact model – perhaps another reader may
be able to help?
Identity crisis
W j js I The fact that I am sending you this
email from my Linux-based system,
while listening to a CD playing
through the same box, shows you just how far
I have come with my Linux set-up.
But – and there is a but – 1 am having
problems with permissions. I can connect
quite happily to the ’net using KPPP whilst
logged in as root, but the moment I try the
same whilst logged in as my normal self, I
get a “This kernel has no PPP support,
neither compiled in nor via the kernel module
loader” error. Pressing on, KPPP will happily
dial my ISP, but time-out trying to start pppd.
As I say, I can connect as root and if I “su”
via a terminal and start KPPP through that.
But not otherwise, so I surmise there is a
permission problem, but where could it be?
RobertJ, via email
i Usually ppp dialers have a suid wrapper,
I so they are really executed as root, even
I If your not actually logged in as root You
might want to check up on the kppp settings to
see if there is anything which indicates this.
You should also check to see if your kernel has
a ppp.o module and kernel module auto-loading
support, otherwise you won’t be able to
automatically load modules as a non-root user.
Get it right
W I Under Windows, I used to run
GetRight to resume broken
f downloads. Now I’ve switched to
Networking ■
Linux (Redhat 6.0) and I need a similar
program! What do you recommend? Or is
there a feature already there that I’m missing?
Hike Heald, via email
i f 1 1 Yes, there are several equivalents to
m 4 i GetRight for Linux. One such is
f _ 1 Downloader for X (see www.krasu.
ru/soft/chuchelo/). It does support the resuming
of downloads (on sites that allow it, anyway),
has a great drag-n-drop interface and works
well with Netscape and the GNOME desktop. It
doesn’t integrate so well with the KDE desktop,
but the KDE project has its own download
manager; called Caitoo (see
http://develhome.kde .org/~caitoo/)
I want to be me
I’m running Red Hat 6 and would
like to be able to access the net
without having to su to root and
enter a password every time. I’ve downloaded
Sudo and have read the How To’s several
times but have been unable to get it to do
anything useful. The example file is very
Minicom is a good place to start when trying
to sort out your connection woes. Unless you
have a WinModem…
complex, covering so many eventualities.
One thing that would be really useful issome
sort of guide which would simple get you
started with to Sudo?
When I’m emailed animated MPEG files
with sound, I can view them but not hear
them. All the usual audio toys (MP3 player,
aKtion player) are loaded and otherwise
working. Can you tell me how to get sound
from attachments?
Janet Fulcher, via email
The command that makes the dialup
connection, whichever user interface you
prefer, is pppd. This is typically owned by
the group dip and executable only by root and
members of the dip group. There are too solutions
to your problem. One is to change the access
privileges of pppd to allow anybody to run it. To do
this log in as root and enter:
chrood a+x /usr/sbin/pppd
A more secure method is to add whichever users
you want to be able to access the internet to the
dip group (making sure you include your own
account!). This can most easily be done with a
tool such as linuxconf, but can also be done from
the shell:
adduserthis user dip
A simple guide to Sudo isn’t completely Gut of the
question, though.
As for your problems playing MPEG
attachments, you don’t say which email client
you’re trying to play them with. For example, if it’s
KMail, then it uses the KDE desktop’s file
associations to decide which tools to use to view
an attachment (see the following question).
Other mail clients may get their MIME
settings from /etc/mailcap file or their own
custom settings.
You say that you can view movies but not hear
them – is your sound working otherwise? You may
need to add yourself to the audio group to be able
to play sound at all.
Modems, printers
and more
I find your How To papers rather
frustrating, since they do not link
together very well. For example,
trying to get my (external) modem set up, I
obtained the modem busy message. The How
To merely said either I had a WinModem –
which I don’t – or that I should check the
serial port – but for what?
It would be good if in a future issue you
reviewed the typical problems (and their
solutions) for installation of modems and
printers. Couldn’t you take, say, three or
four novices and trace through their
experiences as they try and install Mandrake
or Red Hat. Also, I use Laplink on my laptop.
How does one transfer files between two PCs
using Linux?
C.Ward, via email
I® I S You don’t say how you are trying to set
W A l up your modem ” ¡f you supplied some
F _ I more information, maybe we could help
you. A thing to watch is whether you’re specifying
the modem device correctly.
The entry /dev/modem may not point to where
your modem Is actually installed, so try specifying
the serial port instead. /dev/ttySO is the first serial
port, /dev/ttySI the second. Try running a simple
comms package such as minlcom and sending AT
commands to the modem. If the modem replies,
then it will at least show you that your Linux box
and modem are on speaking terms. Also, check
out the Serial How To as well as the Modem
How To.
It is true that setting up modems and printers
under Linux is not as easy as under Windows, but
that’s because Windows does a better job of hiding
the hideousness of PC hardware.
Once you have the hardware and the
underlying network protocol set up – for example,
PUP for a parallel cable and SLIP for serial – using
such a network is no different from using ethernet
You can use network applications such as FTP or
Samba to transfer data between your laptop and
your main PC.
Finally, we do actually know the difference
between ‘its’ and ‘it’s; but it seems our long line of
temporary production editors don’t
| We are running Linux on a LAN, at
the moment, in conjunction with
| NetWare. Is there any way in
which we can share printers between the
two networks?
Pete, via email
I f f I j Of course. NetWare machines » A 1 com™™cate via the IPX (Internetwork
f ,**. 1 Packet Exchange) protocol rather than
IR so the first step Is to recompile your kernel
with support for IPX. To able to do anything
useful over an IPX network, you will also need to
add ncpfs support to the kernel. This will
provide the means by which your Linux box can
access services on a NetWare machine and
You will then need to install the ncpfs package
on your machine. This package contains various
client and server programs and which ones you
need will depend on whether the Linux machine
will be acting as a print server or as a workstation
printing to the NetWare network. It should be
available as a part of the Linux distribution you are
using. For example, the ncpfs client, nprint, will
allow you to Insert files into a remote printer queue
on a NetWare print server
A complete overview of how to set all this up is
available from
I’m trying to set up my Linux box
on the office LAN. It has a 3Com
Vortex Ethernet card. Everything
works fine under Windows, but I get a series
of errors when trying to set up under Linux. It
seemed to be recognised when installing
Mandrake 7, but whenever I try to ping
anything, or even when I try to connect to
the net, I get errors telling me the “Network
is unreachable”.
I also get errors if I try to use the route
command manually, telling me that the device
is not ready, even though ifconfig is displaying
the correct information.
Hark, via email
The Vortex Ethernet cards can be any
one of a number of different models,
all under the 3c59x name. The
method to load the module is simply ‘insmod
3c59x.o debug= 1 option=X! You can set it to
have a variety of different options, such as lObaseT,
lOObase-TX or lOMbs AUI.
Networking II
KDE has procived a bit
problematic for some
people to set up, but it
isn’t impossible!
If you still have problems after this, one thing
you could try is to increase the debug level to
see if It’s having problems with any IRQ allocation.
It may also be worth turning off Plug and Play
in your BIOS, so the Ethernet card is allocated
an IRQ at boot time by the BIOS and you
don’t have to mess around with the isapnp or
kernel patches.
Checking the mail
f rn 1 1 use fetchmail to download mail from
my ISP’s mail server. Can I make it run
automatically when I am online?
Jemima, from the forums
j The pppd (Point-to-Point Protocol
| | 1 daemon) is the system which enbles
* 1 your Linux box to communicate with
your ISP When pppd successfully makes an
internet connection, it will then execute the
script /etc/ppp/ip-up, and when it closes a
connection, it will then execute the script
The secret to getting any programs to
automatically start up and stop as you go online
and offline lies with these two scripts. You
shouldn’t modify these: they should provide some
method, depending on your Linux distro, of
running additional scripts.
With Debian the ip-up script executes
everything that is in the directory named
/etc/ppp/ip-up.d/ and ip-down everything in
/etc/ppp/lp-down.d/. So, in this case, you would
add a script to start and stop fetchmail in the
respective directory.
To start fetchmail as a daemon you would call
it with a command like ‘fetchmail -d 300! The
300 is an interval in seconds to wait between
checking its list of servers. To stop fetchmail, you
simply have to use the command:
fetchmail -q
Sä3MSNV| XflNlll ZL
Hardware ■
Subject page Subject page
Linux novice 74 Hard target 78
ATAIOO with hdparm 74 Burning issue 79
Camera obscura? 74 Prints charming 79
Zio USB Smartmedia 75 Back up, back up! 79
Drive won’t work 75 Read my Zips 80
PCMCIA support 75 Graphire gpm 81
Burning question 76 Canon Can 81
Driving test 76 SCSI fooling 81
Art failure 77 Fake floppies again 81
SCSI-side 77 Mobile music 82
Tricky mouse 78 Oki Printer 83
The write stuff 78 SCSI trouble 83
«I Hardware
Once you’ve decided what you want your
CFLAGS to be, include it in /etc/profile.
Linux novice
f H As a Linux novice I love to try things
I out. This is great but as I now also use
A s ’ Linux for real work I need a safe
backup for my work files. This is my Iomega
zip drive. I have got my zip to work on my PC
and be accessible to users other than root and
have even got an icon on my KDE desktop.
My only problem is that each time I boot up
I have to login as root on bash and ‘modprobe
imm’. I have trawled the HOW-TOs and the
newsgroups but have not found out how to
include the IMM module so it is included by
default. I use SuSE 7.0.
An aside: do you know where I can
download some fax software? There doesn’t
seem to be any with the SuSE distribution.
Chris Fox
i f 1 1 The imm module can be modprobed at
k H k°ot time ky the following to the
I _ lend of rclocal:/sbin/modprobeimm.
You can, if you prefer, add a line to
/etc/modules.conf, which loads the ‘imm’ module
when you access the /dev/pda device, with alias
pda imm. You will then need to perform ‘depmod
-a’ as root, but after that, whenever you come to
access the zip drive, the imm module will beloaded
for you automatically.
As for fax software, HylaFAX is one of the best
fax software packages for Linux. You can download
it from If it does not do what you
want, then freshmeatnet has a wide selection of
alternatives at
ATA100 with hdparm
: I run Debian Woody on my Linux box
and the the default kernel that I’m
2 , currently using – kernel 2.4.16 –
doesn’t enable DMA for my IDE hard drive.
My machine is based on an ¡815 chipset,
so theoretically UDMA100 is supported. But
the hard drive speed is incredibly poor with
this kernel compared to Windows. I know
that I can enable DMA if I build a kernel
myself, but I don’t want to go through this
hassle myself. Is there any other way to
enable DMA?
David Jones, via email
W H You can ena^e DMA without ref
| 1 compiling the kernel. You do this with the
i « 1 tool hdparm. Install this from your Debian
mirror with
apt-get install hdparm
The hdparm command accepts a range of
switches to modify the settings of your IDE
chipset – see the man page for a full list To turn
on DMA use the switch -d1. While you are at it,
use -cl to enable 32-bit transfers to your IDE
chipset and -ml6 to turn on multi-sector mode.
This last one lets the IDE chipset transfer multiple
sectors per interrupt – here set to 16 sectors –
and can lower system overheads significantly. A
setting of 32 should work on most systems, too.
Putting all this together, to speed up transfers on
your drive hda, use the following:
hdparm -cl -di -m 16 /dev/hda
Now you should see a speed up.
Camera obscura?
I want to buy a digital camera for my
husband, who uses Linux (I know very
little about the system). Anyway, the
list of compatible cameras was quite helpful,
except that a lot of the products have since
been updated. For example, two cameras I am
interested in, the Canon A5 and the Olympus
c-830 are now the Canon A10/A20 and
Olympus c-860.
Can you tell me if these updated models
will also be Linux-compatible. I have tried
contacting the manufacturers but to no joy,
Hardware ■
they don’t seem to have heard of Linux, or
want to know about anything that is not
Louise Smith, via email
W V gPhoto 2.0 (see, is
| | 1 software to be used with digital cameras.
1 _ l In its latest version it works with both the
Canon Powershot A10 and A20.
The Olympus C-860L, while not currently
supported by gPhoto (although I have heard
reports that It may work with it), is supported by
the Linux USB mass storage driver
The first option, a camera support by gPhoto, is
much the easiest route to follow. You just need to
download and run the latest version of that
software. The USB storage driver, however, may
need require some setting up before use.
(Depending on how your machine is set up and
which version of Linux you are you using, it may
require that the kernel be re-compiled. Once it is
set up, though, it is dead easy to use. Pictures
stored on the camera can be accessed just like
files stored on a remote disk (which, in fact, is what
they are!).
Zio USB Smartmedia
I am currently trying to get a
microtech Zio USB Smartmedia reader
.V , < to work with Linux. I found a guide to
get it to work that involves rebuilding the
kernel, with support for a Sandisk reader
(driver SDDR09) – which I seem to be having
a few problems with.
The real crux of the issue is surely there
must be a way of compiling the S0DR09 driver
as a module and just adding it to the kernel I
have now, using insmod or modprobe.
Alec Young
You’ve not mentioned what distribution
you use, Alec, but they all will have a
package containing the kernel source
tree (kernel-sources, for example, on RedHat)
which you can then reconfigure and rebuild to add
in the extra module you require.
To build it as a module, you will require the
kernel source in the first place, even if you have
the source code for the individual module.
Rebuilding a clean kernel tree may be an option,
but so many distributions have non-standard
kernels and patch them heavily, making it
somewhat difficult to revert to a regular ‘vanilla’
kernel. The creators of distributions will generally
have updated kernel source, and kernel binary,
packages available on their sites or FTP servers to
use instead.
Drive won’t work
I wonder if you can help me with a
problem that I can’t seem to solve for
myself. I am unable to access my
drives on Mandrake 8. Every time I use
Konqueror to view the /mnt drawer, my
computer just hangs.
I get a similar problem when trying to list
this directory in the terminal window or with a
shell, so it doesn’t seem to be a problem with
Konqueror in particular.
Peter Palmer, Cardiff
I The automount daemon on Mandrake 8
I seem to occassionaly have problems with
I certain removable drives (a shame,
because that’s what its really intended for). I
used to have the same problem with my IDE zip
drive — if there wasn’t a disk in it, whatever
process was looking at the /mnt drawer would
just wait forever (or more accurately, until I killed
the process).
The simple solution is to disable the automount
daemon and mount things manually. Edit
your /etc/fstab file to mount the drives directly,
for example.
/dev,‘zip /mnt/zlp ext2 defaults,user 0 0
Then you can manually mount and unmount
them when required. You might only have to do
this with one drive — CD-ROM drives are usually
okay, but other drives, especially for some reason
IDE ones, can cause problems.
PCMCIA support
„ . – 1 have an IBM A20M laptop and I am
i ¡ § having a 30GB hard disk and 512MB
,;’U, ■* RAM put into it I need to run some
Windows applications, in particular the MYOB
accounting package. I have two CD burners
and I would like to know if any of them can be
made to work with Linux.
I have a FireWire PCMCIA card connected
to an eternal Maxtor 40GBdrive that I use for
backups. Red Hat 7.x and SuSE 7.x detect all
the hardware except, as I expected, the
Winmodem. I was hoping that you might be
able to suggest a decent PCMCIA Linux
supported Modem, or Modem/10-100
network/card combo. Do you know how to get,
burners, or a USB Iomega ZIP CD 650 CD
burner, working with Linux. I was also
wondering if FireWire PCMCIA devices are yet
supported by Linux.
Shane Broomhall, Brisbane Australia
W I I 3Com do a number of very good
V PCMCIA Network/Modem cards. I have f _ Ithe 3CCFEM556-B card in my laptop,
and it works perfectly in Linux. Many other
manufacturers, such as D-Link, have their own
PCMCIA modems, but you should check pcmciacs., for compatibility lists. Be aware
that quite a few PCMCIA cards are actually
Winmodems now, and there are a few 3com
models which don’t work with Linux because of
that. PCMCIA CD burners should be recognised as
an IDE controller, so you can use the ide-scsl
module to allow them to burn CDs as a SCSI
device. It’s worth remembering that Linux 2.4 does
not yet support PCMCIA IDE devices, such as CD
burners and Smart Media adaptors, so you must
run a 2.2.x kernel on your laptop, along with the
latest release of the pcmcia-cs tools from pcmciacs. Quite a selection of PCMCIA
IEEE-1394 (aka FireWire) devices are now
supported by Linux, and a fairly comprehensive list
can be found at http://pcnKiacs. SUPPORTED.CARDS.
Apparently, the IEEE-1394 drivers are still at an
experimental stage, so your success will vary based
upon the kernel version. Your USB CD burner
from Zip, is indeed supported under Linux,
although it is only included In the 2.4 series.
There’s more information available at www2.oneeyed- mdharm/linux-usb/
Burning question
I know the answer to this must be
simple but I just can’t think of how.
The question is: how do I save images
(JPEG, TIF, GIF etc) on to a CD with my CD
burner? I can do this quite simply with
Windows but can’t seem to get it happening
under Linux with either gtoaster, xcdroast or
kreate cd. Can you enlighten me?
From the forums
Gtoaster allows you to drag and drop files
into the ISO filesystem it creates.
■ I l f you have a directory containing files,
ffl 4 1 which you want t0 burn t0 a you first
r mm 1 need to build an ISO using mkisofs, then
burn that file to the CD using cdrecord;
mkisofs -o my.iso to-bura’
cdrecord my.iso
gtoaster will allow you to drag and drop files into
the Filesystem section at the bottom of the
window, and it creates an ISO f lesystem. Don’t
drag them into the track section at the bottom, as
it won’t have a clue what to do with them.
Driving test
I just bought back a DVD drive from
the States. I installed it fine (it was
recognised under Windows) but now I
need to get working under Mandrake 7.2 –
which is proving to be a little more difficult. On
the first reboot into Linux, Kudzu ran and gave
message that it had found the DVD drive.
Question is, what do I do now? Do I look
for a DVD driver in /dev? is it accessed via hdx
as is a CD sometimes (I used to access my
primary CD drive via hdd) depending on its
position in the IDE chain?
Clive Andrews, via email
B f l A DVD drive is usually handled as an A ATAPI device, just like your CD-ROM
1 . 1 drive, so it should be accessible as
/dev/hd?. If you check /var/log/dmesg after boot,
and search for ‘DVD; or the manufacturer of your
drive, it should tell you what it is, such as;
CD/DVD-ROM drive
Once you know what it is, you may want to symlink
that to /dev/dvd. If you are using ide-scsi emulation,
which you probably will if your other CD-ROM
drive is a burner, you will need to check
/var/log/messages after the ide-scsi module has
been initialised and see if it detects your DVD
drive. Since you won’t be burning using the DVD
drive, unless it’s a DVD/CD-RW combination drive,
you will want to use the ‘ignore=hdc’ option within
/etc/modules.conf to stop ide-scsi taking control of
your DVD drive. Using ide-scsi won’t give any
major problems, but since it doesn’t use DMA
when accessing the drive, reading will be slower
and if you are watching DVD movies using xine, it
may be notable that frames are being dropped.
Art failure
S’ h i If Please could you help me with a
problem I have. I want to be able to
I , use my Wacom ArtPad II tablet with
Linux, i am at present using SuSE 7.1 and
would like to remove windows altogether but
would like to use the tablet in GIMP and
H Wj Nearly all of the Wacom tablets are
W A a supported by the various versions of
r _ 1 XFree86 available, and are quite easy to
setup, although you do need to do It by hand.
Assuming that the tablet Is connected to the first
serial port on your machine, you can set it up in
XFree86 4x with:
# declare input devices, later defined
Section “ServerLayout”
Identifier “XFnee86 Configured”
Screen 0 “ScreenO” 0 0
InputDevice “MouseO* “CorePointer”
InputDevice “KeyboardO”
InputDevice “penl” “AlwaysCore”
InputDevice “eraser 1″ “AlwaysCore”
InputDevice “cursor 1” “Always’lore”
Section “Module”
Load “extmod”
Load “xie”
Load “pex5”
Load “glx”
Load “drf
Load “GLcore”
Load “dbe”
Load “wacom” # Wacom Devito
Section “InputDevice”
Identifier “penl”
Driver “wacom”
Option “Type” “stylus“
Option “Device” ” dev/ttySO”
Section “InputDevice”
Identifier “eraser 1 “
Driver “wacom”
Option “Type” “eraser”
Option “Device” “/dev/ttySO”
Section “InputDevice’
Identifier “cursor 1”
Driver “wacom”
Option “Type” “cursor*
Option “Device” “/dev/ttySO”
You also need to make it load the ‘wacom’ module
within the Modules section of your XF86Config file.
More Information is available from wwwJinuxdoc.
I have just been given an AHA-1542b
SCSI controller card and a SyQuest
drive. I have managed to sort out the
jumpers on the controller card and loaded the
aha1542 module, but I can’t figure out what I
am supposed to do next in order to start using
the new drive.
Can you give me at some basic instructions
on setting up SCSI stuff.
Steve, from the forums
Wj V There is little difference between using
SCSI and IDE from the Linux aspect, as
F _> * once you have the module loaded you
can just access the drive via its /dev/sda device.
Once you load the aha 1542 module, check
/proc/scsi/aha 1542/0 and see what devices it has
detected. If it hasn’t detected anything, check the
termination of the cable, as well as the SCSI BIOS,
so as to rule out any Linux-based problem.
As the SyQuest drive is removable, you may
want to setup a supermount/automount entry,
much like your floppy or CD drive, so the
computer attempts to mount it when you access
the directory its filesystem mounts on.
Tricky mouse
I have just installed the SuSE Linux 7.1
Live with the 2.4 Kernel. I found it
, 4 really attractive and simple to set up,
but for one tiny issue: I could not use the
mouse! I had tried the Keyboard method to
rerun YaST2 but to no avail. I’ve read up in
some books and tried SaX, but still no go.
Maybe I am doing something wrong and need
a little more coaching?
1) How do I get the mouse working?
2) I would like to reinstall but there is no
instruction about uninstalling and reinstalling.
How to do it?
Please advise as I am getting hooked on
Linux but see no way of proceeding from here.
The SuSE Live installation, isn’t really
designed to be reconfigured, which is why
you’ll be having problems with YaST2. If
you’re seriously considering using Linux, it’s best to
start off with a proper distribution, be it SuSE,
Mandrake, Red Hat or one of the other distros
available. Aside from the fact that they have more
software Installed, problems you’re experiencing,
such as the mouse not working, are far easier to
get around, as you can actually reconfigure it It will
be a case of uninstalling the SuSE Live distribution
by removing the drive image, then installing the
new distribution. As you are from Singapore, I’m
not sure where you could get your distribution of
choice from, apart from downloading it off the
internet, but there will surely be someone offering
cheap CD-Rs of the popular distributions.
The write stuff
I want to fit a CD-R W and have seen
| ip | one at Watford Electronics site which
lib,, -41 looks like a reasonable buy – well,
cheap, anyway. Its a LG CED8080B.
I’ve looked at the SuSE site and they only
list one CD-R/W and the text is in German
anyway, but my reading of the SuSE manual
seems to suggest that just about any CD-R/W
should work.
Can you advise?
Anthony, from the forums
All recent IDE-attached CD-R/W devices
use the ATAPI standard, so they do not
need to be individually supported by
Linux. You will, however, need to use the ‘ide-scsi’
module so that burning tools, such as cdrecord,
can access the drive which is covered in the
CD-Writing HOW-TO at
Hard target
I’ve got a new AMD Athlon 550 box,
and have installed Mandrake 8.0 on it
I’ve had it running for about a day,
booting into run level 5, but noticed just now
that when I did a [Ctrl][Alt]+F2 to get a
console, the following cryptic and scary
looking message was being repeatedly printed
to the console:
hda:dmaintr: error = 0x84 {DriveStatusError
hda: dmajntr: status = 0x51 fOriveReady
SeekComplete Error}
Looks a tad worrying to me. What does it
mean, and what do I have to do to get rid of
it? Furthermore, is it something to do with the
Mandrake installation, or is it rather to do with
this new box that I just shelled out for?
Cavagai, from the forums
j Assuming ‘hda1 is a hand drive, that is
I indeed a bad thing – Firstly, you might
I want to turn off DMA using hdparm -d 0
/dev/hda, then see if you get any errors. Some
IDE controllers, specifically those from VIA, have
DMA issues which have not been addressed until
some of the later 2.4.x kernel releases. You’ll also
want to check the internal connections between
the HD and the motherboard to make sure that
they’re fully connected.
In either case, you will want to thoroughly fsck
all partitions on the disk to ensure that no
corruption of the filesystems has been caused.
Burning issue
¥ H i 1 0K- , ve set UP our office server using
Linux (Mandrake 7.2) and got the CDR/
W working fine, the USB Zip drive
working, the USB printer working, samba
working, web server etc… But is my boss
happy? No! He went into great detail as to
how, at home, on his own machine he can use
the CD-R/W drive like a hard drive, by
preparing the CDR/W disk in a certain way he
could then just drag and drop files to and from
it Now, we have the CD-R/W shared through
Samba across the network but how can I get it
to have this same functionality?
Yakkerty, from the forums
I This sort of burning uses what is known
as packet writing which, as yet, there is
little support for in Linux. You may want
to keep an eye on the packet writing kernel
patches for Linux over at http://packetcd., but you’re probably best off
sticking to burning an ISO created with ‘mkisofe!
Prints charming
■ I have a Cannon BJC 3000 and am
running Mandrake 7.2 and Windows
I k 4 98 on a P233MMX with a 440TX
motherboard and 48MB RAM.
I have tried both USB and parallel port
cables for this printer and find that there is
little speed difference between USB and
parallel print speeds, but the difference in
print quality is immense.
Mandrake has no problem correctly
identifying the printer and setting it up when it
is connected via the parallel port, but when
hooked up via USB it needed a bit of tinkering.
I have fiddled about with things I have no
idea about in Mandrake so this may make the
difference on my machine, however as parallel
cables are relatively cheap.
¡silly, from the forums
Wjj ’11 The main factor which decides how quick
W k i your Printer is'<s the size ° f the buffer
r _ l This determines how much information it
can read ahead before it prints it As you would
expect, if it only has a small buffer, which many
cheaper printers do, it doesn’t matter how quickly
you can shovel data into it, because it won’t be
able to handle a constant stream with that amount
of printing information. Realistically, USB and
parallel ports are only a factor of ten different in
speed, so unless you have a very large and
complicated image, such as a photo, it is unlikely
that there will be much benefit in using USB
unless the printer has vast amounts of memory to
cache it all.
Back up, back up!
m 1 1 installed Red Hat 7.0 a number of
| weeks ago and was happily learning
w :’l my way around Linux until my hard
drive crashed. How truly annoying that was.
I have now reinstalled Linux on my new
hard drive, but have realised that a number of
files that I downloaded and installed now need
to be downloaded again. The thought of
getting the 28MB Java SDK for a second time
has me wondering about software for my CD
burner so that I can back it up!
So my question is, is there any good
software out there for Linux to enable me to
use my CD-burner? If so, could you go over
any installation and configuration issues that
may arise?
I think that this information would make
many newbies such as myself very happy
indeed! CD burning with Linux doesn’t seem to
be well documented either in books or on the
Internet. Thanks very much for your help.
Andrew Hall
The standard CD burning software for
| j | l Linux Is cdrecord (available from
v wk «freshmeatnet), but requires the use of
the Ide-scsl module, so that your IDE CD burner
appears as a device on a virtual SCSI bus. This
sounds complicated, but it involves nothing more
than compiling a few extra modules and making
sure that they load correctly by adding the
following to /etc/modules.conf
alias scdO sr mod # load sr mod
upon accessof scdO
options ide-cd ignore=hda # don’t load
for /dev/hda
pre-install sg modprobe ide-scsi # load ide-scsi
before sg
pre-install sr mod modprobe ide-scsi # load idescsi
before sr_mod
pre-install ide-scsi modprobe ide-cd # load idecd
before ide-scsi
Then, it is just a matter of doing cdrecord —
scanbus as root, and you’ll be able to find the
device ID, usually 0,0,0 if you don’t have any real
SCSI devices. You can either set a configuration fie
with the device ID and default burn speed, or you
can pass them as arguments at the command line,
cdrecord has a fairly simple set of commands and,
assuming you understand how each component
will affect the burn speed and functionality, there
should be very few problems.
You will also need mkisofs to create the
IS09660 filesystem which you will need to use to
store data on the CD. This builds a filesystem from
a directory structure or file list, and you can mount
it using the loopback device to check that it has
encoded the filenames appropriately and then you
just burn it to the CD using cdrecord.
There are, as you would expect, a number of
graphical front ends to make everything a little less
painful, the best of which is gtoaster which uses
both cdrecord, mkisofs and a number of other
tools to help you avoid creating too many coasters.
gtoaster is a very useable frontend for
cdrecord, the standard Linux CD burner.
There is also the CD-Writing HOW-TO over at, which covers the burning of
CDs in Linux in some depth.
Read my Zips
¥ » 1 1 have got an Iomega Zip drive, that I
wish to use with my Linux system. I
I lk . *4 do not know how to install it or
configure it. I heard that the system has to
detect it as a SCSI disk, but I do not know how
to do that.
tlurlal, via email
j i f I I There are numerous types of Zip drive,
I f A 1 ,rom IDE t0 Parallel to SCSI, and the
f ««. * method you use to access your Zip drive
depends upon the particular model you have. IDE
and SCSI models are easy enough, as Linux will
recognise them at boot time, and you can just
mount them as you would with any device,
remembering to use 7dev/sda4’ rather than
‘/dev/sda! Parallel models are a little more difficult
to set up, as they rely on the ‘ppa’ module in the
kernel. Documentation for all Zip drives, for use
with Linux, is available at
Graphire gpm
I have a Wacom graphire tablet (USB)
which I have finally managed to get
working under X, mainly thanks to the
new kernel and USB support obviously. I also
got used to using a mouse in console mode. I
don’t want to have a “real” mouse and the
Hardware ■
tablet connected all the time, so is there any
way of getting the console to recognise it?
Julio, via entail
( Briefly, it should work fine under gpm, but
check you have a version better than
1.18.1, as earlier ones didn’t support
graphire. If you have try (If the wacom is your only
USB serial device, otherwise check /proc/usb):
killatl gpm ; gpm -t wacom -m
Canon Can
f n Anyone know if it’s possible to run a
Canon BJC 3000 printer with USB
connection in Linux Mandrake 7.2. At
present my family use Windows Me with the
printer set up in USB. If I can’t run USB in
Linux, can I use the spare printer port on the
back of the Canon? Can I use this port without
removing the USB connection in Windows. This
would stop my family screaming at me for
messing up the printer again.
Sarah, via email
I You should find that this printer works
fine on the USB port under Mandrake
7.2. At least, Mandrake will find the
device. Whether or not you can print to it depends
on the driver. Mandrake 7.2 includes the CUPS
system, and Gimp-Print, which provides CUPS
compatible drivers for a whole range of printers.
The Gimp-print driver for the BJC3000 Is
believed to work, but is untested at the moment,
so I’m sure if you get it working, the developers
would appreciate if you surfed on over to gimpprlntsourceforge.
net and let them know.
If, for some reason, Mandrake can’t talk to your
printer over USB, it should be fine to have it
connected via the parallel port Most printers are
happy with this, as long as you don’t try
communicating by both interfaces simultaneously!
SCSI fooling
| I understand there’s a driver emulator
i that would enable me to pass off my
§ IDE tape drive as a SCSI tape drive. I
would appreciate it if you could advise me as
to where I can obtain this in RPM format
John Wallis, via email
WK I S Yes, Linux does have a driver which
W k l makes IDE (or more properly ATAPI)
l _ * drives look to the system like SCSI drives.
The good news is that you already have this driver
– It comes as standard with the Linux kernel – so
you don’t need to install an RPM or anything. The
bad news is that it will probably require that you
rebuild your kernel before you can use it Don’t
worry, this Isn’t nearly as scary as it sounds. If you
haven’t done a kernel build before then check out
our tutorial in Linux Format issue 03 or HOWTO.
There are three kernel drivers that you need to
be concerned about Firstly, the IDE tape driver –
which allows your tape drive to accessed via the
Interface /dev/htO (assuming you only have one
tape drive); secondly, the SCSI emulation driver –
which fools your system into thinking ATAPI devices
are SCSI devices; and thirdly, the SCSI tape driver
– which allows your drive (in combination with the
previous one) to be accessed via /dev/stO.
If your lucky, these drivers will already be built
as kernel modules and installed on your system.
Look in the directories /lib/modules/<KVER>/block
for the files ide-tape.o and ide-scsl.o and in
/lib/modules/<KVER>/scsi for sto (where <KVER>
is your kernel version). If all these are there, then
great. You can choose to mount your drive as
either /dev/htO or /dev/stO without any extra work.
If they are not, then you will have to do some
kernel building. Go to the Block devices page of
the kernel configuration. Select the ATAPI tape
driver as a module (or turn it off completely if you
don’t need it) and select the SCSI emulation driver
as a module. Then go to the SCSI support page
and select the SCSI tape driver as a module. Save
the configuration, build and Install your new kernel
and reboot your machine. That’s all there is to it!
Fake floppies
i I » 1 I’ve been using an LS-120 with Linux
for a while with no major problems. In
hi. 4 order to use an LS-120, you must
compile IDE/ATAPI TAPE support into your
kernel (although you could just use a module).
This is under block devices for those of us
using menuconfig.
Installation boot disk problem can occur if
the installation is almost certainly looking for
/dev/fdO, and an internal LS-120, being an
ATAPI device, will not appear there! So buying
a floppy drive is the easiest option.
Once you’ve got Linux up and running, you
can make your LS-120 appear to all intents
and purposes to be a regular floppy drive by
creating a link from /dev/hdX (where X is the
drive letter corresponding to the LS-120 drive)
to /dev/floppy and /dev/fdO.
As far as using an LS-120 for regular Linux
duties, I can report no problems. The device
appears as the appropriate /dev/hdX,
depending on what IDE channel you have it sat
on, and it recognises the presence of a 3.5
inch floppy or an LS-120. Mtools also works
fine for transferring files to MSDOS-formatted
disks. Just be aware that the line
drive b: file=“/dev/bdX”
may have to be added to /etc/mtools .conf
(where X is the drive letter).
It has to be said, though, that I haven’t
been able to successfully format an msdos
filesystem on an LS-120 under Linux, which is
really the most useful filesystem to have on
one – after all, Linux reads MSDOS, but
MSDOS most certainly doesn’t read ext2!
/proc/ide/hdb/ geometry reports
physical 0/0/0
logical 963/8/32
If anyone knows the appropriate commands to
format a drive, I’d like to know. And should you
just want to format it for the ext2 filesystem,
then the command should do fine:
I run the Shell Script Archive (SCAR) at It allows user
submissions and a basic search facility, but it
needs more content and visitors.
Dan Cray, via email
■f I® Thanks, Dan. As for your problems with
i f k l ,ormattin8 an LS-120 as an MS-DOS
F • » 1 disk, the following would work:
mformat -t 963 -h 8 -n 32 b:
where b is the letter you’ve assigned to the
LS-120, as above. However, we don’t have access
to an LS-120 drive to try it out. The fact that your
drive doesn’t report Its physical geometry is
worrying. Perhaps there’s a bug with the version of
the IDE floppy driver that you’ve Installed. You
could try upgrading to a newer kernel, or trying the
IDE SCSI emulation Instead.
Mobile music
I bought my wife a Merit MP-100 MP3
player from Maycom. Now the
problem I have is that how do I write
to the removable flash multimedia cards using
the high speed MMC external reader supplied.
It has a printer cable connection. Please help, I
have searched all over the web and can not
find anything.
If you could do a article on Freesco
routers that would be cool. I have just set up a
old 486 as a Freesco router and am looking to
find out more about its functions. I’m sure that
there are lots of people out there looking to
experiment with their old machines.
John, Essex
Wj I I I think you’re out of luck with your MP3
m A 1 p l a y e r W e h a v e n t b e e n a b l e t0 t n a c k
i 1 down any useful Information either. Linux
does have drivers for all sorts of weird and
wonderful parallel devices, but unless you can find
out what protocol the card writer uses, you’re
probably not going to get very far It may be that It
uses a protocol that Linux already supports. The
card writer apparently appears to your machine as
a disk drive, so you could try the drivers that are
available. Rebuild your kernel with Parallel Port IDE
device support turned on and try building the
various protocol drivers as modules. You never
know, one of them may work.
One piece of Information that might be of use
to you is that your MP100 device is marketed in
the states as the 1-Jam MP100. Have a look at This might
widen your search criteria when hunting for drivers.
As an aside, If you are looking for an MP3 device
that will work with Linux, then try the Diamond Rio
500. A USB driver for this is available in 2.2.18 and
2.4 kernels.
As for your other point, we have to admit that
Freesco is one of the Linux-based routers distros
that until now had escaped our attention. To read
about Freesco, go to
Oki Printer
¥ m 1 1 recently downloaded a printer driver
| for the Oki 4w. It came as a file
„ . “ oki4linux.tar.gz I used the command
line to unzip and install it in a directory called
oki4linux. When I changed to that directory
and used the make command, all appeared to
work ok. When I then executed the
makeinstall, I was told there was no target
named. Please can you help. I want to install
the driver in a directory that Yast will find. I
also want the Oki printer to run alongside my
already installed HP520.
George, via email
I Linux doesn’t use any sort of printer
I drivers, but uses a filter between your
I computer and the printer port to output
something which the printer can understand.
Usually you would use Ghostscript, which is the
standard PostScript interpreter, but it doesn’t
support all printers. The program you downloaded
should have come with some documentation
stating how to install and use it, once it has been
compiled. If there is no documentation about it’s
use, check the web site you downloaded it from, as
it will probably have a FAQ or a set-up guide. It’s
unlikely that Yast will be aware of this kind of
setup, so you’ll have to configure it all by hand.
There should be no problems running the two
printers together
SCSI trouble
I have been trying to install Linux. I’ve
j U j tried Red Hat 6.1, and this won’t even
boot I’m currently trying Storm Linux.
This boots from the boot floppy but fails to
recognise the SCSI drives, so that I can’t get to
the disk partitioning stage. Can you help?
The machine in question is an 1486/100
based on an SA486 AIO-U motherboard with
an onboard NCR53c810 SCSI interface. The
SCSI bus serves two Quantum SCSI disks. The
machine also has an ATAPI CD-ROM configured
as /dev/hda.
Robert Quim, via email.
WM I I This is a tricky one. The NCR53c810 is
W k 1 definitely one of the SCSI controllers
F _ 1 supported by Linux and, since it’s a PCI
controller you shouldn’t need to pass any boot
options to configure its driver With the distros you
have tried, my guess is that either the driver hasn’t
been present in whatever boot media you’ve been
using or, for some reason, the driver is not finding
your hardware. I don’t know why you cannot get
Red Hat to boot on your machine, but I would
guess your problem with Storm is that the Linux
kernel on the boot disk doesn’t have the driver for
the NCR53c810 built in.
Before you give up hope entirely, I would
recommend giving Debian Linux a try, since it gives
a lot of flexibility at installation time – and the boot
floppy definitely does have the driver for your
controller built in. As a test, go to the Install
Methods section of the Installation page at and download the images for
the rescue and root floppies appropriate for your
machine. Write them onto disks from DOS with
the rawrite command. Now boot from the rescue
disk. Enter ‘floppy’ as the boot method and hit
Return. You will be prompted to insert the other
disk when it is needed. When the installer has
loaded, hit CTRL-ALT-F2 to switch to the second
virtual terminal where you can enter shell
commands. Enter dmesg and hit return. This
should print out the kernel messages produced at
boot time and will give you an idea of what drivers
are being used for what hardware. If, in there
somewhere, it comes up ‘scsi: 0 hosts’ then no
driver has been found for your SCSI controller
Otherwise, it should work. Go get yourself a
Debian CD and give it a try.
By the way, the SCSI HOWTO, although now
unmaintained and showing its age, is a good
source of information for older SCSI controllers
like yours. You can find it in the unmaintained
directory in the HOWTO archive at
Subject page Subject page
Building sound support 86 Picky sound system 89
Silent running 87 Voice recognition 89
Take on tag 87 Silence ain’t golden 89
The sound of silence 87 Sound as a pound 89
Silence is golden 87
Soundcard woes 88
Sound advice 88
m Sound
Mandrake 7.2 is still found
on many PCs but sound
support has improved
since kernel 2.2.17.
Building sound support
I have Mandrake 7.2 power pack
deluxe, which doesn’t support my
‘ soundcard. Having downloaded the
alsa-driver-0.5.11 file, I have been attempting
to make the alsa-driver for an als4000 card. I
have found that when I try the following:
./configure — with-cards=als4000—withkernel=/
No obvious error message is displayed when I
run make install. At the end of the output
display the following is displayed,
make [1): *” [sound.o! Error 1
make [1 ]: leaving directory -/usr/src/alsa-driver-
make: “ [compile! Error 1
Examining the config.log reveals:
Configure: failed program was:
#line 1773 ‘configure’
#indude ‘confdefs.h’
int main(void) {
#ifndef CONFIG SMP
When I run ‘make install’ I get the following at
the end of the output display:
make [1 ] :~ [soundoi Error 1 make { I t leaving
directory ”/usr/srt/alsa-driver-O.5.11 /kerneTmake:
“ (compile! Error 1
I suspect I am missing something obvious.
Ian Topp
Wjjj I I The config.log file is produced by the
f i l ‘configure’ script, so as long as that works
f _ 1 properly, then you can completely ignore
any errors within that file. The error you have given
us from make doesn’t tell us anything, other than
that it failed while building kernel/sound.o, so you
will need to investigate any errors right before that
that it produces, specificly from gcc, to see what
has caused the problem. First, you might want to
check that there is a functional kernel source in
/usr/src/linux-2.2.17 and that your machine is
running 2.2.17, as Alsa needs to be compiled
against the kernel version you are going to use it
with. You may also want to investigate the support
for your sound card in later 2.2 releases, the latest
of which is 2.2.20, or in the 2.4.x kernel tree.
You really don’t want to run ‘make install’
before running ‘make: as it will install things as it
goes along, which often means that when it
breaks, you end up with half an installation which,
no doubt, will actually break the original version of
it installed. The error you sent us is actually the
error from ‘make1 saying that the execution of
something in the makefile, In this case probably
gcc, failed, so it is just going to stop. You didn’t say
what the error from gcc was, so it’s somewhat
difficult to diagnose the problem any further.
Silent running
11 have a 850Mhz AMD Athlon, running
| Mandrake 8 .0 .1 have recently bought
– a soundcard (Xwave 7000) that uses
C-Media drivers (I think!). It works fine when
KDE plays its loading music, and xmms plays
all of my MP3 music perfectly.
The problem is with xine. It plays The Matrix
VCD with smooth visuals, but I can’t seem to
get it to play the audio. I have tried setting the
-A flag with “esd”, “alsa”, and “oss”, and I
have tried several channels in each mode.
xmms tells me that it is using OSS, and I
think I have that and ALSA installed. Why
doesn’t xine work, when all my other apps do?
Chris Nash
Wj 1 When you run xine, it will spit out some
W k ^ information pertaining to the sound
f 1 device, and no doubt yours will be saying
something along the lines of:
All audio drivers init failed – no audio.
However, KDE has a sound daemon known as
‘artsd’ which will be holding the /dev/dsp device, so
xine will not be able to connect to It. We can use
artsdsp xine, or we can disable the sound daemon
using artscontrol, so that xine can use the dsp
device. Depending which one works best, as
artsdsp doesn’t work with all applications, you may
want to construct a small shell script to disable
artsd, run xine, then enable It again.
Take on tag
– 1 hope you can help with this
problem. It’s a problem with XMMS
s;i > from SuSE 7.1 – how do you
download the info from the CDDB?
Michael Griffiths, via email
The info I guess you are referring to is the
track/artist/album info that is displayed
during playback. This is usually contained
In the ID3 or IDv2 tags of the mp3 files
themselves. The CDDB and FreeDB (which is, er,
free), work by using the unique catalog number of
a CD to match up the data in the database to
specific tracks on a CD. Once you have mp3 files
without the tags, there is none of this unique
information contained In the file, so you’ll probably
have to input it yourself.
You can use something like EasyTag
( to add the tags
manually, but if you want It done automatically, use
Grip ( to create the MP3
files in the first place. If you have information
included in the filenames, you could write a script
to rewrite this into the ID3 space, but the exact
mechanics would depend on the filename
The sound of silence
f A 1 When I boot into Mandrake 7.2, and
attempt to play an mp3 audio track
‘ through XMMS, it often gives an error
saying “couldn’t open audio”. If I select:
options/preferences, and change the output
plugin from the default (OSS Driver) to a
different option and ‘apply*, then back to the
default and ‘apply’, usually everything works in
the proper way.
I am certain that the soundcard is set up
correctly, because there is never a problem if I
use KMedia Player for my output. Am I
experiencing a known bug with XMMS (version
1.2.3) or is there anything I can do in the way
of configuration to eliminate the problem?
David Longstaff
KDE uses a daemon which controls the
sound output, so that multiple
applications are able to access the sound
card at once. This is usually handled transparently,
but some applications may have problems. We
tested xmms 1.2.4 and that appeared to work fine
with the OSS plug-in and KDE, so you might find it
best to upgrade and see if you experience the
same problems.
Silence is golden
■ I have the following sound modules
compiled (I had the same for kernel
Ekk, *12.2.18 and they worked fine):
sgalaxy.o, opl3.o, sound.o, soundcore.o,
ad 1848.0 in the
directory. I made a symbolic link
/lib/modules/2.4.2/misc to
m Sound
/lib/modules/2.4.2/kernel/drivers/sound so that
sndconfig would work. I ran sndconfig as I did
for 2.2.18 and both wav and MIDI were fine
and I rebooted. When I use xmms to play a
sound file, nothing comes from the speakers
and it flies through the file much too fast.
W V | Firstly, check to make sure that the
I f k ¥ modules are al1 loaded correctly using
I _ 1 Ismod. If they are, try playing an MP3
with mpg123 <filename> and seeing what
happens, as it may be a permissions problem with
/dev/dsp or the use of a sound daemon, such as
EsounD which is causing the problems. Assuming
that works, check the configuration of xmms to
ensure that it is using the correct plug-in.
If you can’t get any sound out of it at all, and
the modules are not loaded, try to do modprobe
opl3 and then check /var/logI messages to see why
the module failed to load. The sound subsystem
has not changed a great deal between 2.2 and
2.4, so the vast majority of modules should work in
the same way. ‘sndconfig’ will set the ‘sound-slot-1 1
alias in /etc/modules.conf, so by comparing the
modules specified there with those which work
should help solve any conflicts.
Soundcard woes
I have installed Mandrake 7.2.1 was
amazed at how easily it installed. My
lb». 4 problems may sound silly but I
welcome your advice.
I can’t get the ESS 1868 soundcard to work
even though Mandrake recognises it, Linuconf
states that the device is busy.
Also when I installed CorelDraw 9 it would
not run when I click on the icon. I get the
same problem with Opera 4 and OpenOffice
when I unzip or install them. I installed them
to their own folders which I created. (I logged
on as a user as I had read it was dangerous to
repeatedly log on as root).
Gavin, via email
For the ESS card, which is supported by
the Linux kernel, you will need to ensure
that the isapnp system knows how where
the card is, and that the ess 1868.0 module is
passed the correct IRQs and 10 addresses. For
more details, as well as a good description as how
to use isapnp read linux/Documentation/
sound/ESS1868 within the kernel source tree.
For the programs which don’t run correctly,
you’ll have to check what the icons are trying to
run, then ensure you can run them from a terminal
using the same command. As you didn’t install
them as root in a standard location, the binaries
will not be in a standard search path for programs,
so just running opera will fail. Passing the full path
to the binaries should allow them to work correctly.
Sound advice
I purchased and installed SuSe Linux
Personal Edition. The installation was
easy and I very much like what I see.
The problems I have is that Linux knows I have
a SB128 soundcard but says it can’t play
sounds, and refers me to check if it’s ALSA
compatible or something sounding like that
Also, Linux does not recognise my modem
(a Supra Express 56i pro) at all.
Caron, via email
KDE’s audio preferences should allow you to
configure settings for a range of applications.
r V | This soundcard is fairly difficult to install
l a s you need to download kernel modules
* from Creative Labs’ site and Install them
by hand. Everything you need to know, including
where to get them from and how to install them is
You’ll not have as much luck with the modem,
as it Is a CPU-powered WinModem. If you’re
desperate, feel free to try the kernel modules at, but your mileage will vary
and If you intend to use Linux to access the
Internet, the purchase of a external serial modem
would be in your favour
Picky sound system
‘ I’m running Mandrake 7.2. Oddly,
, sound always works in GNOME but so
I I . far it’s only worked once in KDE. I’ve
tried it with Kmix running on the kicker, with
kmix off, and I’ve turned all the knobs up!
Chris, via email
GNOME uses a sound service known as
‘EsounD’ to mix audio from a number of
applications. KDE, however does not
support this sound daemon, so if any KDE
applications try to connect to the sound device,
they will not be able to. Once KDE is up and
running, do ps ax I grep esd to see if it is running,
and kill it appropriately. Often, EsounD is started by
GNOME automatically, but it may also be started
within etc/rc.d/initd by your distribution.
If Mandrake still does not work in KDE, try
using ‘mpg123’ or ‘play1 to play an audio file and
see what the error is.
Voice recognition
I have read a lot about voice
recognition software for PCs. Can I
use these on the Linux platform?
flarion, via email
W 1 1 There are a number of voice recognition
P A * sottware items available for Linux, but
f 1 one of the more popular ones is
Sphinx CMU. Take a look at: www.speech.
Silence ain’t golden
H I 11 installed the Corel Linux alongside
: Win 98SE, but I can’t get any sound. I
-4l ran sndconfig and the message I got
was “No PCI or PnP sound card detected”. I
an Intel BX with on board Yamaha sound.
I have checked the Yamaha site, but there is
no mention of Linux drivers does this mean
there is no drivers available for my sound
card? I have a spare PCI slot on the
motherboard, could I put a card in there and
use that instead?
Kevin Waters, via email
There are several Yamaha audio chipsets
supported under Linux, but unless you
tell us which you have we can’t be of
much help. Look in the devices section of the
Control Panel under Windows for this information.
Corel is based on an old kernel and software
base, so you might get better support by
upgrading to a newer kernel or trying the
ALSA sound-driver package instead (see
Since your Yamaha sound chip is on-board, it’s
likely that it’s an 0PL3-SA-based device. This
chipset is supported both by kernel drivers and by
ALSA. I don’t think it’s a PNP device, however, so
you it may require some manual configuration. You
may find it simpler just to go and buy a PCI
soundcard and plug it in a spare slot. Yes, it will
work, and PCI cards are generally a breeze to get
working. I recommend anything in the
Soundblaster PCI range. The older models should
be available pretty cheaply by now and they’re all
well supported by Linux.
Sound as a pound
f J j | My soundcard does not keep its
settings between each session
l ife apparently kmix will remember them,
but how do I give it command line instructions
when it sits on the panel?
The simplest way to save and restore
sound settings is by using aumix. Set
your sound settings to how you want,
using any mixer then do ‘aumix -S! This will
store the current sound settings in -/.aumixrc, or
/etc/.aumixrc if you’re root. Restoring settings
is done using ‘aumix -L You might like to save
your settings as root, then add a line into
/etc/rc.d/rc.local to restore your settings when
you reboot
Subject page
Mouse for konsole 92
Mandrake 7.0 Deluxe 92
KDE or GNOME? 93
Enlighten me 93
Lock down 94
Screen of death 94
Small fonts, big problems 95
What’s the frequency? 96
No X please, we’re British 96
Feel the force 96
Off the edge 97
Back in black 97
Subject page Subject page
Lost font 98 Login problem 102
GUI crash 98 KDE irritation 103
Where’s KDE? 99 Gnome Alone 103
Red Hat blues 99 Screen resolution 103
High anxiety 99 The silver screen 104
Window swapping 99 Customisation 104
SuSE-friendiy? 100 XFree86 104
X makes the spot 100 Using X 104
Sound and vision? 101 Failing fonts 104
Flashing lizard 102 File classification? 105
Size matters 102
Screen printing 102
I Desktop
Follow the instructions
below to set up IBM
ScrollPaint in X.
House for konsole
rjH 1 1 am using Mandrake 8.0 and need
| your help on the following:
*’ . Is it possible to sort files in KDE
konqueror file manager according to date
while in the detailed format? How can I
configure an IBM ScrollPoint mouse? Prozilla
program can only work from the terminal
(konsole), so is there a way to copy the URL to
the terminal rather than typing it in.
Sometimes the URL is quite long and a typing
mistake is a possibility.
Senta Young
W 11 To start with your first question, once you
V Jj. * are in the ‘Detailed Mode; you just need
f mm 1 to click on the’Modified’tab at the top,
and it will sort all of the files by date Clicking it will
swap between having the latest date at the top,
and having it at the bottom, so you can then list
files whichever way you prefer.
The IBM ScrollPoint mouse can be set up in X
easily, by editing your/etc/X11/XF86Config. Within
the mouse’s InputDevice section, you need to put
Option “ZAxisMappmg” *4 5”
Option “Buttons” ”5″
You may also have to change the Protocol to
IMPS/2, if it does not behave itself. Assuming that
all works successfully, you can download the
Imwheel application from, or from
Mandrake’s FTP server; and Install that If you want
it to run when you start X, or login via xdm/kdm,
then you need to edit your -/.xinitrc or ~/.xsession
files, and add the following line;
imwheel &
If you neglect to include the & at the end, then X
will stop doing anything else, as it will assume that
you want imwheel to run in the foreground. You
will have to switch into a virtual terminal, and kill
off Imwheel for X to continue to load sucessfully.
For your final query, if you want to copy text
between any X applications, you can do so using
the mouse. Use the left button to select the text
you want to copy, and while that Is highlighted, you
can use the middle button to paste that into the
window you want. Generally, terminal applications
will paste in the text where the cursor is at, rather
than where the mouse is, so you will need to
ensure that you put it in the right place before you
do anything, otherwise you may end up In a bit of
a mess. Some applications also permit you to
double-click on a word to select it, and to tripleclick
on a section of text to select it all.As with all X .
applications, you can select text within the Konsole
window using the mouse.
Mandrake 7.0 Deluxe
f , | I am running Mandrake 7.0 Deluxe on
JP a Cyrix 200MHz with 48MB RAM.
Please tell me how I can change the
display settings? Everything is too large on my
monitor, and I can’t find a setting anywhere to
change it. I would be very grateful if you could
indicate how I could change display settings in
Tha CoMKur.ltv i 1 AC
Desktop ■
order to see complete documents and to use
the program properly. The manual I got does
not say how I can do this.
■ I The easiest way to change the ‘size; or
| | 1 resolution, of an X display Is to edit the
i _ 1 /etc/X11/XF86Config (or /etc/XF86Config)
file in order to adjust the default resolution.
You did not mention which video card you
have, so it is quite likely that you are just using the
standard VGA X-server, which only supports
640×480. If that Is the case, you can use
‘XF86Setup’ to change the X configuration and
pick a better supported X server which is specific
to your video card.
If the X-server is the right one for your card,
then you need to edit XF86Config, using
whichever text editor you prefer You will, however,
need to edit it as root You need to edit the
‘Modes’ lines within the ‘Screen’ section, of which
you may have more than one. You need to list the
resolutions you are going to want available, with
your favourite listed first, as X will try each of them
in turn in order to bring up your X display.
If neither of these solutions helps you in
making your system work properly, it is likely,
particularly if you have a very new video card, that
It is not completely supported under Mandrake 7.0.
If you are in this situation, you can either
manually upgrade the X packages, by downloading
them from Mandrake’s website, or you can
‘upgrade’ the entire Installation to Mandrake 8.0.
Of course, depending how much you’ve actually
done to the system, you may prefer to do a
# The accelerated servers (S3, flachSc. HachS, 85IN, mm, AGX. U32, rtachW
« I US. and 5310
Section “5creen”
Or ¡per “«M İ”
Device “fill I’ideo Card’
non it or “LCD Panel’
Default ColorDep*h 16
Subsect ion ‘Display” .
Depth 16 .
nodes “IHeftiiesr “102*M&8“ “880*600’ “6H0hM88” “«0*400″ ”H00h30
6” .■
l>iwPort 0 0
Endiect ion
Section ‘Screen” ,
Driver “FBDei1″
Device ’«II I’ideo C4rd’ •
_ non i+or LCD Panel”
Change your control settings to view
complete documents.
complete reinstall of Mandrake 8.0 to fix
everything up. /etc/XF86Config contains all of the
options for your X server, and allows you to change
the default resolution.
if ^ I I’m getting Mandrake 8 posted from
my friend. I’ve decided to go with
¡1 KDE but I want to be able to use Gtk+
apps like Galeon that use a lot of GNOME. Is
there any easy way to do this? I’ve got 20GB
free on my disk, if there are any space
questions. Maybe I’ll go with GNOME, but KDE
sounds better to me.
From the forums
|JF 1 1 You can run Gtk+ and GNOME
I | 1 applications without running GNOME
r _ l Itself, so if you want to use GIMP under
KDE, you can. The reverse is also true, and you
shouldn’t experience any problems running KDE
applications under GNOME. However, kwm does
not support some of the features which other
GNOME window managers, such as Sawfish or
Enlightenment, does, but it won’t make any
difference to the usage of any Gtk+ applications on
the system. If you are just interested in the
applications, you can run a simple window
manager like Sawfish, and just run any GNOME or
KDE applications you like, and save on a bit of
memory and CPU time in the process.
Enlighten me
V , I installed Enlightenment off my
distro’s CD last night, and now every
time I log into GNOME (or
Enlightenment on its own) I get an error
saying “Lines missing in config file” and then
it gives me the choice to restart
Enlightenment, or quit. Unfortunately this
sometimes locks the computer up totally,
requiring a hard reboot.
I uninstalled Enlightment using RPIIDrake,
and then re-installed it again, but this has
made no difference to the problem. The
confusing thing is that I use Sawfish as my
window manager in GNOME.
Steve Bates, via email
■ Desktop
I Firstly, delete the ‘/.enlightenment
^ ■ directory, as this may have incorrect or
I malformed files from previous efforts. If
you still can’t run Enlightenment, it’s most likely
down to a badly built package, and you’ll either
have to look on your distribution’s FTP server for a
replacement, or build Enlightenment from the
source package available on
Enlightenment needs quite a bundle of libraries
and header files to compile, so it’s up to you
whether or not you want to go to the hassle of
doing that.
The other likely cause for this problem is that
you may be using an incorrectly built or corrupted
theme file. If you are just using the defaults, then
there isn’t much you can do about it, but if you
acquired a theme off the Internet, that could be
causing your difficulties. In that case,
may have some alternative files which you may
find fix the problem.
Lock down
If | | | I • have a Matrox G450 card and
| everything is working perfectly,
i-c. ‘. except when I am logged in as user
the second monitor (1) is not active, i.e I can
start a program, open a file, picture, but I can’t
grab the window-list and move the program on
the screen, I can’t write anything in StarOffice,
change the look of the desktop etc.
When I am logged in as root everything
works exactly as it should. I guess this is
probably a problem with file permissions, but
so far I have not found anything that solves it
Simon, Essex
W 1 | The best thing to do is to check
§ k 1 /var/log/XFree86.0.log and see if there
f mm * are any errors pertaining to the second
head. It seems quite a strange problem, as X itself
should be SUID, so that it runs as root whoever
runs it, but it’s worth checking that
/usr/Xll R6/bin/XFree86 is SUID and owned by
rootroot You didn’t say which window manager or
desktop environment you are trying to use, nor if
root and the normal user are using the same one.
If you’re using the Xinerama extension, where you
can drag windows between the two heads, the
window manager doesn’t need to be aware of the
multi-head configuration, although many, such as
Enlightenment and KWM, are Xinerama-aware to
help with window placement and such like, but if
you’re running on two heads, the Window Manager
needs to be aware that there is a second head.
Very few WMs work like that, and Enlightenment is
really the only one which supports a multi-head
configuration in that manner
Your best option is to login from the console as
the normal user and run:
start – +xinerajna
and X will start up, using the Xinerama extension
to have the desktop span both screens. If this
works, then you’ll need to edit
/etc/Xll/xdm/Xservers to set your graphical login
too to run X with the Xinerama extension, or edit
the startx script to append +xinerama to the X
server options. All of these are covered in the
Xinerama HOW-TO at Check that
you’re running the latest release of XFree86, which
is 4.1.0 at the moment, in case there is a problem
with the mga X driver and the G450.
Screen of death
f « i I have recently upgraded my graphics
card to an ATI Rage Fury Pro. I have a
3 k , – 4 VIA MVP3 chipset running an AMD
K62-400. After installing SuSE 7.2, which I
bought with a friend, the screen image
gradually deteriorates over a couple of
minutes and then the computer completely
locks up X. This is all when using any graphics
acceleration. Red Hat 7.1 locks up almost
immediately as does Mandrake 8.0. My
confusion is: both my ATI and Banshee work
flawlessly with Mandrake 7.2 and xFree 4.01,
but they both lock up in Mandrake 8.0. The
Voodoo works with Red Hat 7.1 and SuSE 7.2
(both of which are using an up-to-date version
of xFree) and the ATI works only briefly in
SuSE 7.2. Any ideas why? I want to use SuSE
as I paid a fair bit for it and I’m not going back
to my Banshee after stumping up £100 for my
ATI card. At the moment it looks like I’ll have
to stick with Mandrake 7.2.
Ray Smith, via email
■T I B It’s almost certainly a compatabillty
| j [ | problem with the X server you are using,
f _> 1 If both cards worked fine with XFree86
4.0.1, you may want to install that distribution of
XFree86. All of the distributions you mentioned
are known to have had a few ‘issues’ when using
XFree86 4.1.0 which, while being the latest release,
still had the odd problem here and there.
If you want to stick to using SuSE 7.2, check
the /etc/Xl 1 /XF86Config file and have a look to
see which driver it’s using for your card and what
exactly it is trying to do. If OpenGL is enabled,
which it will be if it’s loading the ’glx’ module, you
may want to disable that, as it can cause the
machine to lock up quite quickly if it doesn’t like
your hardware. Assuming that the machine syncs
the buffers before locking up, you may be able to
check the XFree86.0.log file in /var/log/ to see if it
complained about anything specific.
Small fonts,
big problems
r j * – I have just a couple of questions…
1. Sometimes, but not always, when
my system first boots the fonts look
really small. I have to log out and restart X,
which corrects the problem. Sometimes I have
to restart X a couple of times to sort it out.
What do you think is wrong?
2. How do you change the way Linux (or
KDE) copies and pastes text? I hate the way it
automatically puts whatever you select with
the mouse into the copy buffer. I want to be
able to copy some text, then select some
other text and paste. This would overwrite the
selected text with the copy buffer.
3 .1 had a command on the Amiga called
SRename that allowed me to rename a load of
files in a directory in one go. For example, if I
had hundreds of files starting with “mod.*’’ in a
directory, I could rename them all to end in
‘”.mod” with one command, (i.e. the file
“mod.fantasy” becomes “fantasy.mod”.)
Is there any program for Linux that would
do this same thing? And, how would I use it?
Chris Nash, via email
WK V Phew, not asking much, are we?
V ^ l Starting with the first question, it depends
r . . 1 which applications are exhibiting the
‘small fonts’ problem. If it’s everything, It could be
that your fonts within the X installation are
incorrectly installed, or set up incorrectly within
your XF86Config or xfs configuration. The best way
to check is to look at /var/log/XFree86.0.log and
see if it gives any hints as to what is causing the
problem. It may also be a problem with your X
server, possibly because you’re using the wrong
one for your video card. Since you didn’t say what
distro release you are using, it’s difficult to guess as
to how old the XFree86 installation you are using
is, so it’s well worth checking for upgrades for
XFree86-4.1.0 for your distribution, on its website.
The way X handles copying and pasting is
entirely up to the application, and most of them
keep to the standard that the selected text lives in
the buffer, as you said. There really isn’t much you
can do about It, other than to rewrite the text
handling part of whatever widget set the
applications use, which is obviously a little extreme.
Renaming files in the fashion you mentioned is
somewhat difficult in Linux, so it requires a little bit
of bash scripting to get it done right If you wanted
to rename everything in the current directory
which starts with ‘mod! to have that removed from
the beginning, and ‘ mod’ added to the end, you
could do:
for f in ‘.mod; do
i=S(echo Sf I sed s/’NthmM sed
■ Desktop
m HBR mv*Sf ■Sidone
The first ‘sed’ command removed the ‘mod’ from
the beginning and the second adds ’.mod’ to the
end of the filename.
What’s the frequency?
Has anyone managed to get the
Geforce2 MX working on Mandrake 8
| (or anything) at 1600 x 1200?
The new driver from NVIDIA only offers
1200 x something. I’m running at 1600 in
Windows, so the card and monitor are
definitely capable of it
I tried to force it to 1600 using the “show
all” option in the Mandrake control panel, but
although it showed the test image okay, the
machine bombed when I confirmed that I
wanted the new resolution.
Ken, from the forums
M I B There is both the binary nVidia driver;
W k * frorn their site’ and the nv’tlriver
F o« 1 included as part of XFree86 4.x, both of
which should work at the desired resolution. The
best option is to run startx from the console, or
check /var/log/XFree86.0.log, and figure out why it
didn’t like the 1600×1200 mode line. It’s quite
possible that you’ve entered the incorrect
horizontal and vertical frequencies for your monitor,
and since XFree86 does not think that it is
capable of going up to 1600×1200, it’s not going
to attempt to drive it that hard.
No X please,
we’re British
: I’ve started to learn to program in C
I on an old P75 running Storm Linux
I (Debian-based). I’m running
everything from the command line (not
enough room for X), but I have problems.
Firstly, My keyboard isn’t mapped correctly
which is incredibly frustrating! Can you tell me
how to change this from the command line? I
want to change it from whatever it is at the
moment to a standard British one.
Secondly, I keep running into errors when
compiling my first program (I’m sure the code
is okay because I got it from a book!). This is
what I get:
# get samp.c -o samp
satnp.c:1: stdio.h: No such file or directory.
I presume this means the stdio.h library isn’t
present? How can I fix this, and add all the
other libraries I might need?
The keyboard map is setup using
kbdeonfig, where you should step through
¡386/querty and pick the appropriate
British keyboard, then reboot the machine to have
it remapped.
Secondly stdio.h is from the glibc development
packages, which is small enough to fit onto a
floppy disk. However, you’ll probably not have many
of the other header files for compiling code
against some libraries, which will require you to
download plenty of other things. Since Stormix is a
discontinued distribution, and it appears as if your
installation doesn’t have much of what you need,
you may want to reinstall the machine using a
proper release of Debian and ensure that you have
a complete collection of packages before you get
to the point where you can’t install anything else
easily. As Debian is updated so easily using apt,
you may want to consider investing in some variety
of networking access for the machine, so that you
can update it quickly when you find that you are
short of something else.
Feel the force
IT m 1 Hope you can help me with this. I’ve
; got a GeForce 256 graphics card, and
lbs, ~ | I have seen that there are drivers
available from NVIDIA. So, I downloaded the
drivers for my distro (Mandrake 8.0), and then
installed the rpms. Then edited the XFree
config files, and restarted.
One reboot later, the NVIDIA splash screen
appears, and it loads KDE. A miracle, it had
worked first time! Or so I thought.
I can’t load any programs that use OpenGL.
Each time I get an error saying no GLX. It loads
NV-GLX, but not GLX or NVIDIA-GLX.
Off the edge
I have a Toshiba Satellite 100CS
laptop running Red Hat 6.0, it has a
1Mb Chips & Technologies CT65548
graphics adapter which runs X quite happily.
The problem I have is that the laptop’s
maximum resolution is 640 x 480, this isn’t
wonderful with window managers such as
KDE. Many years ago I had a setup with
fvwm where I could scroll, (not switch),
around my entire desktop using the edges
of the screen. Is there a similar feature in
KDE or is there any other advice that you
could give for working with this resolution?
Many window managers allow you to set
up multiple desktop areas, and scroll
between them.
j | f 111 KDE supports multiple desktops, which
I | l p can change around by clicking on
f 1 the pager within the task bar, but it
doesn’t have the ability to scroll around the
desktop as you could in FVWM. There is, of
course, nothing stopping you running FVWM
along with KDE applications, although as FVWM
does not support the KDE hints, some
applications may not behave as expected.
There are a million and one window
managers out there, so you may want to take a
look at a couple. Notwithstanding the rather
unpleasant amount of resources some of them
use, the smaller, less graphically intensive WMs
such as IceWM or Sawfish may do a better job
than the standard KDE window manager
I’ve tried all the things it suggests in the
documentation, any advice?
Martin Weidmann
Firstly, have you followed the instructions
which came with the NVIDIA package,
which tells you to remove all instances of
libGL and libGLU, and to replace it with the one
from the package? You must ensure that every
copy of these files are removed from the system –
and they might be in both /usr/lib and /usr/local/lib
– and replaced with new ones.
Back in black
I’m having problems configuring X
under Mandrake 8 .1 can’t find any
A:,, information for refresh rates on the
generic LCD 800X600 display, and I suspect
this may be the cause of the problem.
Changing defaults is all too prone to leaving
me with a black screen. Can you help?
Bernard Moreton
As you’ve not given us any details about
the specific laptop, the chip set the video
card has, nor the X server you’re trying to
use, it’s difficult to establish a reason why it would
do that.
Firstly, check No
doubt, if it is a common problem, then someone
will have created a fix or patch which will make it
work right. If it’s not common and other people
seem to be using the same laptop as you, check
out their configuration and compare it to yours, as
they may be using an entirely different X server or
different settings. You’ll also want to ensure that
you’re running the latest release of the X
distribution you are using, either XFree86 3.3.6 or
XFree86 4.1.0 (which is on this month’s coverdisc),
depending which option you selected when you
installed Mandrake, as well as checking for any incompatibilities with
the X server you are using.
Refreshing windows may also be down to the
window manager you’re using, so checking that
1» Desktop
you’re running the latest release, or trying
something else to see if you experience the same
problem. It may also be that a specific toolkit on
your machine, such as Qt or GTK+ is playing up
and isn’t displaying widgets properly.
Changing the refresh rate won’t make any
difference, as that is purely the rate at which the
display is refreshed and does not affect the X
applications in any way. If you set the refresh rate
too high, it will drive the video chip at a high clock
rate which it may not like, and changing the refresh
rate on an LCD display will make little or no
difference anyway.
Lost font
f > j With nexus.pcf in
§t /usr/X11 R6/lib/X11/fonts/misc,
I ran the following commands as root:
xset fp rehash
/etc/rc-d/initd/xfs restart
But nexus won’t show up in the Konsole font
list (or any other font list for that matter),
xlsfonts does list nexus though.
Even if I don’t enter the xset command (I
don’t need it when using xfs, right?) it just
makes no difference.
I want to use the nexus font at the console
(mainly Konsole in X), and so it needs to be
listed in the font listing in the application I
should think. After entering the above
commands and opening up a new Konsole
window the font is still not there.
From the forums
Nexus is a bit strange, in that ‘mkfontdir’
doesn’t process it correctly. You need to
remove the lines from fonts.dir and
fonts.alias, within the misc directory, and add:
nex6x10.pcf -misc-nexus-medium-r-normaHO-
nexus -mtsc-nexus-medium-r-normaMO-
Once you’ve changed those files, you will need to
restart the ‘xfs1 service, although you don’t need to
use xset, as Nexus is not a font controlled by the
X server
GUI crash
/ ‘ Hy girlfriend has managed to crash
| her X server (whichever version
»Vv A < comes with RH7.1). If you have a GUI
process running and the X server crashes, can
the process continue to run?
I hope I’m wrong, but if the answer to the
above question is no, then it raises an
interesting question. Linux is famous for its
stability. However, in my experience, the
XServer falls on its face every now and then –
even if the rest of the system continues to
work. If you’re using Linux as an everyday
desktop computer (i.e. not a server) and the
majority of the applications you use are
probably GUI-based, then the stability of your
system, depends quite a lot on the stability of
your Xserver.
I know I’m over-simplifying things, since
‘stability’ can mean a lot of things (e.g. one
app doesn’t bring the whole thing down), but I
would be interested to know what you think.
Aaron, via email
Processes which are connected to your X
server will generally die when the X
server dies, as they are smart enough to
know that they should. Occasionally, though, they
can end up being ‘zombie’ processes, which will
need to be killed by hand. Netscape is, rather
unsurprisingly, a rather good example of something
that just won’t die properly.
The stability of the X server is of obvious
importance, hence the reason to make sure that
you keep up with the releases of XFree86, so you
don’t end up with an old X installation which leaks
memory, has security exploits, or just crashes for
no obvious reason every once in a while.
Certain X servers are more stable than others,
so If the need for X to stay up and running is of
major importance, it may be worth spending some
time checking out the different X servers and
seeing which one is the most mature. It’s also
worth buying a video card that you’re sure is fully
supported by your choice of X server.
h \
r i !
Where’s KDE?
While installing KDE I ran into
problems. When I unzip the .bz2 files
». (after altering their names to avoid
truncation under the bash shell on Zipslack,
probably due to the FAT filesystem) there are
no files to configure in the kde directory in the
opt folder. I have checked the KDE website and
they do not mention bz2 files. I hope that you
have any advice as how I can remedy this
situation. And I am a newbie so please try not
to make terms too technical.
Daniel Snowden
H The opt’ folder should copied to one
| | l o f a number of locations, depending
F 1 upon available disk space. Often, /opt is
chosen, but as it rather undesirable to have a large
root filesystem, /usr/opt or /usr/local/opt would be
good alternatives, as both generally have large
amounts of space reserved for installed programs,
although the latter is usually only used for locally
compiled, rather than prebuilt binaries. Once
you’ve put the opt directory wherever you want it,
you just need to set the ‘KDEDIR’ environment
variable to the appropriate path within /etc/profile:
export KDEDIR=iUSr/opt/kde
You will also need to set QTDIR, if it is not already
set, as well as adding /usr/opt/kde/lib to
/etc/ so that anything which needs to load
shared libraries knows where to find them.
Red Hat blues
I had originally installed Red Hat 4.1
with X, and everything worked fine.
– Now I have RH7.0 with XFree86
4.0.1a and it fails to initialise. Claims “Fatal
server error: caught signal 11”. I am using a
CT65550 video adaptor with 2MB vidram.
From the forums
W 1 1 There w i l 1 a far amount of information
1 1 1 spat out by the X server about what it’s
r _ 1 doing, which should be redirected to a file
so that you can actually review it without having to
make sure that you’re not going to loose any of it
This is done with:
startx > -/XFreeJog
You will then be able to see where exactly the
X server failed. Upgrading to XFree86 4.0.3, which
has far broader device support would be very wise,
as well as ensuring that you have all the relevant
upgrades for RH7.0. This should amount to quite a
few MBs, but they are rather handy if you want
your machine to work right.
High anxiety
I’m still fairly new to Linux and taking
the straightforward route during
installation have managed to
successfully install, at different times, SuSE
6.4, SuSE 7.0 and a version of Slackware on a
friend’s computer. I decided to give Debian 2.2
a shot. The installation was problem free until I
hit ‘anXious’ when it cannot determine my
graphics card. However with SAX on SuSE
configuring ‘X’ is a breeze, so I know my card
will work under Linux.
Once anXious on Debian has said ’I don’t
like your card’, I feel the installation process
became derailed because I’m not given the
opportunity to manually tell Debian that my
card is an ELSA ERAZOR III LT. How then do I
tackle the job of installing X on Debian?
Clive, via email
Once Debian is installed you can
reconfigure your X set-up using
XF86Config. You will want to ensure that
you are running the latest version of XFree86,
although you may be better off with 3.3.6 rather
than 4.0.2 due to various incompatibility issues
with some popular cards. Once you’ve configured
your card using XF86Config, you shouldn’t have
any other problems with it under Debian.
Window swapping
I have a problem with KDE and the
desktop windows. Whenever I go near
the edge of the screen, I end up being
flipped or changed into a new desktop. Why?
Bob, from the forums
Ilf H what s happening is that you have active
i j | I desktop borders enabled for KDE. This
l _ 1 means that KDE sets multiple ’virtual’
desktops, and allows you to switch between them
by moving the mouse ‘oft’ the edge of the screen.
You can adjust the sensitivity of this effect, or
turn it off in the KDE Control Centre, under
LookNFeel/Borders. If you wanted to keep the
effect, but make sure you really wanted to switch
screens, the easiest thing to do is increase the
delay, so you will have to purposefully move your
mouse to the edge of the screen and keep It there
before the switch occurs.
f # i H * installed SuSE 7 on a spare 3.2 GB
HD, but I am having trouble setting up
§ 1».’ I my hardware to work with it. My main
concern is not being able to even get a simple
24-bit display of 800×600 sorted. I have a
Voodoo3 2000 AGP on my AMD Athlon 650
box, and I am using a Phillips 105s monitor.
I run Sax but the best I seem to be able to
get is 800×600 or something – so bad I can’t
even see the clock on KDE properly. Also
StarOffice and even YaST2 seem to need
800×600 to function, and I’m normally
confronted with 640×480 when I boot up.
Jerome flcKean
WK V j Edit /etc/Xll /XF86Config with a text
i l l editor, and manually set the resolution
r <_ land the bit depth, so that you are 100
per cent sure what X Is up to. You will want to
change the list of modes for the bit depth you are
using, such as:
Use the DefaultColorDepth setting within the
Screen section to set the bit depth you prefer
Depending upon the release of XFree86 which
SuSE installs, you may want to check any problems
and upgrades for it at
X makes the spot
1 1 have two problems that I’d like help
with. My graphics card is an ATI
v Graphics Ultra Pro PCI and I have a
Dell Ultrascan 17ES monitor. Under Windows
these are capable of 1024×768 at 16-bit
colour. I use the Mach32 XFree86 server. X is
able to run nicely at 1024×768 but no amount
of coaxing will make it switch to 16-bit colour.
When I set DefaultScreenDepth in my
/etc/XF86 Config file to 16, the xserver returns
‘bpp not supported in this version of code’.
Would upgrading to XFree86 4.0.1 help?
My second problem is, in order to get
sound support under Linux, I need to
recompile my kernel with the correct options. I
have done so, but on restart the computer
hangs at Loading kernel. It never makes it to
Decompressing kernel. I did type lilo before
restarting. I have tried make zlmage and make
bzlmage, but neither works. Is there any way
you can help?
John Lunney, Dublin
Without being able to see your
XF86Config file, It’s hand to guess what’s
going wrong. The Mach32 X server does
support 16-bit screens with some RAMDACs,
including the ATI68875 In your Ultra Pro. So are
you sure that your system is actually using the
Mach32 server, rather than, for example, the
generic SVGA server? If It is, then perhaps the
RAMDAC type is set Incorrectly In your config file
or, If It isn’t set at all, the server Is returning an
incorrect type when probing. You could try adding
the line to the section of /etc/X11/XF86 Config that
describes your Mach32 device, and so manually
choose the right RAMDAC:
Ramdac “ATI68875’’
What method did you use to set up X in the first
place? If you didn’t use the graphical XF86Setup
tool, then I’d recommend that you reconfigure with
that. You’ll need to have the VGA16 server Installed
to run XF86Setup and you have to switch all X
servers off before you can start It. On the Cards
page, select List cards and choose your ATI
Graphics Ultra Pro card (it might also be best to
manually select). On the Mode Selection page,
make sure you enable 16bpp and that you select
this as your default mode at the bottom.
You asked about XFree86 4.01. Well, with your
card there shouldn’t be much difference in terms
>»■> vV»M MB xen___________________ _____________ ______________j
Trouble after upgrading? Read on for an
easy solution.»
Sound and vision?
Having managed to install and run a
very functional Mandrake 7.1,1 was
delighted to obtain Mandrake 7.2,
KDE2 and «Office, and immediately
decided to upgrade my installation to the
latest version.
I was horrified to find that using the
“upgrade” option caused my system to crash
with a black screen, presumably a problem
with the X server. So I started again using
the “instairoption, which gave exactly the
same result
After many attempts, I had some success
by using the “expert’ option (which i am
nod) and by selecting thé old version of
XFree86, which enabled me to use an
800X600 display but not 1024×768 which
worked fine on Version 7.1.
Also, Mandrake 7.2 refused to configure
the sound card, but again, “sndconfig” on 7.1
set it up perfectly. I notice that sndconfig
has been dropped from the latest version.
My system is a 500MHz Celeron with
128Mb of RAM, an AT3D 4Mb graphics card,
a 10.2Gb liarddrive and a Crystal 4232
sound card.Audio configuration is handled by
HardDrake in Mandrake 7.2, but it is there.
I was forced to reinstall 7.1 from scratch,
and I would be interested to know if I can
achieve the same configuration as I had with
Mandrake 7.1.
Hugh, Wrexham
Wt 1 1 Mandrake 7.2 had XFree86 version
» A 1 4 0′ M i still had a lot of problems
¥ am 1 with same display cards, although the
Alliance AT3D is supposed to be supported You
couJd try upgrading to version 4.0.2.
You really need to find more information to
find out what’s going wrong. Can you boot into
console login with Mandrake 7.2? Enter ‘liriux 3’
at the ULO prompt to do this.
Now Biter startx to start up X Window;;
manually. If this produces output too quickiy
for you to read, try redirecting the output to a
We, for example: startx 2> xlog.txt. How far
does if get into the start up before things go
wrong? Does it recognise your graphics chip
set? Are there problems with the
XF86Cqnfig file?
The sndconfig tools has been superceded by
HardDrake in Mandrake 7.2. You can start this by
from your desktop menu, or by entering
harddrake from a shell. HardDrake should 1«
able to detect and automatically configure
your soundcard.
of functionality if you use this server You might
even find that it’s worse. You can get experimental
Debian packages at /-branden
Again, for your second question, you haven’t
supplied enough information for us to be able to
solve it When compiling the kernel, I assume you
go through the usual procedure, that is
make clean
make config
make dep
make bzlmage
make install
The make install phase should copy the newly
created kernel image to your /boot directory under
the name vmlinuz-<version> and update some file
links so that /vmlinuz points to that new kernel-
Image. Check that /vmlinuz is actually updated; if
not, you can always delete /vmlinuz and make the
ANSWERS | U N IX | 1 01
links manually. Assuming that everything has
worked, executing iilo should update LILO with the
new kernel image.
A possible cause of the problems might be if
your I boot directory (and hence the kernel image)
isn’t located within the first 1,024 cylinders (usually
the first 8GB) of the drive. You should consider
making a separate I boot partition then.
Alternatively, there might be something awry with
your LILO configuration. To reconfigure LILO, you
can run the liloconfig script to interactively create a
new /etc/lilo. conf file.
Flashing lizard
I have just installed Mozilla, but I’m
: having trouble viewing some sites that
‘ previously worked fine under
Netscape. Flash doesn’t seem to work at all.
Are there any tips you could give me?
Colin, Dunstable
Wf I B You can use pretty much any of the
fr k i Netscape plug-ins with Mozilla. In fact,
f _ 1 you’re probably best off copying all the
plug-ins from the netscape/plugins/ folder to your
Mozilla/plugins folder and ditching Netscape.
Alternatively, download the plugin from
the Metacreations site (www.metacreations.
com), uncompress it (for some reason it is
labelled flash.tar.gz, but it isn’t actually zipped)
and copy the Java class and library into the
Mozilla plug-ins folder It should work fine. You
can check It Is installed by typing aboutpluglns as
the URL
Size matters
If 1 I’m running Red Hat 6.1 on an Olivetti
Echos P75 laptop which has a display
with a resolution of 640×480. The
problem comes when using X windows
applications, such as linux conf. The window is
often too big for the display, and the OK,
Apply etc. buttons are not visible.
I know it is possible to set the dimensions
of a window, but is it possible to set the
maximum size of all windows to 640×480?
How do I do it for root and all users?
Simon Arthur, via email
Wf H Generally, you can’t do that, as an
W k I application will take up more of the
F _ 1 screen if it needs to. Depending on which
window manager you use, you may be able to
make it remember window settings, such as size
and position for particular applications, although it
will only work for a single user
You may also want to set the resolution to
something larger than 640×480, then use the
ViewPort setting in /etc/XF86Config to allow you to
scroll around the desktop, so windows no longer
appear off the screen.
Screen printing
All I need to know is if this is possible.
This afternoon I had to reboot to
Windows just to get a couple of
screen dumps for something I was writing. It
would be a lot easier if there’s a GNOME (or
whatever) equivalent to the easy
PrintScreenlCrl+V sequence in Windows.
m 1 | Most graphics packages, including The
k l GIMP and Xv have facilities to take shots
r 1 of either the whole desktop or Individual
windows. There is, naturally, a command line tool
which does the same thing: import, from the
ImageMagick package. You can grab the whole
desktop with import -window root desk.jpg or by
selecting the window you want to grab with the
xwininfo program then using the window ID as the
argument for the -window switch.
Login problem
I have just installed Mandrake 7.2 and
every thing seemed okay with the
install, except that when I boot I go
straight to a text login prompt after which I go
to a bash command prompt. How do I go
about starting X and is there any way of
stopping it from starting at the text login?
Jim, via email
To make Mandrake boot into gdm,
rather than text console mode, you need
to edit /etc/inittab. There will be a line
which reads:
which you should change to
From here, you can either reboot the machine, or
drop to runlevel 1 with ‘init 1; then go to run level
5 with ‘init 5; at which point you should get a
graphical login under X.
KDE irritation
I have a minor problem with KDE
which, although harmless, is irritating
> 1 – and reminds me of another
operating system. Hopefully your explanation
will increase my understanding generally.
Whenever I log on to KDE I get two error
messages both very similar: “could not find
mime type audio/x-mp3 in
” and for another file “…/kmpg.kdelnk”
The files are indeed not in the directory –
will my life be enhanced by their existence and
if not, can I remove the call to them?
There is probably a really simple solution to
this question, but I would be extremely
appreciate for any assistance that you can
offer me.
Gerry Gavigan, via email
Wj V Not too difficult a problem to sort out. It
| | 1 seems that, for some reason, KDE is
r _ 1 expecting to find a mime type for MP3
files (because it has been defined in the ‘magic’
file, but one doesn’t exist
You could remove the lines from the magic
files, but you are probably better off creating Mime
types for these files – this means that whenever
you double click on one of these files in
kfm/Konqueror, or on the desktop, they will
automatically be played by the appropriate app.
Open up kfm and from the Edit menu, select
Global Mime Types. This will take you to the
relevant directory. Double click on audio, as this is
the place you want to create a MIME type.
From the File menu select New… Mime type
and in the dialog box that pops up, type xmp3.
kdelnk. Press return and the properties box
will spring up. Click on the Binding tab and enter
the details:
PATTERN: ,MP3;.mp3
MIME TYPE: x-mp3
COMMENT: MP3 audio files or whatever
The Default application can be selected from
the list (if you have a KDE registered MP3 player
e.g. Xmms. Krabber is the default tool, it is not as
stable as some of its counterparts. You could just
leave it blank if you want.
Repeat the procedure for MP2 files, your
problems will be over and instant Karma will be
yours… perhaps.
Gnome alone
i »s» I’ve been running out of space on my
J drives, and I was wondering whether
killing off some of the various window
managers I installed might help reclaim some
disk acreage. But how do I safely remove, for
example KDE, and just run GNOME?
WK I B Well, the simplest way is to use an rpm
| | 1 manager like gnorpm, and use this to
* «m. 1 remove the kde packages. However,
many useful tools and utilities rely on the KDE
libraries and support files. If you don’t want to lose
these, the best thing to do is remove the KDE
rpms, apart from kdelibs and kdesupport, and any
of the packages containing software you might
want to keep.
This, and any KDE-based programs you choose
to install, like Kmail for instance, should still work
on your system.
Screen resolution
I ’ l l My GNOME set-up seems to be a little
Ş screwed up. The screen resolution is
atrocious (640×480 or something)
and a bit unuseable – 1 think it’s at a very low
colour depth too, judging by the icons. So how
do I fix it?
Joseph, via email
Wt 1 | First off, it’s nothing to do with GNOME,
| | v it’s likely to be a problem with X. You can
i _ lse e if other screen modes exist by
pressing [Ctrl[[Alt] and + or – on the keypad.
This key combination will cycle through the
available modes.
For a more permanent solution to your
problem, run a configuration tool, make sure you
chose a decent resolution and test it!
The tools to use are XF86Setup or xf86config.
Both of these are best run when X isn’t already
running on your system.
| This may seem like a really simple
question, but how can I customise my
I windows under Gnome?
Sam, via email
W 1 | Most distributions, such as Red Hat,
W k « which use Gnorne as the’r standard X
F mm 1 environment, also use Enlightenment as
the default window manager You can simply
change the theme Enlightenment uses by
downloading one from, then copying
it to: -/.enlightenment/themes/. The Gnome Control
Center can be used to change the theme.
If you don’t use Enlightenment, or you want to
use a different window manager the Control
Center lets you pick from a list of different WMs.
The silver screen
T o Do you know if it is possible to play
QuickTime movies on a Linux box?
ftk> ‘ Jong Connolly
W V Yes. The best movie player for Linux (and W k i ottler Unix P|atforms) is XAnim (take a
r look at the site: which
supports QT and AVI movies with a range of video
and audio codecs, MPEG movies and a variety of
animation formats. However, it can’t handle movies
compressed with Apple’s Sorenson video codec,
which seems to be the most popular format for QT
movies at the moment.
You may like to check out one of the GUI
front-ends for XAnim, such as the GTK-based
GXanim ( or the TK-based
tkxanim (
Also there’s plugger, a multimedia plug-in for
Netscape which plays movie/animation via XAnim
I have installed XFree86 on my Linux
machine, but I realise now that it is
¡¡la,, running in a particularly useless mode.
What’s the best way of reconfiguring it?
Suzanne, Manchester
The standard way to reconfigure XFree86
f 4 1 ls via XF86Setup command. First
f <«» 1 you’ll need to have the machine in a textbased
login mode, using telinit 3’ (or telinit 2’ if it’s
not based on Red Hat) before you can run the
command, as it will cause conflicts if you are
already running an X server XF86Setup will try to
start the VGA16 server for its configuration window,
so make sure that you have this installed.
Using X
How do i quit out of X back to a
command line? I just can’t seem to
figure it out.
Imran, via email
W V lf y°u are not running a display manager
| j [ l such as xdm, then killing the X process
i _ 1 will quit X. But, when using a display
manager, killing X alone is not enough. The
solution it is to kill the window manager You can
find the PID of the X or session manager process
with the ‘ps -A’ command.
Remember that X runs in a virtual terminal, so
all your other terminals should still be available.
You can use [Ctrl][Alt]-Fx, where x is between 1
and 6, to switch to a virtual terminal but keep X
running. To get back to X, use [Ctrl][Alt][F7],
Failing fonts
My Linux system was working fine,
but then xfs started failing on startup
. – and I’m having trouble with KDE. I
can’t see why xfs is failing.
■ i 1 1 It could be a number of different things,
■ A 1 but the usual reason is that you have
f 1 been messing around as root and
somehow changed the permissions for the /tmp
directory, xfs needs to create a couple of
directories in there for font management.
W m
Subject page Subject page
PHP working 108 Twice the fun? 112
Apache on? 108 FTP access 112
Samba 109 Telnet and FTP 112
A new leaf 109 Apache and PHP 113
Auto-Apache 110 Printer sharing 113
Everybody Samba 110 Database disaster 114
SQUIDs in 111 ftp plodding along 114
The root of the problem 111 Mail man 115
Table troubles 112 Email 115
File classification?
Can you help a beginner to understand the complexities of something as basic as the
file association in Linux?
I may be asking the obvious but I presume that there are specific programs
associated with files having the correct extension for these programs to do their job. I would
also presume that, like other operating systems, Linux has a wealth of programs that will
open files with various extensions. For example. Paint Shop Pro opens many image file types
and Word opens many document and text types. Is there a list of Linux programs and the file
types they work with? I know that Gimp can open different image file types and that Gunzip
is more or less limited to .gz files. How can I find out easily what programs are associated
with what files?
I actually asked a similar question via one of the Linux forums and got the reply “why do
you need to know what is associated; surely you just need to know what’s in the file you are
looking at?” Well, how do I do that if I don’t know what program to use to open a file with a
particular extension?
I know to use a text editor to look at .txt files and that Gimp will work with .jpg files, but
what do I do with .tar files and other files that I’m left with after unzipping them after a
What do I do with RPMs, source and debs? They all seem intriguing and I can’t wait to use
them, whatever they are. Your help would drive me on to keep trying with Linux. At the
moment, it’s an uphill struggle.
Derek Logan, via email
r i j Like everything in Linux, it depends on what software you are using. You seem mainly
j | W concerned with the desktop and I assume you are either using KDE or GNOME. With KDE,
¡» 1 you can set fife associations by opening a file manager window (kfm) and selecting the
Global Mime Types option from the Edit menu This will present you with a directory of file classes:
text, image, sound, etc. So, for example, to change the default tool for viewing GIF images, you would
select the images folder to open up the images class and then select GIF. A dialog will pop up, giving
you the properties of the GIF filetype. Go to the Bindings page and look at the bottom and you’ll see
a chooser labelled Default Application which will let you select a tool to view GIFs
Things are much the same with GNOME. Open the Control Center and select Mime Types from
the list on the left. This will present a page on the right with a list of filetypes that your system has
defined. To set a default tool to open MP3 files, for example, double-click on audio/x-mp3. Again, a
dialogue will pop up where you can select, this time, default tools to open, view and edit MP3s. With
GNOME you must specify a complete command line for the tool you wish to launch, with a
placeholder %f marking the place where the name of the file to be viewed will be inserted. For
example, to use XMMS to play MP3s, you would enter xmms %f.
For tar files and other archives, you may set up a file association to view or unpacks these with a
graphical archive tool, such as guitar or karchivuer With the GNOME file manager, you can just
double-click on an archive to access its contents through the file manager.
RPMs are archive which contain software packaged specially for installation on Red Hat systems;
debs are something similar for systems derived from Debian Linux. You should use the appropriate
tool for your distro to view, install and manage these types of archives. The shell command rpm,
unsurprisingly, handles RPM packages, while dpkg handles debs for Debian. If you don’t like using the
shell, there are graphical alternatives like GnoRPM for RPMs and Gnome-Apt for Debian packages.
1 Server
PHP working
I wanted to experiment with Personal
I Home Pages (PHP), so I decided to try
-41 running a few pages on my local host
machine. I got hold of some simple PHP stuff
from a website and put it into a page, but
when I try to view it in a browser, all I get is
the actual script text displayed on the page.
My question is relatively straightforward. How
do I get Personal Home Pages working?
Andy Johnson, London
j j f ■ Your question may be relatively If A 1 straightforward, unfortunately the solution f *»<. 1 to your problem may not be quite as
clear cut Your problem could be caused by any of
a number of factors. Because you are able see the
script as text, it is most likely that you haven’t
pasted the script into the page properly. Normally,
even if php isn’t working properly, the script would
be hidden on most browsers.
PHP scripts should look like this:
iyour script] This lets the web server know this part is script
that needs to be interpreted before the page is
sent to the browser
Secondly, you need to make sure the page has
a php extension. Apache and other web servers
often use this to recognise the fact that a page
contains PHP script – if it doesn’t have the right
extension, it won’t be processed at all.
Finally, it’s a good idea to check that PHP is
installed and working! You can quickly check by
creating a file called ’testphp”:
Now point your browser at it and you should
get a colourful screen full of details on your PHP
installation. If you get nothing, either PHP isn’t
installed, or your Webserver isn’t configured to use
it. Most apache installations set up by distros
include php these days – if you skipped installing
PHP, you can get source from, or
perhaps more easily, visit the download site for
your distro (or hunt on your CD-ROMs) and install
the package for your flavour of Linux.
Apache on?
Is it possible to write a bash shell
script to determine if an Apache
Webserver is running?
If it is possible what is the best way to do this?
Richard Bunting, via email
ffi U It completely depends what it is you
| | | wanting to check for. If you just want to
f 1 ensure that Apache is running, you need
to check the file, which will live in either
/var/run or /usr/local/apache/logs, depending how
the server was installed. This stores the process ID
of the first httpd process spawned, so you can just
check to ensure that this is still running;
if [ ! -f /usr/local’apache/logshttpd pid J: then
echo “Apache is down”
ps ax I grep cat
•usr/local’apache,’logs httpd pid” \
If you are wanting to monitor a set of
network services, Netsaint gives you
notification and a fancy web front end.
T im
&& echo “Apache Is running” \
II echo “Apache is down” IP iilS P Iill
This isn’t 100 per cent reliable, as just because
Apache is running does not mean that it’s capable
of serving anything. The best way to check is to
download a file from the web server and run
md5sum over it. If you know what you’re supposed
download is, and have a copy of the checksum for
that, then you can compare that to what you have
downloaded from the web server. This is also a
handy want to check that Apache, or indeed Perl
or PHP, is correctly connecting to a database
server, if you perform a query on it within the file
which you download.
MD5=S(«vget http;7localhost/testphp outputdocument
»- j md5sum)
if I SMD5 -eq
“cbd8f7984c654c25S12e3d9241ae569r I
echo ‘Apache is running”
echo “Apache is down”
There are a number of programs which can do
all of this for you, such as NetSaint
(www.netsaint.orgl. and notify you when
Apache is down. These perform checks every five
minutes, or whatever you set it to, and log any
problems it has when trying to do it.
I managed to get Samba running fine.
11 can log in to my share and read or
■ write files with no problem. Getting
my printer to cooperate, however, is proving a
bit more difficult.
I’ve got an Epson Stylus 640 setup in SuSE
7.2 and it prints fine in Linux but when I print
to it from Windows the first page prints
fine(ish) then it’s a shambles.
Any help would be much appreciated.
Joe Pender, via email
WM U Printing over Samba is a little confusing,
j f | l a s you need to setup a standard line
i a . 1 printer on the Linux side, and have the
printer drivers setup on Windows, so what would
usually be sent straight to the printer is transported
through Ipd into the printer
You will need a setup a section in your
/etc/printcap on the Linux machine which looks
something like:
You can then select this printer using Windows,
and use the appropriate printer driver for it. You
can, of course, keep the default ‘Ip’ printer setup
correctly in Linux, as long as you don’t try to
convince Windows that it should be using that.
A new leaf
a . j I’ve recently installed Red Hat 7.1 on
my home PC and I’m trying to install
, , • Leafnode as well. However the
instructions I have state the need to add a line
to /etc/inetd.conf, but this file doesn’t seem to
exist. Also doing:
ps axu I grep inet
ps axu I grep tcpd
shows neither are running, even when
connected. I’m presuming Red Hat 7.1 is using
some other file or server, but I can’t find what
it’s using.
Has anyone else come across this and
found a workable solution?
From the forums
gS I S Red Hat 7.1 uses the ‘xinetd’ service,
W A 1 ratfier than the standard ’inetd’ system,
r _ 1 although it does not appear that it is
running either. Check that it is installed with rpm -q
xinetd, then use linuxconf to have the machine run
it at boot time, by adding it to runlevels three
through to five. If it is not installed, you will need to
install it from the distribution CD, or by
downloading it off the Internet.
However the syntax for xinetd is greatly
different to inetd, so you will need to use the
following in /etc/xinetd.conf, rather than the
example from the leafnode configuration:
service nrrtp
ANSWERS | LIN1X | 1 0 9
Once you have a mild
script, you can use a
runlevel editor to set it
to start, or stop, when
you enter a specific
socket, type = stream
protocol = tcp
wait = no
user = news
server = /usr/tocal/sbtn/leafnode
f I’ve managed to compile Apache
1.3.20 on my SuSE Linux 7.1 PPC
Sis.. 4 edition and the Webserver runs fine if
I manually start it with:
/usr/localapache/birVapachectl start
I would like to be able to have this run on
startup/restart and, obviously, close when I
shut the machine down.
I think I need to point to the apachectl
script and that I (probably) need to add some
symbolic links to it from my /etc/init.d/rc?.d
files (although I don’t know which).
From the forums.
W V Yes’ y°u need symlinks in each of the
W k w rc? d directories. You will need to check
F _ 1 /etc/inittab to see which run levels provide
which functions, such as networking or multi-user
access, and decide whether or not you want
Apache running under those conditions. Then, just
symlink ‘apachectl’ to rc?.d/S80apache if you want
it to start, or K20apache if you want it to stop. The
number after the S or the K defines the order in
which it will be started, so 80 will be started near
the end of the boot sequence, and 20 will be
killed near the start of the shutdown sequence
Everybody Samba
I am running a RedHat 7 server and
just can’t get Samba to work. I have
edited the conf file to make it all fit
my network. I then type ‘samba start’ and it
says the usual ‘OKs’ for the two services it
starts. However it doesn’t work. If I type
‘samba stop’ it says ‘failed’ for the two
services, it says it starts, however ‘samba
status’ just say the two services are stopped.
How can I overcome this problem? I can use
the machine as a web server, and I can
smbclient out of the box, so then NIC isn’t the
Ed, via email
V V Samba, from the packages which come
| | 1 with Red Hat 7, puts the logs in
F « * /var/log/samba/log.smb, so there would be
the first port of call. As the nmbd service didn’t
start either, it would suggest that there is a
fundamental problem within your smb.conf file.
You may want to check that you have the latest
release of Samba, getting either the RPM or
building from the source, the latest release being
2.2.0a. The smb.conf file can be very simple, with
only a few entries, along the lines of:
[global] workgroup = WORKGROUP
username map = /’usrilocal/samba/lib’smbusers
socket options ■ TCPNODELAY
remote announce =
comment = mp3
path = /home/me/mp3
public = yes
writable = no
printable = no
As always, it’s best to start off with something nice
and simple, rather than trying to work backwards
once you have a complete configuration which
doesn’t work. Assuming Samba is up and running,
you can test it with smbclient -L //boxname which
will list all of the shares available.
I wish to compile SQUID on
SmoothWall but SmoothWall doesn’t
have gcc installed. To install gcc on
Linux it needs compiling, but I don’t have gcc
installed to compile it.
Paul Francis
If you already have Linux setup on
another machine, which has gcc Installed,
you can build and install SQUID on it,
then copy the build over to the SmoothWall
machine, rather than spending time installing gcc
and all the required build extras, such as make and
autoconf, on the firewall just for SQUID. The
easiest way to do this is to configure SQUID with
the — prefix=/patti/to/ squid option, so all of the
built code, configuration files and anything else all
ends up In one directory, such as /usr/local/squid.
After a make && make install, you can use rsync
to copy the directory over to the firewall, over SSH
with the command:
RSYNC_RSH=ssh rsync -aWvc local;squid .usr/local/squid
This should be run directly from the firewall. This,
of course, requires you to have rsync Installed
on the firewall, which presents a chicken and
egg situation.
scp -r;;usr/local/squid /usr/local/squid
It won’t verify the transferred files against the
originals. Mounting it over NFS, then copying would
be another option if you’re still stuck.
If you need to install other applications beyond
SQUID, you may want to replace the SmoothWall
installation with a more complete distribution,
which will take longer to setup for networking, but
will make it a lot easier to Install additional utilities
and services. Notwithstanding SmoothWall’s
excellent networking features, it’s really not
designed to be used as a proper Linux distribution
from which you can run services or applications. In
fact, it is particularly bad practice to run any sort of
listening service on a firewall, as It opens It up to
possible exploitation which Is not a great idea.
The root of the problem
1 1 have installed MySQL with the SuSE
| Up software add/remove routine in Ya:ST2.
I then ran the mysqljnstall db script
which worked fine, reminding me to change
the password of the mysql admin user. I didn’t
do this because it wouldn’t let me (even
though I was root). I then tried the
mysql_safe db script anyway which terminates
immediately. The log message says something
about missing .frm files. I can run mysqld as
root or myself but not as the user mysql. I
have checked that user mysql exists and all of
the permissions are set OK. The
troubleshooting guide isn’t very helpful – it
describes the error to the letter and as a
solution says ‘please purchase support’ for a
hundred quid!
I only want to test DB’s/cgi/asp before I
upload to my live web site.
Matt, from the forums
After running mysql install_db, you need
to run mysql -u root -h localhost mysql.
This, In turn, will then connect to the
server with the username ‘root: without any
password, and you can then change the root
password with:
password=PASSWORD(“somepassword”) WHERE
user=”roctff •-$%; ‘->-£*■’ iff 1
and, in order to have the change take effect, run:
mysqladmin -u root -h localhost flush-privileges
You will then be able to access the MySQL server
as the user root with the following:
I I Server
mysql -u root -h locathost -p mysql
Give it the password you set
As tor running the server as ‘mysql! you will
need to ensure that the directory containing all the
database tables, which is usually in /var/mysql/, is
owned by the ‘mysql’ user so it can read and write
to them – remember that the MySQL user system
has no relation to the UNIX one, so even if you
access MySQL as the ‘root’ user, you are only
connecting to the server as its ‘root’ user, and it is
still actually running as ‘mysql!
Table troubles
if I I I 1 1 have used MySQL to do real work
for several years, without any
% , ” particular problems.
Well, I am about to start a project involving
VERY big tables, and now people keep telling
me that using MySQL for this is a bad plan. Is
this really the case?
Julian, via entail
B 1 1 MySQL 3.23 has a RAID option, which
W « can be used to split the tables across
f 1 many different files, rather than a single
huge file. Not only will this get around the 2Gb file
size limit within the current kernels, but you can
spread the files across numerous devices to
improve read speeds. Ideally, if you are using any
database application, you need to have as much
RAM in the machine as possible, so it will cache a
larger proportion of the data in memory, rather
than reading and writing to disk all the time. Even
then, MySQL does not perform as well as
PostgreSQL with huge tables, so it may be best to
switch to Postgre and distribute it over a number
of machines.
Twice the fun?
f I am considering the purchase of a
■ reconditioned Compaq wSlOO and
I using its dual processor capability,
with a view of installing Linux as a server for a
small network of eight computers. Is this a
realistic choice or should I look at a more
modem machine? What are the, if any,
instabilities of NFS?
Hickey, via email
W H The specification of a server does, of
* A 1 course’ depend upon what it is you are
F _ 1 serving. If your just going to run a NFS
server, to share home directories or common files,
then you don’t need much CPU power at all, just a
lot of bandwidth and fast drives. I’m not familiar
with the specification of the Compaq machine, but
you could build yourself a high end Athlon based
file server with 256MB of RAM and over 30GB of
disc space for around £400, if that You don’t
really need that much hardware, but chances are
you’ll end up running other network portable
services on it, such as mail or a web cache, which
do require a bit more kick. Second hand machines
are okay, up to a point, but hardware – particularly
end of line – is so cheap now, there is little reason
to buy something which will have compatibility
issues in the near future. What if you wanted to
upgrade the RAM or replace a burnt out CPU?
Sure, you could get the bits eventually, but very
rarely does it warrant the amount of time, hassle
and expense.
FTP access
I installed Wu FTP on a Red Hat Linux
box and it worked great for six
“■ . months. However, it then stopped
accepting real users – although anonymous
works fine. I have checked the hosts password
and shells files but cannot see a fault.
Simon Fox-Jones, via email
i Check any ftp logs and /var/log/messages
| to see if there is any indication of a
I problem. Failing that, try using proftpd, as
it is a lot easier to use and has plenty of extra
features to make it a worthwhile upgrade. Of
course, if that doesn’t work, you’ll want to check
the /etc/passwd file for the shell which the ftp user
uses, and /etc/shells to make sure it’s in there.
Telnet and FTP
§ 11 have just installed Red Hat 7.0 and
| cannot telnet or ftp to my machine. I
, s , „ ‘ get a message saying connection
refused by server. I have installed wu-ftp,
anonftp and telnet-server (the versions that
came with the Red Hat iso image).
1 1 2 | UNIX | ANSWERS
Apache and PHP
I run SuSE7.0, on a Pll 400 with 192MB RAM and 4GB and 9GB SCSI drives. I also
run Apache 1.3.19 installed at /usr/local/apache/ with module=most and shared=tnax.
This set up works well and I host my web page through a permanent 64k pipe.
I tried installing php4.0.4 as I like the look of pages such as and and I would like to emulate these designs in my own pages. But every time
I install php4.0.4 and restart the Apache server I get the following error:
Invalid command ‘LoadModuie’ perhaps mis-spelled of defined by a module not included
in the server configuration.
If I hash (#) out the offending line from httpd.conf ‘LoadModuie envjnodule
libexec/mod’ the error just moves onto the next line and so on. Do you have any
suggestions as to what I can do?
J j f 1 § In order to use PHP as a loadable module, or DSO, in Apache, you need to ensure that
Sr k « Apache has been compiled with support for shared objects. You can check this by running
f ™ 1 httpd -I, which will list all of the modules compiled into the HTTP daemon. If ‘mod so’ is not
listed, then you will need to rebuild Apache with the’—enab!e-module=so’ option, and any others
needed, so that you can use the DSO for PHP with it You could, of course, compile PHP into
Apache, but that would also require Apache to be rebuilt.
By default, in Red Hat 6.1, everything
seemed to be enabled after installing these
RPMS, so I have no idea what needs to be
changed to allow access. I did try putting
ftp:ALL in the hosts.allow file but,
unfortunately, that didn’t work.
I tried putting a posting on one of the big
Linux newsgroups, but I don’t have enough
Linux know how to understand the responses
I’ve received.
Barry-John Theobald, via email
Wj ljg Check /var/log/messages to see what
I | 1 exactly it’s complaining about. Locally, you
1 1 might want to do ‘netstat -nltp’ to list all
programs listening on tcp ports. Check that inetd is
listening on 23 and 21, telnet and ftp respectively. If
not, check that /etc/inetd.conf contains
uncommented references to the telnet and ftp
servers. It could be that it installed the servers, but
left the references to start them commented out
for security reasons, so you’ll have to remove the #
from the lines beginning ‘telnet’ and ‘ftp! After
changing /etc/inetd.conf, you will have to restart it
by doing ‘killall -HUP inetd; then try again.
Printer sharing
I have a printer attached to one of my
Linux boxes and I’m trying to get the
other one to print to it remotely (via
an ethernet LAN). I’ve tried setting everything
that my SuSE 6.3 book tells me and a few
things that I’ve invented on the spot, and I just
can’t get remote printing to work. Please can
you help?
R S Furey, via email.
You don’t say whether you have gotten
the printer to work when printing locally
– that Is, from the machine you wish to
use as the print server I assume that you have.
You also don’t say what software you are using to
manage the printing queue. I assume that it’s the
standard BSD Ipd system.
Now, to be able to print to a remote printer, you
have to create a description of that printer on each
of the client machines. This involves modifying the
/etc/printcap file on each of the clients. You will
need to add an entry such as the following:
# Remote djetSOO
The first line above is a comment, and the second
is the start of the printer definition proper The
latter defines the name of the printer queue as
‘Ip’ and gives it the additional names of ‘dj’ and
‘deskjet! So, for example, you could then print to
this remote printer with the following command
tpr -Qlp document
Ipr -Qdeskjet document
Note that the names of printer queues must be
unique. If a client already has a local printer
attached, you must make sure that the printer
queue corresponding to the remote printer is given
a different name.
The rest of the definition above sets various
attributes for this printer The ‘sd’ attribute specifies
the location of the local spool directory for this
printer You have to create a spool directory on
each client (it gets used when the network is
down, for instance) as well as the print server
The next line gives the address of the printer
server – in this case, the machine ‘confucious’ on
the network ‘localnet’ – and the following line
gives the name of the print queue to print to on
that machine. The ‘Ip’ attribute, when used with a
local printer, gives the name of the device to print
to, for example, /dev/lpr It’s not required for setting
up a remote printer, though, so we just direct it to
/dev/null. The final line is an option to suppress the
printing of banner pages and headers. If you look
at the printcap manpage you will find more
information on specifying a printer definition.
Okay, so the printer client now knows about the
remote printer We just have to tell the print server
which machines are allowed to use its printer To
do this, simply add the name of each machine to
the file /etc/hosts.lpd on the server
Database disaster
\ I have tried to install the binary
\ installation of the Apache/MySQL/Perl
I combination, but I have encountered
a problem. mysql_install_db did not exist on
my CD, just mysql This wasn’t
executable, so I figured out that I actually
needed the mysql Jnstall_db script? Am I
talking out of my backside? Has anyone
complained? Can I get hold of this script on a
disk or CD somewhere?
Antonio Da Costa, via email.
There has been some confusion between
the source and binary distributions. To
install MySQL from the source tarball,
unpack the archive, and then go through the usual
Vconfigure; ‘make’ and ‘make install’ routine.
MySQL will be installed in the ‘/usr/local’ tree
by default To instead put it in a directory called
Vusr/local/mysqi; as per the tutorial, you would pass
the optionprefix=/usr/local/mysqr to the
configure script When you install MySQL, the
mysql_install_db script will be created for youl.
ftp plodding along
| H Can you help me with an ftp problem
that I have? I find making an ftp
it’,-. connection from a Windows PC to a
Linux workstation painfully slow and the logon
screen takes ages to appear. Once connected,
however, data transfer seems rapid enough.
What am I doing wrong?
I use ftp connections to Sun Solaris
Workstations with no apparent problem; logon
is extremely quick. Thank you for your help.
Richard Purves
You don’t specify which ftp daemon your
server is running, or even which Linux
distro you are using. Without this, we can
only guess at what’s causing the problem.
I assume you are using wu-ftpd since this is the
most commonly installed ftp server on Linux. An
easy way to check, if you are not sure, is to check
the welcome message returned from the server
when you first log in.
If you are in fact running wu-ftpd, then the
login delay is because the server is trying to
identify you. wu-ftpd is typically set up by default to
perform authentication according to RFC931, and it
attempts to verify that you actually are who you
say you are when you log-in.
1 1 4 | UNIX | ANSWERS
Authentication occurs over port 113, but if your
server has a firewall which is blocking
communication on this port, wu-ftpd will wait for
10 seconds (its default time-out period for
RFC931 authentication) before carrying on. You
can rectify this by either reconfiguring your firewall
or by disabling authentication in wu-ftpd. Since
wu-ftpd doesn’t act on any information it retrieves
during the authentication process (it only stores it
in its log) disabling shouldn’t pose a security risk.
RFC931 authentication can be turned off in
wu-ftpd by adding the following line to your
ftpaccess file (which should be in /etc/ftpaccess)
timeout RFC931 0
If you already have a line specifying the
timeout delay for the RFC931 protocol, simply
change it to 0.
See for more information on
wu-ftpd and consult one of the many RFC archives
for details on RFC931. The official RFC repository
may be accessed at
Mail man
j I have installed Storm Linux 2000.
? The trouble is, I want to set up a mail
server with this version of Linux and
things are quite different from Red Hat in here.
Richard Sanusi
■F ■ You haven’t mentioned what sort of mail
W A 1 sefver y°u want to set up. Is it to handle
F _ 1 incoming or outgoing mail? I assume you
mean an SMTP server since this is the most basic
mail service. Debian, and so Storm, have a choice
in this area between smail, sendmail and exim. Of
these, exim is generally the preferred option. The
exim package should be installed for you by
default since it is an ‘important’ package. If it’s not
installed, use the package manager to install it
from the CD.
To set up exim you need to modify the file
/etc/exim.conf. This can be done manually or more
simply by running the script eximconfig. The latter
will ask you a series of questions and your answers
will depend on what you require of your mail sever
Again, you’ve given us no information.
Setting up a mail server can be rather involved,
depending on what you need. This is not really the
place to go into too much detail, so consult exim’s
documentation on the net at
Perhaps if there’s enough demand we could run a
tutorial on configuring a mail server
f m 1 1 am a network manager working in a
school and am always looking for
ways of making the limited resources
that the IT department has go that little
further. Is there an easy way to add multiple
users to a Linux server and provide email
access to each user? Once added to the
system, is there a method of easily controlling
the users so that email access can be
suspended, scheduled to particular times or
revoked for pupils and members of staff
leaving the school?
The simplest way to set up mail on a
Linux server is to use a mail server like
qmail (, which is fairly
straightforward to set up. Once you’ve got the mail
server configured, anyone with accounts on the
machine can have email sent to them, and can
fetch it via either a pop3 or imap4 server
Documentation about installing and configuring
qmail and setting up servers for mail fetching are
all available from the qmail website.
As for blocking email facilities during specified
periods of time; as long as you make them use
IMAP, which will allow them to read the mail on
the main server using any mail client, you can set
up a cronjob which uses ipchains to deny access to
a specific port. A second cronjob could then be
used to allow access to the port.
ANSWERS | U N IX | 11 5
Programming ■

Subject page Subject page
Compiling Fortran 118 Code conundrum 119
Diving with Perl 118 Lost with libraries 120
Missing headers 118 DIY RPMs? 121
Perl problem 119
Script keeper 119
Compiling Fortran
* One of the main reasons I started
using Linux was the restriction
, imposed by Microsoft on the amount
of memory available for executing programs,
in my research work on breathing problems in
babies, I have had to use Fortran on a Unix
platform at work. Now that I am working
mainly at home, I would like to run my
Fortran77 programs on Linux. I am using SuSE
Linux 7.1.
I cannot find an open source Fortran77
compiler. When I run gcc -f progname.f I get
the reply:
gcc installation problem, cannot exec ‘f771’ No
such file or directory
Can anyone help me find a Fortran77 compiler
to run on SuSE Linux 7.1?
Yours sincerely,
Michael Hathorn
i f I B The GNU Fortran compiler is called g77,
f i la n d should be distributed along with your
i *»*> 1 gcc and g++ packages. Assuming you
have §7 7 installed, you will be able to symlink that
to T77r, so that gcx: -f prog.f will work properly If
you do not have g77 installed, which you can
check with which g77, you should find it on your
distribution’s CD, or on their FTP site. Should you
want to build it from source, it is bundled as part of
the gcc package at Remove your
existing gcc packages before trying to install the
source distribution.
Diving with Perl f m f *have a short **erl scrip1 wh’ch reatls
and makes an index of the files on a
i k . 4|i CD. The relevant snippet of code is:
# Go recursively through all files in
processing each in turn
findft&process, Sstartdir);
# Sstartdir is mount point of CD
sub process (
print-$! $#\n” ; # Added for debugging
when script stopped working
# might be a directory, if so, don’t index it
if (!-d SFife::Find:»iame) (
Ssql = “insert into file values (”
print “SQL insert is Ssc^An”; # More
Sresult = Sdbh->query($sql);
Find is supposed to go recursively through all
directories and subdirectories and the script
works fine for my earlier CD-ROMS, but for all
later ones Find reads the root directory of the
CD-ROM, finds the files and directories in it,
but fails to enter the directories, giving an
Illegal seek error.
As far as I can see the file permissions on
the CD are the same, and in any case it still
doesn’t work if I run the script su’d to root.
Any suggestions?
Edward Evans, via email
V S Seek errors are usually down to a
| | 1 problem with the CD itself, rather than
f «m. 1 with your script. There may be one
particular directory which is causing problems and
stopping the rest from working, notwithstanding
any problems with your code.
After running your script, and getting the
error, check /var/log/messages and see what is
being logged by the kernel when it tries to open
a directory.
Are you able to run find over the mounted
CD-ROM filesystem without it causing any errors?
Since Flle::Find just uses öpendir, readdir and
clösedir there isn’t really a simple alternative
method of performing filesystem searches in Perl,
so you can’t replace the usage of File::Find with
something else.
Missing headers
î” – 1 1 have been attempting to follow an
| OpenGL tutorial and to compile
i GTKAda. However, I don’t appear to
have the required OpenGL headers or libraries
on my system. I have Mesa3D installed and
have searched my Mandrake 7.1 disc for a
Mesa development package, but can’t find it
anywhere. Should I have the headers and
libraries already? If so where are they? If
they’re not installed by default, where can I
get them?
Stuart, from the forums.
W H The Mesa headers shoulcl be part of a
W A » mesa-devel package, although the
r — 1 libraries will have been installed as part of
the main Mesa package. Unless you have the
headers Installed, the test program which GTKAda
uses to check that Mesa is installed will not
compile, so it won’t flag Mesa as being installed.
If the mesa-devel package is not on your
CD, you’ll be able to download it from a Mandrake
mirror or An alternative may
be to remove the existing ‘mesa’ package and
compile Mesa from source (
projects/mesa), which will install both the libraries
and headers.
Perl problem
– | I apologise if this is simple, but it is
frustrating me immensely. I have a
Iks., 41 Perl CGI script that takes an image file
from me and writes it to the images file on my
Linux box. The script is failing with ‘permission
denied’ in the error log. What exactly should
the images directory permissions be set to for
this to work properly?
Many, many thanks for any help given!
Steven Edwards, Aldershot
m m The script will be running as the user
i l l who the web server runs under, as
f «*» 1 defined in the httpd.conf file. Generally,
this is the ‘nobody’ or ’httpd’ user, and since the
directory you’re writing to will be owned by your
user, it will not have permissions to write to a file
in it.
You can either chmod 777 dir, which will
enable everyone to write to the directory, or you
can use chown to change the uid/gid of the
directory in question to the user who is running
Apache. If you decide on the latter this will need to
be done as root.
Script keeper
I’m quite new to Linux and I’m having
problems writing a script The script
first goes through and replaces all
tabs in a text file with spaces, I use the
following command:
tr -s ‘ f ‘ ’ <file> newfile
I then want to go through and replace all
occurrences of m with a space. I first thought
of using tr but found this no good. Do you
know of a way that I can do this? It doesn’t
matter if it is in one or two commands.
From the forums
Wj ■ The easiest way to do a global replace is
I f k H t0 use sed’ wh’cfl takes text fram stdin,
f _ 1 processes it, then spits it out stdout..
Swapping m for a space is done with:
so, to combine the two into a single command, we
would use a pipe:
tr -s t\ <«!e I sedsAmJ/W> newfile
The arguments for the tr command don’t need to
be Included within quotes, so we can remove them
around the t, but we have to escape the space
with a \ at the shell.
Code conundrum
I ® ■ So far> everything that I have tried to
do while running Linux has been painfree
and uncomplicated. I am having
one problem, however: I’m using Mandrake 7.2
on my laptop and I’m trying to learn C++.
Using gcc (2.95.3), the code I’ve been writing
has been compiling fine, but BASH gives me a
‘command not found’ error when I try to run
anything. I thought it might have something to
do with the difference between a.out and ELF,
but according to the gcc HOWTO, both my
system and the compiler are dealing in
ELF.(Interestingly, if I don’t specify an output
file it creates one called “a.out”.)
Any ideas what I could be doing wrong?
Jim, via email
■ I l f you don’t specify an output file, gcc,
| | 1 along with many other compilers, will just
r _ 1 call the executable a.out there’s no
Lost with libraries
I have been trying my hand at C
programming and keep tripping
over the Linux library system,
especially when trying to use X. The libraries
and include files seem to be spread around
the system almost at random, although I am
sure there is a reason for everything! I
understand how to add library and include
paths to the “” file but there are
always a few files located in an unsearched
directory. I have tried compiling programs
from the command line using lots of include
and library paths but the whole thing
becomes very, very complicated. I have
seen a reference to “ /etc/ld.conf “ which
might be a tidy solution to the problem. My
system only has ” /etc/” is this the
same thing or should I create a * Id.conf “
link to it?
There must be a way to create an
organised library system which will make
programming simpler, and I rather hope you
might have the answer to my problem!
Many thanks for any help.
Richard Purvei, via email
S F H when cowpiling against a library IF k * (whether a shared library or static
i 1 library), your compiler needs to know
where to find the header files which declare the
library’s API, it also needs to find the library
code itself. It will took for these things in a
number standard places. Standard libraries will
be in the directories /lib and /usr/lib and standard
headers will be in /usr/include. The compiler
problem there. I think what you are doing is failing
to use BASH properly. There are two ways you can
execute a command or program using BASH and
most other shells. Firstly, you can place the
executable file in the PATH that BASH checks for
commands. The PATH is normally defined in the
.bashrc file you’ll find in your home directory, and is
stored as an environment variable. Type: echo
SPATH to see the current path on your system.
should be set up by default to look in these
places (and a few others). You can check gee’s
search paths with the following command:
gcc —print-search-dirs
Some packages, such as X, will store their
includes and libraries in other places, however In
the case of X, this will be /usr/XIl R6/include for
headers and /usr/XIl RS/lib for libraries. If you
want to use such libraries, you need to inform
the compiler where these headers and libs are.
You can add paths to the header search path
with the -I switch in gcc and paths to library
search path with -L. So to compile something
which uses libXII, lor example, you might do
gcc -l/usr/X11 R6/inchide –
t usr/XlIR&lib -1X11 myprogx –
X is a bit difficult to use like this, simply because
there are lots of separate X libraries and you’ll
probably need several of them in any program.
There is no alternative but to manually specify
which libraries you need with the -I switch.
Some packages, however, include scripts
which make finding includes and libraries easier
For example, GTK+ supplies the gtk-config tool
which will print out the necessary header
paths, library path and libraries for compiling
programs against GTK+. To compile, you can do
something like:
gcc mygtkprogx gtk-config —
and to link you would do.
gcc mygtkprog.o -omygtkprog
gtk-config —libs’
Note that the apostrophe’s used in the lines
above are actually opening single quote marks.
There is another way to execute a program,
which is to give its path. When there is a path in
front of the command, BASH knows that it isn’t
expecting to find it in the paths that it normally
checks for in commands. You have to do this, even
if you are in the same directory as the file you want
to execute. In that case you would use the. which
is interpreted as the current directory: Ja.out
This should solve your problem.
A command sandwiched between these quotes
is executed and its output substituted into the
command line.
You can also make things easier with some
variables. Gcc will also look for includes in the
directories specified by C_INCLUDE_PATH and
for libs in those specified by LIBRARY PATH
(g++ will look for includes in
LIBRARY. PATH=,usr/Xll R&iib
will make sure gcc looks for libs in X’s library
store. A better solution is to use makefiles and to
define variables to hold the necessary paths.
Using tools like autoconf will help automate
things even more.
The file /etc/ld/so.conf is no help when it
comes to compiling programs It is used to
specify a list of extra paths (besides /lib and
/usr/lib) that the run-time linker will use to
search for shared libraries. If you want to install
libraries in non-standard places and have them
globally accessible then you can add paths to
this file. To modify /etc/ld.conf, you’ll need to be
logged in as root and you can use a text editor
for the job. After modifying, you must run
/sbin/ldconfig to update the run-time linker’s
library cache. You can also temporarily add
paths to the library search path via the
environment variable LDJ.IBRARYJWH.
For example, try the following command:
LD LIBRAfiY PATH»/usr/local’lib
You should also take a look at the gee’s
documentation and the manpage for
more information.
How do i make RPMs from source
code? It’s easier then to uninstall
software at a later date, and I can
donate an RPM that has been compiled on my
machine then! I use Mandrake 7.0 on an Intelbased
Adrian Gibbons, via email
IIS’ Ig It is not too difficult to build an RPM, but
1? A l i,isa rather more involved process than
I mm, 1 we a have time to cover in much detail
here. See the RPM HowTo at for
more detailed information.
The basic steps are to get the source code,
turn any changes you make to the source to get it
to build on your particular distro into a patch and
then create a spec file. The spec files contains
various meta-information about the package to
build – name, version numbers, dependencies, etc.
– and instructions on how to build the package. It
also contain various scripts to take care of actually
installing, configuring and removing the package
from a system.
Building RPMs shouldn’t differ between
architectures and distro flavours, but different
distributions have different standards governing
how packages should be installed. Mandrake, for
example, have their own version of the RPM
HowTo. Have a look at www.linuxmandrake.
Subject page Subject page
Iptables vs ipchains 124 Virus? What virus? 126
ipchains again 124 Stay secure 127
Code Red alert 125 Limited access 127
Linux protection 125
No love lost 125
M’ ‘ – V –
Iptables vs ipchains
I have been working with Linux for
I one year now and I like it very much,
lb ,, 41 Recently, I have set up a LAN with
Red Hat 7.1 server and a Samba that handles
few Win95/98 (in the future Win2000) as
clients (operating as print server, file server
and so on). I have an internet connection
through an ISP which provides up to 10 Kbits/s
data transfer through fiber-optics cables (I am
based in Milano, Italy).
The reason I am asking your help is
because I have problems making the Red Hat
7.1 server also operate as a router for the PC
clients. The server has two Ethernet cards, one
to the HUB (static TCP/IP), the other direct to
ISP, which needs to be set up with an IP
dynamically assigned. I have recompiled a new
kernel (2.4.3 release) and the main problem I
am experiencing, (first of all that the clients
don’t have access to internet) is that when I
am trying to adjust the file Vetc/init.d/network’
inserting something like:
ipchains P forward DENY
ipchains A forward i ethl -jMASQ
This will not be acknowledged: in facts when I
send this command:
cat /proc/net/ip Jwchains
The answer is that there is no file such as
this, while it should list the appropriate data if
everything is correct
Thank you very much for your help.
Filippo Del Favero, Milan Italy
W « I f you are using the 2.4 kernel series, and
» A « ^ave no ex’st’n8 firewall configuration, you
‘ _ 1 should really start with an Iptables based
configuration, rather than ipchains. The reason you
can’t find /proc/net/ip fwchains, Is down to you not
having ipchains support in the kernel. You will want
to rebuild your kernel with netfilter support, then
select all of the iptables options as modules. When
you bring the machine back up, you can modprobe
ipjables, then proceed to use the iptables binary
configure it.
Assuming that ethO is the external NIC, and
ethl is for your LAN, you would use something
similar to the following,
iptables -t nat -A POSTROUTING -o ethO -s -j MASQUERADE
ipchains again
I am trying to lock down and tweak
my internet gateway machine to
perfection and get it working 100 per
cent and completely secure. I am using a
Packard Bell Spirit 500, with Red Hat 7.0 and
kernel 2.2.16-22 (I cannot upgrade to a 2.4
kernel as my machine hangs on Kswapd see
earlier mail). I want to masq my internal LAN
out to the world using ipchains. I know this
should be done by adding the line -a
10.11.216/24 217.X.X -j or something like that
to /etc/sysconfig/ipchains. I could never get this
to work. To get around this I botched the
startup file to look like this,
ipchains -Z
echo -n “Applying ipchains firewall rules:”
echo touch /var/lodc/subsys/ipdiains
You’ll notice that I added the ’-A forward’ stuff
to the standard file. What I would like to do is
know the correct line to add to
/etc/sysconfig/ipchains to do the same thing so
that I can put my startup file back to normal.
Matt Darcy
WÊ Wj /etc/sysconfig/lpchalns Is a RedHat
W A i f sPec’f>c ipchains configuration file, and
f _ 1 isn’t really very useful. A better option is
to use the ipchains-save and ipchains-restore
commands, to save and load Ipchains rules, so
they are stored when you reboot the machine. Of
course, for security, you would not make it
automatically save the rules when you shutdown,
but you would want to use ipchains-restore to
install the desired configuration when you reboot.
You would firstly need to setup your ipchains
results as desired, then run;
# ipchains-save > /etc/ipchains
grep -v “/’|f:space:J]‘#“ SIPCHAINS CONF1G I
grep -v \ “‘([:space:jr$’ I /sbiiVipchains -A forward
-s -j MASQ && i
success “Applying ipchains firewall rules’ I!
failure “Applying ipchains firewall rules”
1 2 4 | UNIX | ANSWERS
Security ■
Then edit the /etc/rtd/inild/ipchains file, which
loads the ipchains entries, to look something
similar to
ipchains -Z
echo -n “Applying Ipchains firewall rules: “ /sbirV
Ipchains-restore < /etc/i pchains
&& success “Applying ipchains firewall rules’ II
failure “Applying ipchains firewall rules’
touch /var/log’subsys/ipchatns
Code Red alert
I am running Apache with RedHat 7.1
and have noticed in the logs the ‘hits’
– from the Code Red virus and now this
new one which looks for cmd.exe etc. is there
any method, besides configuring the firewall to
reject these, to either delete or prevent their
attempts at accessing the web server?
Both viruses do not appear to be causing
any damage to the system, but the constant
attempts to penetrate the system is consuming
a lot of bandwidth etc. It would be nice if
there was a script or something similar which
could prevent these attacks.
Wallace Hills, Brisbane, Australia
The actual Code Red requests take up
very little bandwidth, as the whole
connection is just a few hundred bytes.
Of course, if it doesn’t just 404, and returns a
huge web page, then you’re going to have
problems. Code Red, and its variants, along with
Nimda, are of no threat at all to a Linux system, or
indeed any machine running Apache, so there is
no need to worry that it may exploit or damage
your machine.
The main problem with them is that they
perform so many requests on the server that they
often fill up most of the log file with nonsense
which you’re not interested in. Since they actually
scan the network, rather than connect by name,
you might want to point the log files of your default
virtual host to /dev/null. The only real way to block
Code Red and Nimda is with a active firewall or
proxy which can ‘vet’ the incoming connections.
You’ll still experience the same amount of
bandwidth usage, unless the proxy is somewhere
upstream at your ISP, so you may find that you just
have to live with it for the time being and ignore iL
You can’t block them with a regular packet filtering
system, such as ipchains or iptables, because that
will also block legitimate access to the server,
which, I assume, isn’t something you want.
Linux protection
f ^ | I’m hoping to set up a three machine
i network soon with two running
(h , Windows 98 SE and the third running
Linux. I want to set the Linux box up as a
firewall and enable the other machines to
connect to the net through it Do you know of
a good place to find a small, pre-configuired
Linux firewall distro plus a good tutorial on
how to configure it? The distro must fit in
150MB of diskspace with 24MB RAM,
although I don’t think this will be a problem.
HF V There is a smal1 Linux distribution known
I | | a s Smooth Wall which will suit your needs
i . l perfectly. It contains the bare minimum of
programs, just enough to configure your network
and allow you to get into the machine. If you want
to know more about SmoothWall, it is available
No love lost
F • ; 1 We’ve been ‘lovebugged’ at work.
| 1 ( | Someone opened the virus on an
oldish machine running Win98 and
nuked the entire network, sending lots of virus
infected mails to some nice clients – oops!
We are using an old implementation of MS
Exchange Server at the moment, and relying
on most machines having their own up-to-date
virus software (mostly McAfee/Norton). But as
I said there are a few machines that are not
protected, because the user has turned off the
anti-virus software “cos it slows me pooter
down.” Most of the virus alerts are caused
through the arrival of infected email.
Is there an effective way of detecting and
dropping incoming email that contains any
Script? And is it taxing on system resources?
Eric Howells
Virus? What virus?
I have recently read an article about Linux, which I found to be a little dismissive and
dangerously inaccurate, as it says that Linux is virtually immune and that there is no
anti-virus software.
To set the record straight, I would like to offer my advice and opinions. Firstly, I think
people should be warned that while Linux is nowhere near as dumb as to willy-nilly execute
macros and scripts like some over-excited daemon, a Linux server or workstation can
indeed harbour viruses. For instance, if you were sent an email attachment that has
originated from an infected MS user, sending it on would make you responsible for the
spread of the virus.
This would be a particularly good reason for running some sort of virus defence,
particularly on a Samba server or mail server. Just think of all those MS users trying to
potentially store infected data and e-mails! Autoloading of modules is made easy with
The second point that I would like to make is that McAfee does in fact have both a
Linux and Unix-based version of its virus defence software. I work for a very reputable
corporate company and we use McAfee Total Virus Defence, or TVD as its also known. The
drawback is that this particular software doesn’t appear to provide on-demand scanning or
interception of hard drive reads/writes. I could be wrong but I’ve never found the feature to
turn it on.
After installing it, you need to either run a manual scan or setup a Cron job to schedule
regular scans. Again, a Cron job would be an obvious candidate for a Samba server providing
file storage services to Windows front end clients, maybe a daily scan prior to backup would
be a sensible precaution.
And in answer to a possible question that you maybe thinking of: yes, I do run anti-virus
software on Linux: McAfee TVD.
Kevin Yeo
WK 1 1 You are quite right in saying that it does go far beyond the Linux machine involved On any
W k * sort networ^ as long as there is one point of failure, such as a Windows machine and an
¥ 1 ignorant user; then it’s very difficult to appropriately secure every machine on that network,
without highly complex firewall rules and protocol specific filters.
It’s far more important to have the anti-virus software on the Windows machines, than on the
Linux machine(s). If you have a Samba share, and Windows systems are accessing files from there,
then they will pick up the virus and block it. It is, naturally, far better to have the virus detected on the
machine propagating it in the first instance, rather than to have a separate machine providing the virus
checking features.
As well as having the Linux machine to access files and distribute emails, then it will, more-thanlikely,
also have the internet, the ISP’s mail server as well as a few other sources of infected files, it will
also have a single solution which fixes the problem for the whole lot rather than just one of them,
which is more widely prefered.
In many respects, a daily virus scan is worse than not having one at all since, on many occasions,
users will probably assume that they are safe. But, any virus will have up to one day to propagate
beyond your own network, and on to your Windows machines. There are certainly a large proportion
of Windows viruses which are distributed via email services, and many SMTP servers, such as Exim
and Sendmaii, have filtering options for that style of virus.
Security ■
You should be able to stop the I Love You
virus with something as simple as procmail.
Wf I S Handling mail with Linux will enable you
m A 1 t0 send 3,1 mail through procmail which
1 _ lean easily be used to filter out nasty
infections, spam and other unwanted email. A
simple mail client, such as qmail or postfix, will
handle the mail for a small to medium sized office
on a low-end machine without any trouble. This
does, of course, require an awareness of what you
need to do in order to filter out specific viruses, as
well as actually ensuring that the appropriate
blocks are in place before it propagates to any of
the internal machines. With something such as the
‘LoveBug! it is quickest just to disable the script
options within Outlook, which will stop any scripts
being run automatically when the email is opened,
rather than trying to struggle with anti-virus
software and mail relays.
Stay secure
I’ve just installed Red Hat 7.1 and now
cannot use it as an ftp server.
I know the problem is to do with
xinetd, but how do I go about activating
security in /etc/xinetd.conf ?
I’ve search the web and xinetd
documentation. The example they gave does
not work with Red Hat, and the Red Hat
website has no information on how to go
about setting up xinetd.
James Colmorgan, via email
Wf I S Security in xinetd is handled via tcpd or
W A 1 indeed any other wrapper which the
F — 1 application uses, just like in inetd. Most
services launched by xinetd will use tcpd, which
uses the hosts.allow and hosts.deny files to set up
your access privileges.
If you were wanting to use ProFTPd as a ftp
server, you would have an entry in /etc/xinetd.conf
looking similar to:
service ftp
socketjype = stream
protocol * tcp
server = /usrilocal/sbim’m.proftpd
Limited access
W s t f I’m trying to find out how to setup an
IPCHAINS firewall to separate two
i internal LANs in the same
organisation. LAN A (curriculum PCs) needs to
access LAN B (admin PC) only for http, ftp and
email traffic.
Jazz, via email
■f I g Firstly, you need to separate the two
W k l LANs i n t 0 s e Patate |p networks, so
¥ 1 you might have110.1.1.0/24’ and
‘; and route between them with a single
machine. Then, on the routing machine, you can
allow HTTP traffic, which is traffic to port 80 on from 101.1.0/24, and for SMTP and FTP
traffic, then stop it allowing any
other traffic:
ipchains -A forward -p tcp -s 8 0 -j ACCEPT
ipchains -A forward -p tcp -s 25 -j ACCEPT
ipchains -A forward -p tcp -s 21 -j ACCEPT
ipchains -A forward -p tcp -s 20 -j ACCEPT
ipchains -A forward -s 10.11.0 -j DENY
FTP is a strange protocol, as it will create
connections both ways, so you can either enable
all port 20 connections, or use a 2.4 kernel with
iptables and the FTP connection tracking module.
Subject page
Network stew 130
Missing drive cylinders? 131
Windows ate my partition 131
Memory hog 132
Quick question 133
Mod files 133
A really super user 133
The lost files 134
Format Linux 134
Swap partition problems 134
Keep on running 135
Hangin’ around 135
Subject page Subject page
Norwegian Blue 136 Tar 141
Shut down woes 137 Man pages 141
Cross-eyed? 137 Priority 141
Rescue me 138 Archiving 142
Keeping count 138 Login 142
Mac mounting 139 Cron 142
Keeping it together 139 Backing up 142
Getting my shell back 139 Ghostscript 143
Benchmark 140 Data Transfer 143
Patches 140 How much free? 143
Backing up Lilo 140 Startup 143
Mounting Dos 141
Network stew
: As you could guess, I need some help
‘ -K more than I would like to admit!
‘ Before the questions: thanks for a
solid source of info (just sucking up…;)
Probably you will have some good answers
and suggestions to point me in the right
direction. I am running Mandrake 8.1
(download) on several machines, so that I can
experiment and learn: dual Celeron, DVD,
Xpert2000, with Ensonic sound card, the
other machine is a K6-2, with a RagePro II 3D,
CDROM and CD-RW, and a SB Live. None quite
state of the art, sufficient to keep me
interested and busy…
After some (almost) three years of using
Linux, I do consider myself still new to this.
Here are my problems:
1. No more super mount (out-of-theinstallation)
in this distro. Any easy way to
enable it — without recompiling anything, or
any major “surgery” for that matter? I’m also
very lazy… autofs is a kernel-level auto
mounting service, which is easy to configure.
2. Is there any way to make visible the
content of the CDROM of one machine to the
others on my intranet, so that I could install
RPMs, play DVDs or music directly from one
machine to the other? With NFS working, I
cannot read the CD from the other machine.
3. The most pressing — my internet set-up
doesn’t allow me to read my email with KMail.
First the set-up: for ISP reasons, less exposure,
experimental, etc., I have a Win98 machine
running (a very stable and good) Proxy+
( in front of a 486 running
Smoothwall. The 486 is linked to a Pentium
166, running Mandrake 8.1 (no GUI) “hub” to
which the other machines are linked. The only
way Fetchmail was able to see my
linuxfreemail account was through
Transconnect. Fetchmail correctly reported the
content of the account, closing with an error
after the attempt to transfer the first message,
stating it was unable to transfer any of the
messages. The Proxy+ provides ftp, http/https,
real audio proxies, socks ports, POP3 and
smtp mail server, etc. Any suggestions on how
should I best configure email access on such
a set-up?
So far I can listen to TV and radio stations,
and with the exception of the email and
Flash-enabled sites, all works. This leads to the
next question:
4. Flash is installed (!?) as a default in this
distro – may not be the latest incarnation –
I’ve never seen it work under Netscape or
Konqueror, and when I hit sites requiring Flash,
I get some 5 to 8 Konqueror windows opening
faster than I can close them. Very annoying.
The “locating, downloading and installing” of
the correct Linux version for this distro is
another annoyance. I seem unable to get the
right one, and most of the time some deps are
not satisfied. Any statically linked RPMs?
On a happier note: Ogle (0.7.5 and 0.8.2 —
just updated few days ago!) works fine (the
di — as I’m still fighting the gui!), so DVDs
are a go on the dual Celeron system! And the
486 DX2-66 started with only 8 MB of RAM
(runing also KDE – very slooooow – from the
Idiot’s guide .., a Caldera 1.3 distro and a 120
MB HD (now it has 16MB RAM). Since February
1999 it was stopped five times (except for
another extra three times for upgrades: three
for vacation and twice because of blackouts —
no complaints here!
Thanks for your support, and I hope that
you can haelp me to sort out this rather
annoying problem that I have,
W respond to your questions in order;
| | l l . Super mount is not really used
I » I anymore. 2.4 kernels, and newer 2.2
kernels, have a system known as automount, which
consists of a kernel module and a user-space
daemon to control the mounting of devices.
Modular distributions should have the autofs.o
module, which you can just modprobe autofs.
Many distributions will have the autofsd package
available, or you will be able to download it
from their site. Setting up autofs is quite
straightforward, as you only have to edit
/etc/auto.master and, generally, /etc/auto.misc.
The defaults should give you sufficient guidance
Miscellaneous *
as to how to configure it properly to suit your
particular machine.
2. Sharing CDROM content is best done over
NFS, although since you have to mount the
CDROM in order to do this, then you need to do
something a little different in order to have it work
properly. NFS only functions with mounted file
systems, so as you can’t mount an audio CD, or
mount a DVD such that it will work properly. You
can, however use cdfs (www.elis.,) to mount your CD-ROM
drive, which shows ISOs, CD-audio, and other
information as a file in the file system. This means
that you can mount the CDROM using cdfs locally,
then share that directory You can then either play
audio tracks on a remote machine, or mount a
shared ISO image locally, or remotely, using the
loopback file system. This doesn’t work with DVDs,
at least at the moment, so your only choice for
playing DVDs over a network is to dd the entire
DVD image from the DVD, then either NFS share
it over your network, or otherwise copy it to the
machine which you want to play the DVD on. As
these are generally in the region of 5GB, you may
want to reconsider putting a huge image file on a
machine just to play a DVD.
3. Is there a need for the Win98 machine?
Smoothwall is a perfectly adequate dial-up server;
and as it can use IP masquerading, it is completely
transparent. Proxying POP3, smtp, and so forth
through an extra machine is somewhat
unnecessary, and it really doesn’t sound as if it’s
doing everything you want it to. To remove the
Win98 machine from the equation will take a little
network reconfiguration, but all services will work
happily through it
4. Flash is purely a number of binaries which
you put into your -/.netscape/plugins directory. You
can check to see if Flash is installed properly by
looking at ‘aboutplugins1 in Netscape. Konqueror
can also use Netscape plugins, so you will need to
check on the documentation for it to see exactly
where it wants you to put them. There should be
no need to use RPMs for Flash, as it’s just a couple
of files, which you can find on as
a tar ball.
Having a statically linked RPM would be rather
pointless, as you would end up with huge binaries,
and It would obviously make the whole reason
behind having a dependency based system void.
As long as you only download RPMs from the
distribution’s site or FTP server, or look on, and ensure that you get the correct
RPM for your distribution, you should have very
few problems with dependencies, and if you do,
you just need to download the specific RPM which
fills that dependency.
Missing drive cylinders?
11 recently installed two 20GB drives
into my Linux box. I have created the
1 partitions and formated the drives.
The drives show 100 per cent free but the
space available is 17.4GB – not the18.4GB.
Brett Brock
I The first line of inquiry would be to use
fdisk -I /dev/hdX, where ‘X’ is the drive
letter This will list all the partitions on the
drive, along with the drives C/H/S geometry. You
will want to ensure that all the partitions on the
drives are concurrent, in that the end cylinder for
one is followed by the start cylinder for another
You may also want to check that the final partition
has an end cylinder equal to the number of
cylinders of the entire drive. There will always be
space lost on the partition, due to superblock
storage, and reserved blocks, but this should not
have such a great impact on the amount of
storage space available, fdisk can show you your
drive’s partition information, so you can see if there
is any free space.
Windows ate my partition
f I have dual boot machine with Linux
§1 | Mandrake and Windows 9 8 .1 used
Hk | defrag on Windows partition and
when I rebooted and wanted to go to Linux I
got the following message:
EXT2-FS: unable to load supertilock
Kernel pamcVFS: unable to mount toot fs on
What I have to do in order to normally
boot Linux Mandrake 8.0?
Thank you in advance,
I fedran I fuck, via email
Wt 1 | The VFS error you are experiencing
IF k 1 sug§ests that it is trying to use either
f 1 the wrong partition as your / partition, or
the correct partition is actually corrupt in some
way. The ’03:05′ means it’s trying to mount the
device with a major number of 3, and a minor
number 5, which is /dev/hda5. Since you
recieved that error after using defrag under
windows, it would suggest that Windows has
corrupted your Linux partition, either by not
ignoring the partition entirly, or because the
partition table is corrupt and it does not know
when the Windows partition finishes properly. In
either case, you will need to reinstall Mandrake
8.0, as you can consider the data that was on the
drive to be lost for ever
Naturally, you will want to experiment a little
with Windows to see if it continues to have the
same problems. If it does the same thing again, it
may be wise to check the partition configuration
from Linux’s fdisk program and seeing if the
Windows, /dev/hda 1, partition ‘ends’ in the right
place, or continues on into the extended partition
where your Linux partitions live. Ultimately, a
complete reinstall of both Linux and Windows may
be needed to completly fix the problem you are
Memory hog
I am an avid user of Linux and I have
been for a very long time. I usually
find it to be really reliable and it suits
my individual requirements. Anyway, the
reason that I am really writing is that, although
I’m enjoying getting away from Microsoft and
am almost happy using StarOffice, when I tried
it recently on a 200MHz machine with 32MB
of RAM and Mandrake 8.0, StarOffice took
over ten minutes to open. I thought that this
was rather slow. I’m not sure if this is an
incompatibilty with Linux. I was hoping to use
Linux on that machine and begin to convert
other in our office to Linux, but no way. I think
perhaps I was being a bit too ambitious.
On my own machine (Toshiba laptop,
600MHz, 128MB RAM, Mandrake 8.0)
StarOffice runs okay, but when I use top or ps
view processes it shows that StarOffice is
running multiple times/processes and using lots
of memory.
See output of ps below:
5370 dave 1040 0.8
/birVsh /usr/bln’opera
5371 dave 14360 11.3
”usr/lib;opera5.05tp 1 iopera-static
5444 dave 45776 36.1
5461 dave 45776 36.1
5462 dave 45776 36.1
5463 dave 45776 36.1
5464 dave 45776 36.1
5465 dave 45776 36.1
/usr/share/office52,’program/so ffice.bin
5466 dave 45776 36.1
5685 dave 1104 0.8
5802 dave 724 0.5
ps -aopid, user, rss,%mem, command
Is there something wrong with my installation
of StarOffice or is this normal?
Dave (Dar es Salaam, Tanzania)
W V StarOffice is a multi-threaded application,
W j | w so it spawns a number of processes to
f _ 1 handle different tasks. These processes
can share memory between themselves, so all of
your soffice.bin instances are using the same
45776kbytes of memory, or around 45MB.
StarOffice is not a small application, and does
require a fair amount of memory to run properly.
32MB of RAM is not near enough for StarOffice,
so you can either think about upgrading the
memory of the system, or look at an alternative,
such as KOffice, in order to use a little less
memory and get the same things done. You many
also find other small X applications which do things
similar to that of individual parts of StarOffice, so is a good place to look.
i root; » lsof ¡nore
: in it •1 root cud DIR q,0 1024 Z !
: in it ’• 1 root rtd DIR q.0 162M – 2 7
. in it : 1 root tHt REG q, 0 25q68 , : 21H2: /sbi n/ i n i t
: in it 1 root tien REG – W . 3M0663 ; Z Z m 71-ib/Id-2.1,3, so
: in it 1 root ñen REG -q,0 M101324 . 2251:: / lib / lib c -2 .1 .3 .S
o ;
“in it w root
‘ – • • . ‘
uri in 0;-¡tlaa2080 : 5q3 socket
in i t , root 10U FIFO 8,5 1356 /d e iv in itc t l (del
: eted)
! kei’entd z root cud DIR q,0 1024 Z i
keyentd : z root rtd DIR q ,0 1024 :: 2 / .
; kei^ntd z. root 0U un in 0KHaa2080 ; ; : 5q3 socket
: kepent d z root 101.1 FIFO. 0,5 1356 /deV/initct1 (del
;■ eted) . :■<< ‘
ksuapd 3 root cud DIR q,0 1024 : 2 /
: ksuapd ÍM root rtd DIR q.0 1024 2 / , , ‘
; ksuapd 3 root ‘ 0U uni« 0nf7aa2080 . 5q3 socket
i ksuapd 3 root, 10u FIFO . 0,5 1356 /d e iV in ikt 1 (del
: eted) ■ V ■■
: kreclairtd 4 root cud DIR . q,0 1924 2 /
krecla ind , 4 root. rtd DIR q,0 , 1024 2 / .
; giNU-BI ; : • • .. .
Isof shows which
processes have which
files open, so you can
spot what is stopping
your filesystem
Quick question
¥ i i 1 *s there a way of writin8 the resu,t °f
a command to a file?
J .. For example, if I want to save the
result of Is -I /foo into a file called bar.txt is this
possible without too much hassle?
Matt, from the forms
gif’ I j j Bash will let you redirect the output
W k * *rarT1 an s^el* based application using
i _ lthe>character:
Is -I /foo > sotnefile
will write the output of that command to ’somefile’
in the current directory. By the same token, any
application which takes input at the console can
have it sent to it via a file with:
program < input
Mod files
I have just been reading a recent
S magazine on Linux an I have a query
St about what was written and hope
that you can clear something up for me. In the
example on how to rename all the “mod.” files
to “.mod” files you gave a bash script that
started: for f in *.mod; do. Unfortunately, this
won’t change a single “mod.” file as it won’t
find any. Not only that, but it would find any
single character before the “mod” as the
would be expanded by the shell. I presume it
meant to say: for f in modi’; do.
Sorry to be critical. I will try to write
something constructive in the near future but I
just read it and didn’t have anything better to
do with my time!
Kind Regards,
Andy Braithwaite, Memphis
H ■ Within bash, ‘?’ applies to a single
W i l » character – not ” – so there is no need to
f .«»i 1 escape the in any bash command. For
clarification: to rename all ‘mod.” files to “.mod’
the appropriate script is: for f in mod.’; do
l=$(echo $f I sed s/Amod\Y//l sed sA$AVmod/) mv
$f $i done.
It has also been suggested that ‘mmv’ is an
alternative, and this can be found for most
distributions on the producers site or FTP server, or
if you have Debian ‘apt-get install mmv! Only a few
distributions include this on their distribution CD,
let alone have it as a default package for
installation. Simply do; mmv mod.- ‘ .mod.
A really super user
Could somebody kindly explain the
difference between su and su -? I’ve
not been able to find anything about
this elsewhere.
g f I j j Simply, su will change your effective UID
f 4 « t ° the user you select, so a plain su will
f 1 change your UID to 0 and everything
else will stay the same, su -, however; will create a
new login session under the appropriate user; so
you will lose any environmental information from
the previous user, such as the ‘DISPLAY’ variable
for X, and the authentication to connect to the X
server, but you will get the new user’s PATH
variables. You will notice that if you do su, you will
have to type /sbin/ifconfig to run ‘ifconfig; but you
will be able to do xterm, which will produce a rootowned
X terminal, su – will let you run ifconfig, as it
Is, but if you try to run xterm it will tell you that
‘DISPLAY’ has not been defined.
Setting the SUID bit on a file, using chmod +s
filename, is similar as doing su -c filename, but it
does not require the root password to run.
The lost files
Could some kind soul please tell me
where I can find the following files?
liber yptso.O
I am trying to install KDE 2 on a Red Hat
6.2 machine and apparently these files are
needed. KDE 2 falls over when I come to
install the kdelibs rpm, but fails to mention
where I might obtain them, as do the KDE
docs. AltaVista and Google have also drawn
a blank.
Jules, via email
\ The above modules are from the openssl
| | 1 package (, which is not
I _ 1 distributed with KDE as it would break US
encryption export restrictions. You can either
compile the source or install the packages of
OpenSSL, which will be used to provide the SSL
features of KDE programs, such as Konqurer
Format Linux
While following a GRUB tutorial I
tried to format a floppy disk. I found
‘ s two problems with this: the first was
that I couldn’t find any reference on how to do
it, even following up the command references
in the article; then I found fdformat. The
answer to my problems? Well no: just another
problem, when I tried the command:
fdformat .’dev/fdOH1440
I got the following output:
ioctl (FDFMTBEG) no such dev
Have I missed a step or is this a problem
with my system?
Stuart, via email
J j f I I fdformat requires entries in /dev/ for each
1 1 1 type of disk, be it 1.44MB, 720k and so
w 1 forth, man fdformat lists the entries it
requires, along with the major and minor numbers
relating to the devices. /dev/fd0H1440 has a major
of 2 and a minor of 28, so we use mknod’ to
create it
mknod :devifd0H1440 b 2 28
If you happen to be using a machine which has
/dev mounted as a devfs filesystem,
/dev/floppy/0ul440 would be the appropriate
device to use.
The fdformat command performs a low-level
format on a disk, which is why it needs you to tell it
– via the /dev entry – how you want the floppy
disk to behave.
Swap partition problems
I decided to set-up a LAN for a project
I am working on. I found a Packard
Bell Spirit 500 PC that I decided
would be the Internet gateway. This is a very
simple and generic PC, with a Savage 4 video
card, Pioneer DVD, Yamaha sound card, a
3com and a Netgear network card. Nothing
special at all. I was running Red Hat 6.2 but
found I had problems with the 3com 905C
network card. I upgraded to Redhat 7 and
found it a “messy” release but very functional.
When Red Hat 7.1 came out and I tried it
on my desktop it worked excellently and I
decided to upgrade my Red Hat 7.0 internet
gateway. I checked the hardware compatibility
list for Red Hat 7.1 and found no problems
except that the video card needed one tweak
on the config file (which was already inplace
for Red
Hat 7.0). I started the upgrade. All looked
well, until the installation started kswapd. At
this point the machine hangs until reset. I tried
passing many options to the boot loader to get
around this, but to no avail. Every time I try an
fdfontat does a lou level fornat on a floppy disk, depice
is usually one of the follouing (for floppy devices, the
najor = 2, and the ninor is shoun for infornational puri
poses only):
/dev/fd0d380 (ninor = 4)
/dei»/fd0h1200 (ninor = 8)
/deu/fd0D360 (ninor = 12)
/dei//fd0H360 (ninor = 12)
/dev/fd0D720 (ninor = 16)
/dei’/fd0H?20 (ninor = 16)
/detVfd0h360 (ninor = 28)
/dev/fd0h?20 (ninor = 24)
/dev/fd0H1448 (ninor = 28)
/dev/fd1d360 (ninor = 5)
/dev/fd1h1200 (ninor = 4)
/dev/fd10360 (ninor = 13)
/det>/fd1H368 (ninor = 13)
/deiVfd 10726 (ninor = 1?)
/dep/fd1H?29 (ninor = 17)
/dw/fd1h360 (ninor = 21)
fdformat require:; a set
of /dev entries, as it
needs to know which
disk geometry to format
/dev/fdO with.
upgrade to 7.1 on this machine the installation
hangs on kswapd. I have reported this to Red
Hat many times and never got a response.
Matt Darcy, via email
Failure of kswapd to start is very rarely
down to a hardware problem, and as
kswapd handles the paging of virtual
memory segments to and from disc, then one has
to investigate the possibility that the swap partition
is either too small, or otherwise corrupt so that it is
unable to use it. As RedHat 7.1 has an early 2.4
kernel, then the swap partition must be at least the
size of the physical RAM in the machine, otherwise
you will experience problems. If you’re not
interested in reformatting, then you can just
upgrade individual packages on your 7.0 machine,
rather than doing a complete upgrade to 7.1.
Keep on running
? Am I right in thinking that you can
¡11 keep a process running after logging
out? If so how? The application I
have in mind is an environmental analysis
package that takes ages to complete (so it’s
left running overnight).
I think it can be done using ‘cron’ or ‘at’,
but I was wondering if there is a better
solution (I take it that cron and at are used for
setting up regular/periodic events).
Bill, via email
To run console applications after ysu’ve
logged out, you need to use the screen
application (download it from, which
will allow you to create a number of terminals,
then disconnect from them while you log out, then
reconnect when you login.
If you’re trying to run X applications, you may
want to look at VNC, as It will let you disconnect
the client from the remote machine then
reconnect later, without losing any of your X
applications. You will have to start the VNC server
under screen, or as you disconnect from the
session it will close, but as It is not an X client, it
doesn’t matter if the X server goes down.
Hangin’ around
f , When shutting down (sorry but I still
need to dual-boot) the latest install
■ of Mandrake 8.0 it gets to the
point of umounting the file systems and then
just hangs.
I think that it might be because my DVD
drive is a bit dodgy and is auto-mounted but
am not really convinced.
Any thoughts or suggestions on how to
solve this would be helpful.
It is quite probable that a process did not
shutdown cleanly, and the machine is
waiting for something to stop using the
If Miscellaneous
filesystem before it unmounts it. This is a known
problem in Mandrake 8.0, and there are a
number of updates on their ftp server which
should be installed to ensure that your machine
works correctly. If it still occurs once you’ve applied
all of the latest updates, then you’ll need to
experiment a little by disabling certain services
then shutting down the machine. You may also
want to watch and see if any services fail to
shutdown, or if any other messages are echoed to
the console.
Norwegian Blue
f H I 1 1 have two small questions for you
about some Unix applications:
Ik * . *4 1. I’ve tried OpenOffice recently but
had to go back to Staroffice 5.1 because I
could not get the printer installed – that is, I
could not print anything or correct the print
format without having a printer installed, and
there was no way I could find to install one. I
would be very grateful if you have any
suggestions of tips.
2 .1 also recently tried Mandrake 7.2 but I
had to revert back to 7.1 because of a rather
strange feature that I was approached with:
when I pressed the @ key the mail program
started… and, as this key was used for this
purpose, I have not been able to enter any
You’ll find pre-built
cross-compilers here.
email addresses – the key would not write
an @ symbol at all, no matter what I tried.
The only reason that I can think why it does
this is because I use a Norwegian keyboard.
Tried to change the keyboard to US, but this
did not help, and anyway would have
rendered the machine useless to me. Do you
have any hints on this one?
Anyway I didn’t find KDE2 that
indispensable, and it slowed down my machine
(AMD 350/64) quite a bit. Personally, I didn’t
think that it was worth it.
H arkus, via email
V V simple, if unsatisfactory, answer to
1 ^ 1 this question is that you can’t print
F I directly from OpenOffice. It is very much
a work in progress, and the initial release which
went on the CD, was basically the source to the
old StarOffice project tweaked and with the
proprietary elements removed. One of the
non-free technologies licensed for use in
StarOfAce is the printing part of the software, so
this doesn’t exist
The OpenOffice project is an ongoing thing.
You can check out the progress on the printing
side of things at
2. Your second problem does sound very weird,
and doesn’t sound like a keyboard mapping
problem, so changing the keymap wouldn’t solve it
It seems that something has set up a hotkey for
that key to launch your mail software. This isn’t part
of the defaults for Mandrake or KDE – did you
install any other software after Mandrake 7.2? If It
is something to do with the KDE settings, you can
check out the keybindings in the Control Centre’s
“lookNFeeL” section.
Shut down woes
f | j 11 have finally got a laptop (Fujitsu
Lifebook E series) which is running
■ S * Linux happily. I have worked out how
to configure and start X, I have also worked
out how to use KDE, but am having difficulty
installing programs. Anyway all of the above
will come in time.
The major problem I do have is shutting the
computer down. I know how to close X, and
The Embedded Debtan Project
1 3 6 | UNIX | ANSWERS
logout of the ‘bash’ (command prompt). But
what I really want to know is how to turn the
computer off so that it does not go through
the boot saying that the file system was not
shut down properly.
The correct way for you to shutdown
your Linux machine is with the
following command:
shutdown -h now,
which will prompt for your shell password. With a
laptop, you may want to use
shutdown -hnf now
which will avoid it fscking on reboot, or by using a
journaled filesystem such as ext3 or ReiserFS
which will avoid the fscking delay, yet not threaten
the integrity of any files on the partition.
f m I’ve tried playing with this a few
s p times, but have never got very far. I
* have a number of various speced PCs
running different distros of Linux: an RS/6000
about to have YellowDog Linux installed, and
two 040 powered Amigas that could run
What I’d like to know is how can I compile
a kernel for one platform on another
platform? I would like to compile a Linux/68k
kernel on either the RS/6000 or one of the
quicker computers?
On a different note, being a long standing
Amiga Format/Shopper subscriber, It as a hard
job getting me to use Linux which took a lot of
pesuasion. If I had just one criticism, it would
be that there is very rarely any documentation
in magazines concerning all of the various
platforms witin Linux. I appreciate that the
i386 platform is always going to be the most
prevalent, but I think other platforms should
get a mention from time to time… at least the
other ‘home’ platforms anyway. I don’t
suppose that there are too many people
with an IBM RS/6000 at home, let alone an
IBM mainframe. Just my opinion for what
it’s worth.
Graham, via email
m « I f you have the necessary cross-
W k 1 development tools, compiling a kernel
f _ 1 image tor a different architecture is
relatively straightforward.
There are pre-built GNU tools for crossdevelopment
targeting Linux on PowerPC, MIPS
and ARM platforms available from, for example, The chances are,
though, that you are going to have to build
them yourself.
You will need at least to build binutils and
gcc for the target platform. You can get the
source code for these packages from It is quite simple to do. During
the configuration stage, you add the option —
target to specify the target of the compiler if
it’s different from the host that the compiler is
running on. So, for example, if you wanted to build
a 68k compiler you, would configure each
package with:
./configure —target=m68k-linux
If you then were to make and install this, you would
end up with a set of the standard GNU tools (in
this case in the default path /usr/local/bin) all with
the prefix ’m68k-linux-!
Once you have the necessary tools, you can
cross-compile a kernel image. You will need some
patches to turn the standard kernel source tree
into something that is buildable and will run on an
m68k – see The PPC
kernel tree, on the other hand, has been merged
into the main tree with the 2.4 series kernel. See or
Before you do anything, you will need to
specify the architecture you want to build for You
can do this by editing the kernel Makefile and
changing the variable ARCH at the top of the file
to the architecture you wish to build for You
should then be able to configure and build the
kernel as normal.
As for your point that many magazines focus
too much on the x86 platform, I think that is
slightly unfair Generally, the material in the
Linux-based magazines is largely architectureneutral.
The standard PC is by far and away
the most popular Linux platform, but perhaps
we should devote more space to Linux on nonx86
$1 Miscellaneous
Rescue me
Since I installed Mandrake 7 on my
Toshiba Tecra 80 00 ,1 have bought
H v several publications that cover Linux
and I think I’m picking up Linux pretty quickly,
and will never go back to slow, locked out,
over done Windows.
I’ve had one small problem since installing
the Gnome updates: LILO won’t load anymore,
and halts with CRC errors. Yes, I should have
backed up, but I didn’t, and so have lost
months of Java code.
Please, is there any way at all to save my
Linux partition without wiping and reinstalling?
Rod, via email
Wj 1 1 1 don’t know why you this has happened
IF A 1 to your system’ but rather than to
f _ 1 the drastic lengths of wiping your drive
and reinstalling Linux; you should find that
reinstalling LILO is enough.
The next problem is how to boot your system
so that you can repair LILO. Do you have a rescue
floppy? Most distros either ship with one or give
you the option of creating one. (Some distro CDs
can also be used as a rescue disk – sorry, I’m not
sure if Mandrake can). Starting from a rescue disk
will allow you to boot up your Linux installation
without using the copy of LILO and the kernel
image that are on your hard drive.
Whichever disk you’re booting from, hit ?
when you see the LILO prompt Then you can
enter boot parameters to boot from the kernel on
that disk, but use your hard disk as the root
filesystem. So, for example, if the kernel on the
rescue disk is called linux, and Linux is installed
on your second partition of your first IDE drive,
then enter:
gnux root=/dev/bda2
Once booted up, you can reinstall LILO, by
executing lilo in a shell (when you are logged in
as root).
Keeping count
I After reading a feature on Emacs, I
I thought I’d give them a try. And I have
i to say that I like it One quick
question, though. How do I get a word count?
Am I missing something obvious?
Alex Stephens, via email.
Wf I I You would think there would be an easy
s | l way to get a word count with Emacs,
* _ I wouldn’t you? But there isn’t really.
Perhaps the simplest way is to save the file that
you want to get a word count on and then use the
shell tool wc to print out the statistics. For example,
try the following line:
wc -w myfile.txt
This code will then display the number of words
in myfile.txt.
Another way is to use the Emacs countmatches
function. This counts the number of
times a particular regular expression is matched
in a buffer from the cursor point to the end of
that buffer). To count all the words in a document,
move the cursor to the start of the buffer and
then hit META-x to enter the mini-buffer Then
enter the following command:
After you have entered the above code, press
Return. You will then be asked to enter the
regular expression you want to count matches for
Now enter this next command:
After you have done this, again hit Return. Emacs
will then print the number of matches, in this case
the number of words.
The V element of the above regular
expression matches the start of a word: either at
the start of a line, after some whitespace, or after
some non-word characters such as punctuation.
The Aw’ part matches any character which can
form part of a word (exactly which characters are
counted as word constituents depends on the
mode you are in). So V matches any number of
word constituent characters. Essentially, what we
are doing is counting the number of times that we
find the start of a word and then just gobbling up
the rest of the word each time.
Ideally, you would want to write your own
function in Elisp and add it to your Emacs
configuration file so that you don’t have to keep
manually typing in this regular expression all the
time. While this is not too difficult to do, it is
beyond the scope of these pages.
1 3 8 |URU | ANSWERS
Mac mounting
I am running Linux on the usual Intel
f| machine. I have a pile of Mac disks
with some files I’d like to get at. Is it
possible to access these disks from within my
Intel-based Linux (say, for something like
mounting a Mac floppy disk)?
Ivan Uemlianin
S ‘ 11 Yes, it is possible. It requires the kernel to
W j | 1J be configured to use ‘Apple Macintosh
{ » . 1 filesystem support’ from the ‘Filesystems’
page (see our tutorial last issue for a guide to
compiling the kernel). This can be compiled either
as a built-in or loadable module.
Mounting a Macintosh floppy is much like
mounting an MS-DOS floppy. For example,
mount -t hfs ,’dev/fdO /floppy
will mount a Macintosh-formatted floppy in the first
drive at the mount point floppy. Extra options can
be specified with -o switch and HFS supports
many of the same options as the MS-DOS
module, such as controls for specifying the owner
and group of a mount disk.
The issue is more complicated with Mac
floppies, however, because files can be split into
’resource’ and ‘data’ forks. The Linux HFS module
supports two schemes for respecting forked files,
Emacs is a powerful, reprogrammable
text editor. Who left out the word-count
function, though?
one of which is compatible with the netatalk
package. Options are also provided to control
character set conversion in filenames and the
translation of CR to LF in data files. See the file
fs/hfs/HFS.txt in the kernel source archive for more
Keeping it together
|f h i There is probably a really simple
solution to this question, but how do I
defragment my hard drive under
Linux? Can you help?
Colin Morris, via email
j j i 5 A nice short question and the nice short
l l * answer Is that generally you don’t need
If 1 to. The ext2 filesystem is rather more
Intelligent than the various Windows filesystems in
that It tries really hard not to fragment files when
writing them to disk. As long as your drive doesn’t
become too full, ext2 can usually manage to
keeps thing in a fairly non-fragmented state.
You can see how fragmented a drive is, when
your system boots. As your drives are mounted,
Linux will check them with fsck. For each partition
it checks it will print out a report telling you how
many files are ‘discontiguous! This percentage is a
measure of how fragmented the drive is. If it’s less
than 10 per cent, then don’t worry about it.
If you really feel you have to defragment your
drive, then there is a tool available called defrag to
do the job. This is probably available with your
Linux distro, but it’s downloadable from many good
Linux ftp sites. This tool will defragment an ext2
partition, but the catch is that the partition must be
unmounted for it to work. It’s not much good for
working on your root partition, for example, unless
you build your own boot floppy with defrag on it.
And, anyway, not everybody trusts defrag, so
another solution Is to back up the partition in
question, reformat it and restore its contents. This
method takes advantage of ext2’s natural ability to
keeps things unfragmented.
Getting my shell back
I I know it’s lazy, but I haven’t set up
shortcuts or icons for a lot of the
programs I use, so I often run them
from a terminal. I don’t really have a problem
with this, and I know that you can background
the tasks with when running them. But as I
said, I’m lazy, so I often forget to do this. I
know there is some way to get back in the
shell and background the task, but I can’t
remember or find It anywhere. Please remind
me. I’m sure that thereare other people who
have this problem too.
Christian, via email
i f lO k a y , that’s a pretty easy one. To suspend
the task, make sure you are in the shell
r 1 and type Control -z. You’ll get the
following message:
[1}+ Stopped thattask
or something that is similar Now you can
restart it in the background simply by typing bg
and pressing return.
You can reverse this (if you want to) by typing
fg in the shell window again.
f , I’m trying to write a more efficient
piece of code for a problem at
‘*s ‘ college. I don’t want you to write the
code for me, don’t worry, but I could do with
some help in working out ways to evaluate it
for myself before I submit it. Are there any
good benchmarking tools for Linux.
Clive, via email
I There are a wealth of them actually, and
| | 1 really what you use depends on the
f ’ specific nature of your secretive sounding
project For just simple timing and CPU load
statistics though, the time command is pretty
hard to beat for example, if your program
performs a specific task and then exits, time will
tell you how long it ran for, how much CPU time
it used, faults generated, conext switching details
and so on.
To use it, simply stick
in front of your command.
For more elaborate benchmarking of Linux
systems, see
! ‘ How do I apply patches to a source
1 i f | archive? I am having great rouble
trying to do this and I would
appreciate any help that you can offer.
John, via email
Typically, patches are distributed in .diff.gz
■ format, that is, a diff file that has been
¥ ,*»>. 1 compressed with gzip. The patch
command Is used to apply changes from a diff file
to one or more source files. (This is a standard
GNU tool which should be available in every
Linux distro.)
Usually, the diffs must be applied from the
parent directory of where you have the source
archive unpacked. So, ’CD’ to there first. Then
enter ‘zcat patchfile.diff.gz I patch -pO! Here, we
decompress the diff file with zcat and pipe it to
patch. The ’-pO’ switch tells patch to use the
complete path names for files as supplied in the
diff file. A number other than 0 will strip off that
number of path components for each file and is
useful when your source tree layout is different
from the person who made the diff file.
In this case of the kernel source, things are
even easier, since a script is provided to do the job
for you.
Change to the scripts directory in your current
source tree and copy any kernel patch files you
may have to there. Then use Vpatch-kernel’ to run
the script and bring your kernel bang up-to-date.
Backing up Lilo
This may seem like a stupid question,
but can you tell me how I make a
• \ – backup LILO disk?
W I S You can create a boot disk for Linux with
If A 1 or w^XXJt LILO, although the latter is
F 1 easier
Creating a boot disk without LIU):
Configure the kernel source as you usually would,
but rather than doing ‘make zlmage’ do ‘make
zDisc; ensuring you’ve got a floppy disc in your first
disc drive. You’ll have to make sure that anything
you’ll need to recover your system is there, rather
than being modular.
1 4 0 | UNIX | ANSWERS
Creating a boot disk with LILO:
We first need to create an ext2 filesystem on the
disc, so do
‘mkfs -t ext2 ,dev:fdO’
After mounting your disc, you can copy your kernel
to it. You can then make yourself a lilo.conf for
the disc.
boot = .’dev/fdO
install = /boot’bootb
map = /boot/map
image = vmlinuz
label = Bootdisk
root = /dev/hda1
Remember to change the root partition to
whichever one your system is using.
If you need to rescue a system but don’t have a
disk, you can just use the boot disk or boot CDROM
from any Linux distribution and do
Itnux root=/dev/hda5
at the ULQ: prompt
Mounting Dos
1 -i -. – I have two quick questions: how can I
access my DOS partition from within
‘ Linux? And, how can I access my
second DOS hard drive?
Gene, via email
W H Mount>nB a DOS partition is easy with
| | 1 Linux. The only thing you really need to
r _ 1 know is what devices your DOS drives
use (e.g. hda for the first IDE drive, hdb for the
second etc.) Mounting the drive is done with the
following command;
mourn -t vfat /dev/hdal
which will mount your C: drive in /mrtt/dosl.
You can mount your second hard disc using
mount -t vfat /dev/hdbl
How do I list the contents of a tar
archive without unpacking it? This has
been driving me mad. Please help!
Paul, via email
i This is quite simple. The tar command
I | 1 supports an option – t ‘ to list the
f mb 1 contents of an archive to the console.
You still need to specify the archive path with the –
f switch and, with GNU’S tar, you may still use the
switches -z or -I to unpack on the fly archives
compressed with gzip or bzip2, respectively Also,
the verbose option -v will list the contents in long
format So, for example, to view the contents of
mypackage tarbzip2 you could use tar -Itvf
Man pages
I find it’s much easier to follow man
pages if I print them out I’m worried
by the amount of paper this requires,
though. Any suggestions?
W I B The secret ^ f|rst t0 get the man
l | l command to output pages in PostScript
F 1 (PS) format. This can be achieved with
the -t switch. For example, man -t Is will dump the
man page for the Is command to the console as a
PS file.
Now we have our manual in a handier format,
we can get on with saving some paper. The
command psnup (which is part of the GNU pstools
package) takes a normal PS file, processes It and
outputs a PS file with multiple pages of the source
file on each output page. For example, ‘psnup -4 destps’ will reformat so that 4
pages fit on a sheet of paper and store the result
in destps. Psnup has loads of options to control
the style and formatting of its output, so check
its documentation.
We can combine this all together on the
command line with pipes To print the cp man
page with two pages per sheet, use something like:
•man -t cp I psnup -2 I Ipr
Is it possible to prioritise tasks or
applications running under Linux? I’d
like to encode MP3s in the
background while getting on with my usual
work, but it seems to demand so much
processor time that other things are now
painfully slow.
§1 Miscellaneous
Hi V Unux processes can have priorities
■ i l ranging between -20 and 19 (-20 having
f j™ 1 the highest priority), but only the
superuser can specify a negative priority or nice
value. You can either initiate a command via the
‘nice’ program, setting a default nice level using
‘nice -n <value> <command>’, or if you’d rather
change the priority of a current process, you can
use ‘renice <value> <pid>’.
So, in order to have your MP3 encoder running
for less of the time, leaving more time for your
other tasks, you want to give it a nicer value (that
is, higher). Most tasks default to a nice level of 0 if
you haven’t changed the default.
To find out the process number of your task,
you can use the ps command, ‘ps -A’ will give you
a list of all the current processes and their pid.
A simpler way, if you are running KDE, is to use
the KDE task manager You can then select the
task from a list and renice it with the option from
the Process menu.
^ ( I understand how to use tar and even
how to untar a zipped file, but I notice
:.v. there are quite a few files available
that end with .bz2, which I understand is a
completely different compression program.
With ordinary zipped files, I can just ‘type
tar xvzf xxx.gz’ to uncompress them, but with
the .bz2 files I have to uncompress them
twice. Is there a way of doing this in one line?
Phil, via email
The easiest way to do this is to get the
bunzip2 command to unpack the file to
stdout and use a pipe to pass the
decompressed file to the tar command for
unarchiving. Entering the line ‘bunzip2 -c
file.tarbz2 I tar xvf in a shell should work.
I have taken the advice of other Linux
users I have met on the web and I
now log on under my own user
identity, rather than as root.
The only trouble is, now that I log on under
my own identity, I can’t seem to install
r l
software, edit configurations or do anything,
really. How do I logon as myself, but have all
the power of being root?
Juan, via email
Wf W Running as root is usually a bad mistake
I | 1 waiting to happen, since a misplaced
> _ l asterisk or a wrong command could
potentially wreck your whole installation. There are
a couple of ways to achieve root privileges without
actually logging in as root to do everything else.
The first method is to use the ’su’ command,
which will allow you to create a root session
whenever you need to.
Another more powerful way is to use the ‘sudo’
command. This lets you set up administrative
privileges for particular users. You could let them
run individual programs as root, or stop them
running damaging programs as the superuser
I understand that there is a program
| called cron which is used for running
( ‘ tasks at a specific time. I can t seem to
find any information on how to set this up
though. Can you help?
Wt l g There is a cron howto at the following
f f 4 « website: You’ll
i _ 1 also find it at your local LDP mirror. If
you’d prefer an offline source, man 5 crontab’
gives you the syntax, along with numerous
examples, of the /etc/cnontab file.
Backing up
Could you please tell me what the
best way of backing up my Linux
partition is? I have a CD-RW drive, but
most of my Linux stuff is on a 2GB partition.
There are many different tools available
for backing up under Linux, so it really
depends on your personal tastes and the
medium you wish to back up to.
For burning the actual CD, cdrecord is ideal.
You can either create a cd image on your hard disc
and use rsync ( j to
update it with various parts of your hard disk, then
Miscellaneous S
burn it to CD, or you can use a proper backup tool,
including one of the many which are available at
backup.html. Something along the lines of
cdbackup (
cdbackup) may be what you need.
How do I use Ghostscript to display
PostScript or EPS files? Is there a
‘ special version for PDF too?
B f ‘■ Ghostscript understands and will
W k ■ automatically recognise PostScript, EPS
F _ land PDF files. Simply do gs filename’ in
X and it will open a window displaying that file. You
would be better off using a graphical front-end for
Ghostscript though, rather than just gs alone. Try
Ghostview or a similar package. For PDF files you
can also use ‘xpdf,’ which comes with most
distributions, or which is available from this site:
Data Transfer
W « 5 1 1 have a lot of image files, text, etc, on
a Windows machine that I developed
Ik», ‘4 for a website. I’d now like to transfer
this to Linux so I can test the website properly
under Apache. What’s the best way to move
the files without upsetting the file structure,
filnames, etc?
The easiest way, if the two OSes co-exist
on the same machine, is to simply mount
the Windows drive under Linux. This Is
pretty straightforward. You just need to find out the
device name and partition number of the Windows
partition, and mount it as you would any other
drive, but with a partition type of ‘vfat’ (for Win 98
drives) or ‘fat’ for older partitions.
How much free?
I have several drives attached to my
Linux setup and one or another of
them is always running out of space. I
know that I have a lot of stuff, and I have used
du to find out how much stuff there is in
various directories. However, I need to know
how much free space is left on each partition.
Wj I® This one isn’t so tough: you simply have
■ i l t o use du’s relative, df (short for disk
¥ ™ 1 free). This will show you the percentage
and amount of space free which is available on
each drive, and much more besides should you
care to know!
Wf Wj It depends where exactly you want it
I | l t o start. If you mean start up, as in
F — 1 boot time, simply add the command
to /etc/rcd/rc local, not forgetting to add an
& to the command to make sure it runs in
the background.
If you want it started when you log in
under X, add a line to run the command
either to the file -/.xinitrc (if you launch X with startx) or the file ~/.xsession (if you are using a display
manager such as xdm, gdrn or kdm).
Again, if you forget the &, the session will lock up until you kill the particular program. Fortunately,
its not as bad locking up your X session as it Is locking up the whole machine during boot up.
How can I make a particular
program run on starting up?
• Helen, via email
Linux Format is a magazine
dedicated to Linux and the
Open Source community.
We aim:
» To provide the most accurate,
unbiased and up to date
information on all things Linux.
» To promote the use of Linux in
business and the home, for
servers and on the desktop.
» T o support the Open Source
community by providing a
resource of information, and a
forum for debate.
» To help all readers get more
from their Linux experience
by providing insightful and
useful tutorials.
Keep your money in your
pocket longer when you
subscribe by Direct Debit
It’s easy! Call 0870 444
8645 and have your
bank details ready.
Huge savings on a year’s
supply of Linux Format
Delivery direct to
your door.
Never miss an issue.
All you need to do is call
the Linux Format
Subscription Hotline or
order online.


E-posta adresiniz yayınlanmayacak. Gerekli alanlar işaretlenmelidir *