[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]
...making Linux just a little more fun!
Modern Linux Distributions and Hardware-Challenged PCs
By Richard Johnson


Linux possesses a much-vaunted ability to run on just about any machine you care to throw at it. Well, I've not tried running my washing machine on it yet but I suspect that one day that time will come. In an effort to open up the joys of Linux to a wider audience, the trend in recent Linux distributions has been to wrap up the installation process with a nice user-friendly GUI. SuSE Linux is a case in point. Their installation is run through the YaST installer which sports an attractive interface and makes installing a complex operating system like Linux an almost pleasant experience. There is one drawback however - these graphical installers tend to need a certain amount of, for want of a better word, oomph in your computer. SuSE suggest, for example, that the YaST installer requires a minimum of 64MB RAM on your machine.

Once the operating system is actually installed, however, Linux is capable of running on machines that do not meet this more demanding spec. You can tailor and tweak an installation such that you will be able to get some use out of that old 486 you might have stuck in the attic, gathering dust. It could be used as a spare machine, a router, even a small web server.

Nonetheless, if you try and install a recent distribution of Linux on such a machine you may well find that the attractive and user-friendly installer simply refuses to run.

Recently I myself had occasion to install a modern Linux distro on a reasonably old machine. I had to surmount a few problems in the course of this so I've written up my experiences - in this document - in the hope that it may prove of use to others out there who also wish to put older, otherwise redundant, machines to good use.

A need for an Intranet

For a variety of reasons it had become clear to me that the small company for whom I work needed an intranet site available on our local area network. Nothing too complex was required, just a simple site on which to host various company documents and other information; making them readily available to everyone on the network.

I also realised that this would provide me with a perfect excuse to bring Linux into our otherwise Microsoft-only network.

In the retail business margins are always tight and we simply could not justify the cost of a new powerful machine such as would be required to run, for example, Microsoft's IIS. We did, however, have a spare PC that was currently unused. This PC was an older model which was unable to run our relatively new accounting system and so had found itself replaced and relegated to a corner of my office. I duly designated this PC as our future intranet server.

The spec of this box was relatively low by modern standards - in fact the operating system installed on it was MS-DOS 6.22 with Windows for Workgroups 3.11! The PC had a 200MHz Pentium MMX processor, 16MB of RAM and a relatively generous 2GB of hard disk space. I felt this was ample for the somewhat limited demands that our intranet would place on the box - at least to begin with. I knew that I would probably need to increase the amount of RAM in the box; but RAM is cheap and it would be easy to upgrade once I'd installed Linux, if need be. I decided to crack on with my installation.

The distribution

I needed only a relatively minimal Linux installation as the box would operate purely as a web server on the local network - installation of an X server was not required. The distribution that I decided to install was SuSE Linux 8. This was because it is the Linux distro that I use on my own PC at home and I'm familiar and comfortable with SuSE's way of doing things. I've tried a few different distros in my time and have pretty much settled on SuSE as my favourite. It was with a certain amount of relish that I set about installing a new operating system from my own set of CD's without having to worry about any visits from the licensing gestapo.

The installation

I booted up the PC and hit the F2 key to get into the BIOS. A quick check revealed that I could instruct the PC to boot from the cd-rom drive first so I duly set it to behave like this. I inserted disk 1 from my set of SuSE Linux disks and rebooted the PC with the new bios settings. After successfully booting from the CD I chose to do a 'standard installation' from the SuSE menu that appeared.

The SuSE Linux installation process begins by loading a copy of Linux into your system memory, making use of a ramdisk to provide an initial filesystem rather than using the hard disk. Or at least - it tries to. The system appeared to lock up when it tried to uncompress the ram disk into memory. After waiting a while, mindful of the low spec of the system, just to check that I wasn't simply being impatient, I hit ctrl-alt-del and the system shut itself down gracefully.

I tried again - booting the computer once more from the cd-rom, however this time I tried SuSE's 'safe installation'. Unfortunately the same problem manifested itself just as before.

I suspected that the problem was being caused by the limited physical memory on my box. A quick root around on SuSE's website revealed that the minimum memory suggested for running their setup program, as I mentioned earlier, is 64MB; which is rather more than the 16MB my poor box was blessed with.

Not being one to give up without a fight I booted once more from the cd-rom and hit the F2 key at the initial SuSE screen to start up the text based installation - on the hope that this would require less memory than the fancy framebuffer GUI-based installation that SuSE normally provides. It worked! The initial copy of Linux, ramdisk and all, successfully loaded into the system memory and the text-based YaST installation began. I was asked couple of questions regarding such matters as my preferred language and then...a message popped up telling me that I did not have sufficient memory to run YaST. The installation had halted once more.

At this stage YaST actually gave me the option of activating a swap partition to provide some virtual memory in lieu of physical memory. Unfortunately I didn't have a swap partition on this box - just one huge 2GB FAT16 DOS partition. It did, however, point up a possible solution to my problem. I realised that if I manually repartitioned my disk before actually running the YaST - providing myself with a genuine Linux swap partition - then I might actually be able to get somewhere.

The Partitioning

Not having access to any sophisticated partioning software, I decided to obtain a Linux boot disk with the Linux version of FDISK - so that I could roll my own partitions.

To this end I downloaded the truly wonderful Tom's Root Boot Disk. This provides a DOS executable that will format an ordinary 1.44MB floppy disk with a complete bootable Linux system; including a small filesystem and all the handy utilities you could need. It even includes FDISK. Tom's Root Boot Disk can be downloaded from http://www.toms.net/rb/ and I cannot recommend it highly enough.

The DOS executable provided by Tom will not run in a command prompt on Windows 2000 - the OS on my usual desktop PC at work. Instead it requires an actual DOS operating system, so I copied the downloaded zip file onto the box that I was trying to install Linux onto - if you recall, it had MS-DOS 6.22 installed on it - and unzipped it. Rebooting a Win95/98 PC in MS-DOS mode would also provide you with a suitable environment. I stuck a floppy in the appropriate drive and let Tom's program create my boot disk for me. A painless procedure. Finally I re-booted the computer using my newly created Linux boot disk.

After pausing to marvel for a moment at how darned clever Tom's Root Boot Disk is, I got to work. I should mention at this point that FDISK misbehaved the first time I tried it. I thought I'd zapped the original DOS partition and created for myself a sparkling new Linux swap partition but it turned out that FDISK had misreported the number of heads, cylinders and sectors on my disk. Thus, when it wrote the new partition table it made a right pig's ear of it. I didn't realise this until YaST started throwing up bizarre errors about my disk. I rebooted with Tom's root boot and tried again. The second time around FDISK behaved itself and all was well. Though - left somewhat paranoid by FDISK's behaviour - to make sure that it was now correctly detecting the details of my hard disk I actually took the PC apart so that I could check the label on the disk itself!

FDISK is often cited as being a scary bit of software to use, but I've always found it to be quite straightforward myself. To launch FDISK you type:

#> fdisk /dev/hda

Assuming, of course, that the hard disk to be partitioned is the first IDE disk. You have to tell FDISK which device you want to partition, in this case /dev/hda. If you have any doubts about FDISK's syntax you can check out the man page - yes, Tom's root boot disk even provides man pages for your edification and delight!

Once you've started up FDISK you control its behaviour with single letter commands. Type 'm' (without the quotes) for a list of the available commands. 'p' prints out the current partition details on screen for reference.

First you need to delete the existing partition by typing 'd' and specifying, when prompted, which partition number you wish to delete. The partition numbers are revealed when you print the partition details on screen. Bear in mind that FDISK doesn't actually make any changes to your disk until you use the 'w' command to write your changes. If you screw up you can just type 'q' to quit without saving your changes. Once you have written them, however, there is no going back so be careful. New partitions are added to the disk with the 'n' command. New partitions will be normal Linux partitions by default so you'll need to use the 't' command to change the new partition's type to Linux swap. You need to know the hex code for swap partitions when you change the partition type and you can get this by using the 'l' command to list all the different partition types supported by FDSIK. Linux swap is type 82.

In my case I created two separate primary partitions on the disk. The first was a Linux swap partition; 128MB in size. The second partition was a standard Linux partition taking up the rest of the disk. I then formatted my partitions. For the swap partition I used the following command:

#> mkswap -c /dev/hda1

This sets up a Linux swap area on partition 1 of device hda. The -c flag tells mkswap to check the partition for bad blocks. The second Linux partition I formatted as a Linux Second Extended Filesystem with the command:

#> mke2fs -c /dev/hda2

The syntax, as you can see, is rather similar to the mkswap command.

The installation - slight return

Once I'd created my partitions I booted once more from the SuSE Linux CD - again pressing F2 to opt for the text based installation. This time, when asked if I wanted to activate a swap partition, I could specify the partition that I had just created which was located at /dev/hda1. YaST then proceeded without a hitch - if a little slowly.

From this point onwards the installation was relatively straightforward. SuSE's YaST is a very good setup tool striking just the right balance between sophistication and user-friendlyness, IMHO. The only problem that I needed to watch out for was with YaST's own disk partitioner. This recognised my existing partitions and suggested reformatting the second partition with the ReiserFS journalling filesystem - which I was more than happy to do - however, it also suggested reformatting the swap partition as well. I thought it best not to let it do this as I suspected it might cause problems if I tried to format a swap partition that was in active use...


YaST is good but memory hungry and it certainly made extensive use of the swap partition that I'd created. Once Linux was installed and running I was able to tune my installation to ensure that only the necessary services were running and it ran tolerably well with just the 16MB of RAM. Notwithstanding a lot of activity on the swap partition of course.

In the end I did install more memory in my box. This made the system more responsive and better able to cope with the demands placed upon it by multiple users over the network. Yet I was nonetheless impressed by how well Linux - which is a powerful modern operating system after all - ran on a system with such limited resources.

Copyright © 2002, Richard Johnson. Copying license http://www.linuxgazette.com/copying.html
Published in Issue 85 of Linux Gazette, December 2002

[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]