This is only a preview of the April 1999 issue of Silicon Chip. You can view 34 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Articles in this series:
Items relevant to "High-Power Electric Fence Controller":
Items relevant to "Programmable Thermostat/Thermometer":
Articles in this series:
Items relevant to "A Rev Limiter For Cars":
Purchase a printed copy of this issue for $10.00. |
Getting started
with Linux; Pt.2
Setting Linux up to dual-boot with Windows
is relatively straightforward, although there
are quite a lot of options to consider.
Alternatively, you can set Linux up as the
sole operating system on something as simple
as a 386 or 486 PC.
By BOB DYBALL
One way to squeeze more life out of
an old “cast-off” PC is to run Windows
3.1 or, depending on your application
and the machine, plain MS DOS. On
the other hand, Linux might just be
the answer, particularly if you want
to use the machine as a file or printer
server, as a web server or in some
other LAN or Internet application.
The big advantage of Linux is that
you don’t need fancy hardware with
lots of RAM to run it. As many people
have found, it will run quite nicely
on an old 386 or 486 machine. Others
consider Linux a fast, stable operating
system that’s cheap to buy and are
installing it on Pentium, Pentium II
and other late-model PCs.
What hardware do you really need
to run Linux? Although there are a
couple of enthusiastic groups trying
to “port” Linux to XT or 286 systems
(in other words, rewrite it), the usual
mainstream Linux distributions need
at least a 386. From there, you need
to have a look at the uses you might
put the system to, to see what CPU,
RAM and other hardware you’ll need.
Generally speaking, Linux will run
on a system with as little as 4MB of
RAM but really needs at least 8MB
and preferably 16MB to move along
reasonably well. If you plan on using
X11 or Xfree86, Linux’s version of X
Windows, then 16MB should be seen
as a minimum.
The amount of hard disc space
required depends on the installation
options you choose. If you want a
simple file server and printer server,
10 Silicon Chip
then you really don’t need to install
X Windows unless you want to run
it occasionally to enable easier configuration. And that’s the crunch –
configuring Linux, for someone who
is used MS DOS and MS Windows,
can be rather scary.
A “small” installation will occupy 50MB to 200MB of disc space,
depending on the options selected.
More complete installations will
require at least 500MB but if you
are interested in recompiling the
Linux kernel, then 1-1.5Gb would
be desirable. This should provide
enough room for the source code to
be installed as well.
Note, however, that the sizes vary a
little from one distribution to another,
as some come with extras that the others don’t have. Installing a minimal
Open Linux system without X11, for
example, requires 55MB. An average
X11 setup will require about 137MB,
while a larger installation with, say,
DRDOS, NetWare client and Apache
Web Server will need around 418MB.
The complete works, with all options,
will set you back 988MB.
Networking Linux
Networking Linux to machines
running other operating systems is
no problem. For example, Linux with
the Australian “Samba” program
installed can easily be networked
with PCs running Windows for Workgroups 3.11, Windows 95, Windows
98 or Windows NT. The Linux PC
“looks” as if it is just another part of a
Workgroup, or even part of a Domain,
sharing files or printers with others
in the network.
Linux can also be used as a fax
server, a modem server, a workstation running as a client in a Novell
Netware network, or as a Unix workstation – all this for a fraction of the
cost of many of the alternatives.
Hardware support
Linux Red Hat (from Red Hat
Software) is a popular commercial
distribution of Linux. The box
includes three CD-ROMs, a boot
floppy and a manual.
Support for popular network, video
and SCSI cards is not usually much
of a problem with Linux. However,
you might find that some of the latest
cards, along with some less popular
older cards, aren’t supported. If your
network card isn’t directly supported
in its native mode but has an NE2000
emulation mode, it should work perfectly if you choose the NE2000-compatible driver. The vast majority of
network cards fall into this category.
Some SCSI controller cards might
cause problems, although most popular cards are supported in the standard kernel distributed with Linux. If
you have a SCSI card that’s not well
known, check to see if it’s supported
before attempting to install Linux.
Users of IDE hard disc drives will
have an easier time but only for drives
up to 8GB. Above this limit, Linux
(like Windows NT) can become confused and detect only an 8GB hard
disc when, in fact, you really have
10GB or more.
On the display side, you will need
a video card that’s supported if you
want better than 640 x 480 screen
resolution and 16 colours. Although
your fancy new 16MB 2D/3D video
card will have immediate support for
Windows 98 or NT, you might have
to wait for some time before support
appears for it under Linux. As before,
some older, less popular video cards
won’t be supported, so shop carefully
if bargain hunting for hardware.
If you want to use your Linux box
to connect to the net, or work as a
“router” or firewall, then you’ll probably find an external modem easier to
debug (if necessary). That’s because
you can watch the lights, something
missing on most internal modems.
Printer support is fairly reasonable.
If your printer isn’t listed in your
Linux distribution, you can usually
find something that’s close enough by
using one of the emulations listed in
the printer’s manual.
The printer control file can be
rather interesting. This is basically a
text file that covers the capabilities of
the printer. One that’s close to your
printer can be modified to suit or
you might write one from scratch by
referring to the documentation in the
“man” pages (on-line help) supplied
with Linux.
Fig.1: this screen grab shows Caldera OpenLinux 1.3 operating in XWindows
and running the KDE desktop manager. This has a similar look and feel to
Windows 98.
Partitioning drives
There are a number of choices
when it comes to installing and
booting Linux. Some of these might
seem confusing at first, especially if
you are used to booting DOS or Windows 95/98 from the C: drive. Linux
can be installed on a second or third
hard disc drive (in DOS terms, say
the D: or E: drive) and booted using
a special boot manager called LILO
(Linux Loader). LILO is supplied with
Linux and it also allows Linux to be
started using a boot floppy.
If you already have a Working Win-
Fig.2: by way of comparison with Fig.1, this screen grab is from Windows 98.
There are many similarities between the two.
dows 3.11 or Windows 95/98 system,
you could leave the C: drive where it
is, add a second hard disc and install
Linux on this new hard disc. Once formatted under Linux, this Linux hard
disc drive will normally be invisible
to your Windows 95/98 system.
Alternatively, if your C: drive has
lots of room and you’d like to keep
Windows there, you might consider
installing Linux into the MS DOS
filing system. Although not as efficient as an installation to Linux’s
own native format, it can still work
in this way.
Another option, if you have lots
April 1999 11
Basic Linux Commands
Purpose
Linux
DOS
Mi dni ght Commander
mc
n/a
Di rectory
ls
di r
Commandli ne opti ons
--hel p
?/
Make a di rectory
mkdi r
md
Change di rectory
cd
cd
H el p, command list
h el p
h el p
Simi lar commands
apropos
n/a
Restar ti ng system
reboot
Compl ete shut down
h al t
of space on your hard disc, is to first
defragment the disc and then shrink
the existing partition so that a second
partition can be added for Linux.
Commercial partition managers such
as Partition It! and Partition Magic
are not only able to re-size partitions
and convert from one file system to
another (eg, FAT16 to FAT32 and
back again), but can also work as boot
managers. Basically, a boot manager
allows you to choose the operating
system at boot up.
The FIPS utility, freely available
with Linux under the Gnu or GPL
License, is also able to re-size partitions. A word of warning: irrespective
of the software used, always back up
any important data before attempting
to re-size a partition. Repartitioning
involves major changes to the organisation of your hard disc and it’s all
too easy to lose data if something goes
wrong during the conversion process.
Check too that you are using the
latest version of the software. FIPS 1.5
will not support FAT32 whereas FIPS
2.0 will, for example. Do not attempt
to use Fdisk to repartition your disc
– you will lose data if you do.
The safest approach, if you want
to keep your original Windows operating system, is to adopt the first
suggested method; ie, add a new hard
disc, install Linux to this drive, and
12 Silicon Chip
Comments
Simi lar to the ol d "System
Commander" program. It provi des
an easy way to fi nd your way around
Li n u x.
Has a number of swi tches. | is perhaps
the most useful . For exampl e, mls
gives a listi ng that's too l ong for the
screen, use ls | more. This is like di r/p
i n DOS.
Use a forward sl ash to change
di rectori es. For exampl e, cd/ goes to
the root di rectory i n Li nux whereas cd\
goes to the DOS root di rectory.
Type help for a list of commands. For
more compl ete hel p, type man (for
manual) and then the command, eg:
man ls. Type q to qui t from man.
Type apropos foll owed by the name
of the command for a list of simi lar or
rel ated commands.
Al ternatively, use shutdown -r now.
If your versi on doesn't suppor t this,
use shutdown -h now.
use LILO to select which operating
system you want to use.
LILO writes to the partition loader area of the hard disc where the
partition table is stored. It is easily
configured to provide one of several
options: (1) immediate boot up to a
default operating system; (2) wait for
a few seconds to allow the desired
operating system to be selected (the
system boots to the default system
if no keys are pressed); and (3) wait
indefinitely for a choice to be made.
If you subsequently decide that
Fig.3: before installing Linux, use
the System Properties dialog box in
Windows 95/98 to obtain details on
expansion card settings.
you don’t want LILO on your hard
disc and want to use a boot disc or
some other method of booting, it is
easily removed by typing (at the DOS
prompt): FDISK /MBR
If you intend using Linux as a router and firewall for Internet access, it
makes some sense to initially keep
your options open and install Linux
in a dual-boot with say Windows 95.
By keeping Windows 95, you’ll still
be able to dial in and get your email
or run a program such as C-Proxy (see
SILICON CHIP, November 1998) while
you get Linux up and running.
Pre-installation checkup
The main snag you’ll likely run into
here, especially if you’re completely
replacing the existing operating system, is figuring out the settings on
your various I/O cards.
Most things, like COM1, COM2 and
your printer port, are no-brainers –
Linux can pick these up without any
problems. However, if you have an
internal modem, it will often be set to
COM3 and an odd IRQ and it’s useful
to know this before installing Linux.
Similarly, it might be useful to know
the IRQ and I/O port settings for your
network card.
In case you’re wondering, the
current version or “kernel” of Linux
doesn’t fully support plug and play
(PnP). Some of the modules will detect the settings of PnP devices, while
others might need to be set to manual
(or non-PnP) mode. Newer releases of
Linux will include increased support
for PnP and USB (Universal Serial
Bus) devices.
If you’ve already got Windows
95/98 installed, you can quickly find
out what the settings are for each
card via the System applet in Control
Panel. To do this, double click the
System icon, select the Device Manager tab then select an item and click
the Properties button. From there,
you can make a note of the IRQ and
I/O settings for any network, video
and sound cards or, in the case of a
modem, its COM port setting.
If you have older non-PnP cards,
you may have to temporarily remove
them from the PC and refer to the
manuals to discover the settings.
During the installation, you may
find that there are some settings that
cannot be changed or which aren’t
recognised. By knowing the settings
beforehand, you’ll save a lot of time
Fig.4: the rawrite.exe utility is in the /dosutils directory of this Red Hat Linux
distribution. You use this utility to make a Linux boot disc.
when it comes to getting everything
up and running after Linux has been
installed.
Installation
OK, you’re finally ready to install
Linux. You’ve backed up everything
that’s worth backing up, you’ve got
all the details on the add-on cards
and you have a Linux CD.
Often, a Linux CD on it’s own is
fine, provided that the CD is bootable
and the PC’s system BIOS supports
booting from a CD-ROM drive. If
you have an older PC, you probably
won’t have the luxury of being able
to boot from your CD (bootable CD
disc or not). The way around this is
to prepare one or more floppy boot
discs from the Linux CD-ROM.
Commercial distributions usually
come supplied with boot discs. However, if your Linux came from a mag
azine CD-ROM, a book CD-ROM or a
low-cost GPL source, you will have to
make the boot discs yourself. These
are created from the DOS prompt (on
blank DOS-formatted floppy discs)
using a utility on the Linux CD called
RAWRITE.EXE and an appropriate
boot image file.
When you run RAWRITE.EXE, it
initially asks for the source of the disc
image file (eg, boot.img). If this file is
in the bootimg folder, for example,
you simply type /bootimg/boot.img.
After that, RAWRITE prompts you
to enter the target drive (usually A).
In any case, be sure to consult the
documentation supplied with your
distribution for details.
Once you have the boot disc, you
can use it to reboot your system and
proceed with the installation. Alternatively, you can boot from the CD
(if your system supports it and the
CD is bootable). After that, it’s just a
matter if following the prompts and
answering the odd question.
Most Linux distributions ask similar questions during installation,
although some look prettier on screen
than others. A progress bar is usually
present and there’s often some indication as to how far the installation has
progressed and how long is left to go.
Here, I like Caldera Open Linux, as
you can press ALT-F2 to go to another
“window” where you can to read a
number of useful on-line help files,
or even play a quick game of Tetris
while the installation goes on in the
background!
The first stage of the installation
might ask where the Linux software
Desperation Stuff
If you change your mind after an
fdisk/mbr and wish to boot Linux,
use the rescue image or the boot
image to get out of trouble. This will
get you back into Linux, after which
you can reinstall LILO.
If you can’t get into Windows
95/98, reconfigure LILO (type man
lilo for the details) so that you can
add the necessary information on
the DOS/Windows partition.
Finally, if you want to toss in the
towel on Linux, type fdisk/mbr at
the DOS prompt to reinstate the
Windows partition loader.
is to be found. Assuming you’ve
obtained a commercial distribution,
this will be the CD- ROM but there
are also some clever options to allow
installation directly off the net (very
slow unless you have ISDN). What
ever you do, be sure to refer to the
manual supplied with your distribution, particularly when it comes to
selecting an installation class.
If you’re planning on running a
network, you will have to enter in
your system’s IP address, the domain
name and the PC’s name. If you don’t
intend connecting to the Internet, or
even if you do and this system is to
function as a firewall/router, use a
domain name that’s not valid in the
outside world.
As an example, let’s call the PC fred,
assign it an IP address of 192.168.1.1,
and call the domain network.home.
The complete named address for the
PC will thus be fred.network.home.
Your other PCs on the network
must be given different names and
IP addresses but note that the domain name (network.home) remains
the same. Your local area network
will function quite happily, despite
not having a domain name with a
conventional extension (eg, .com or
.com.au, etc). However, you can still
set up your PC to route traffic to these
domains after dialling in to the net
(more on this next month).
During the installation, if you select
X11 or Xfree86 (the Linux “XWindows” look-alike), you may also be
asked about your VGA card. Unless
you are absolutely sure of what you
have, it’s best to select “Don’t Probe”
and configure Xfree86 after installation when you do have the necessary
information. It can be quite annoying
if you set the wrong card or monitor
refresh rates and get stuck with a
screen you can’t read or a VGA card
that’s locked up.
If something goes wrong during installation, simply reinstall Linux over
the top of the previous installation.
Next month we’ll show you how to
configure Samba, so that your Linux
“box” can function as a file and printer server to a Windows network. We’ll
also describe how to set Linux up as
a router, so that a number of people
can share one Internet connection.
Finally, to make it all safe, we’ll set
it up as a firewall, to keep some of the
latest Trojans and nasties, like NetBus
SC
and Back Orifice, at bay.
April 1999 13
|