Linux.com
Everything Linux and Open Source
Saving an old laptop with Knoppix
An old laptop of mine fubared its Linux partition beyond (easy) repair so I decided a clean install was the way to go. When I went to install a recent Debian system I had trouble with PCMCIA under the 2.2 kernel, and XFree gave me a blank screen under 2.4. Knoppix, however, made everything work automagically (with the exception of sound).
I thought for a minute... hmmm... I can compile a custom kernel for the box as I had always done in the past, or I can simply copy the Knoppix CD-ROM with its compressed filesystem onto the hard disk. Since the box has only 1.5 GB of disk available, things have always been a tight squeeze, but with Knoppix I would get a pretty complete install in only 700 megs, albeit with the cost of some speed to decompress applications on startup.
So I gave it a shot, and sure enough, it worked pretty darn well.
The only problem was the lack of persistent configuration. Knoppix supposedly has some tools that will allow you to save configuration info, but I haven't played with them yet. But it is pretty trivial to write a script to tweak things after the fact.
The only "problem" with Knoppix is that the CD-ROM is updated every few weeks and that there is no way to download just the changes -- the complete ISO image must be downloaded for each upgrade.
In any case, getting a compressed Knoppix to run from your HD is as simple as the following:
- Copy the contents of the CD-ROM to your hard disk. I created a 750 meg partition for this, but strictly speaking I'm not sure this is necessary. (Knoppix seems to scan for its compressed disk image, so you might be able to stash that anywhere)
- Mount the boot.img file via a loop mount point to copy off the kernel and initrd files.
- Configure grub or lilo to boot with these. You'll probably want to specify some boot options, at the very least, changing from the default German keyboard and language.
- Reboot. Then magic happens.