Small Linux Distros For Every Occasion
With Linux booting from removable media, you've got a versatile and powerful toolkit that lets you rescue or repair all manner of systems (and not just the ones running Linux), or even non-destructively reconfigure hard drive space.
One of the (very many) areas in which Linux has pulled ahead of the pack is with live, complete Linux distributions on every form of removable media. Tiny Linuxes to full-blow kitchen sink Linuxes boot and run from USB sticks and drives, Compact Flash cards, CDs and DVDs; so they never need to touch the hard drive, or even have a hard drive present. Some of them run entirely in memory. Some are smart enough to use the swap partition on the hard drive, if one is available. There are different ways of preserving data and configurations, the main point being you can still save data and configurations.
We all know and love the Debian-based Knoppix. Knoppix supports a vast array of hardware—if something doesn't work under Knoppix, chances are it's not supported in Linux. Knoppix gives you GUI tools for nearly any task you want to perform, and includes applications for every imaginable task. You're not limited to rescue operations, but you get a complete distribution with productivity applications. It is very popular and has excellent community support, including good articles on re-mastering Knoppix to customize it for yourself. Knoppix is for Pentium systems with a lot of RAM, the more the better: 32 MB for text mode, 128 MB and up for KDE.
Start at the Knoppix Wiki, and especially the Cheat Codes. These are boot codes for dealing with funky hardware, or turning on special tasks. For example:
- lang=[two-letter country code]
- toram; this is a nice option for RAM-rich systems. The contents of the CD are copied to your system RAM. This a lot faster than running from the CD, and then you don't need to leave the CD in the drive. You need at least a gigabyte of RAM.
The first keyword is always knoppix, like knoppix desktop=fluxbox toram.
Knoppix also comes in a DVD edition, if the CD version isn't enough for you.
SystemRescueCD is my favorite rescue CD. It's based on Gentoo and contains a stripped-down set of applications for system rescues. So it doesn't include OpenOffice or the Gimp or all of the other productivity applications that Knoppix has. You can get ISOs for x86, Sparc, and PowerPC. The x86 version is a mere 155 MB.
Even better: You can boot and run SystemRescue from a USB stick. Newer systems support booting from USB devices; usually you need to go into the system BIOS to turn this on. It's not completely reliable, however; some systems seem to be allergic to booting from USB devices, so be sure to test it before you need it.
With SystemRescue you can copy files over the network, do serious network troubleshooting, read and write all the major filesystems including NTFS, manage partitions and filesystems, and do secure deletions. SystemRescue comes with my favorite data recovery tool, GNU ddrescue. This is the best utility for grabbing data off a failing hard drive. It is fast for a dd-based command, and smart enough to skip over bad blocks and keep going, looking for good blocks to copy.
The most surefire method I know requires a second local hard drive of equal or greater size; either SATA/PATA or USB. Then boot up SystemRescue and copy the first drive to the second drive. Of course you must replace the drive names in the example with your own drive names:
# ddrescue /dev/sda /dev/sdb
You may copy partitions instead of whole drives. Then run fsck on the second drive to check for and fix errors. Make sure it is not mounted, then run this command:
# fsck /dev/sdb
Add the -a option to tell fsck to automatically fix all errors. Use fsck only on Linux filesystems. For other filesystems you'll need their own native filesystem-consistency-fixing utilities.
Don't confuse GNU ddrescue with dd-rescue. They do the same thing and both do it well, but I think ddrescue is faster and more reliable.