While it can be a painful situation, if you have the right tools, recovery can be much easier.
Although Linux is usually known for its rock solid stability, a Linux server may still sometimes crash and/or become unbootable, often due to hardware issues. On these occasions, one of the best tools to have at your disposal is a bootable Linux CD.
Linux distribution
For the purpose of this article, I performed the steps listed below on a minimal Red Hat Linux 8.0 installation.
Take note at installation
At the end of the typical Red Hat Linux installation session, you're asked whether you want to create a boot disk. If you are serious about system recovery in the event of a failure, don’t skip this step. This disk will be your first step in recovery should disaster strike. If you chose not to do this, you can do it later using the mkbootdisk utility from the command line.
The many tools of Linux
One of the great things about Linux and open source software in general is that there is a plethora of tools out there just waiting to be discovered. The chances are good that you will find a utility that almost perfectly suits your needs if you look hard enough. The same philosophy holds true for tools that aid in the recovery of a crashed system.
Putting together a CD with all of the appropriate files and utilities would take a long time if you had to figure out exactly what to put on it. Fortunately, some folks in Belgium have made this entire process simple and straightforward by putting together a utility called mkCDrec.
What is mkCDrec?
MkCDrec (Make CD-ROM Recovery) is a utility that creates a bootable disaster recovery CD for Linux. It supports a number of file systems, RAID, and optional utilities that can be useful in the event of a failure. Among these utilities are partition management tools, RAM test tools, and data salvage tools. In addition, mkCDrec supports the most recently released versions of popular Linux distributions, such as Red Hat 8 and Mandrake 9
Getting started
The first step in creating your recovery CD is to download mkCDrec. At the time of this writing, the current version is 0.6.7 and is available for download here. I have saved the file mkCDrec_v0.6.7.tar.gz in my home directory of /home/slowe on my Red Hat Linux 8.0 server. In addition, you can download the optional mkCDrec utility package, which contains a number of useful utilities that can be burned onto the recovery CD. The utilities package is currently also at version 0.6.7. For the remainder of the installation, you will need to have root user privileges. Here are the steps:
- cd /home/slowe [Switch to the directory where you stored the download.]
- tar zxvf mkCDrec_v0.6.7.tar.gz [Expand the distribution.]
- cd mkcdrec [Switch to the directory created during the expansion.]
- tar zxvf /home/slowe/mkCDrec_v0.6.7_utils.tar.gz [Expand the utilities.]
- make test [This is a script that checks your system to make sure that all of the utilities required by mkCDrec are available; click here to see an example of the output of this command]
As you can see from the output, some problems on my server need to be resolved before I can continue. The nasm error refers to a utility that allows you to work with assembly code on Linux. I was unable to find this package on my Red Hat Linux 8 CD set, so I downloaded it here and installed it with the following command on my Linux server:
rpm --install nasm-0.98-8.i386.rpm
A working kernel is required since the recovery CD needs to be able to boot into an OS that can actually work with your Linux system. The mkCDrec program comes with a 2.4.18 kernel that it will use to create the recovery CD.
The other error indicates that a utility to burn a CD is not present. Since I do not have a burner on my Linux server, this makes sense. I will be burning this CD on my Windows machine, so I can take the advice of the installer and change the configuration to ignore the fact that I do not have a burner. I can accomplish this by editing the Config.sh file with the command pico Config.sh and then changing the line BURNCDR=y to BURNCDR=n.
After installing nasm and fixing the configuration file to tell it to ignore the burner, I can run make test again to see whether there are any more errors. In this example, I do not have any more errors, so I can continue the installation.
The next step in the installation is mostly menu driven; the menu is shown in Listing B.
Here is a summary of the menu options:
- Option 1 creates a bootable CD with rescue utilities only. No data from the system is stored on the CD.
- Option 2 creates a bootable CD with rescue utilities as well as backup information from the system. These can be dangerous to leave lying around, as these CDs will provide unrestricted access to the data stored on them. This option will create one or more ISO images, depending on the size of the files. They are stored in /tmp/backup.
- Option 3 is the same as option 2 except that the ISO images are stored somewhere else instead of /tmp/backup.
- Option 4 uses a tape for the backup instead of the CD. The rescue CD is still created.
For this example, I am going to choose option 1 so that I can copy the generated ISO file to my Windows machine to be burned onto a CD. If I wanted to back up my system files and configuration files to CD, I could choose option 2 or 3, but for simplicity and time, option 1 is fine. This will give me with a CD that I can boot and attempt to recover a crashed system but will not provide me with any backups of important files from my current Linux server.
Once I choose option 1, the mkCDrec script starts its work. This process takes a while, because the utility needs to build the entire contents of the rescue CD, including the boot loader, the kernel, and the rescue utilities. The final few lines of the process will tell you where everything is stored, as shown in Listing C.




15%
7%







You can find a script program which will easily create a Linux bootable CD using your desktop Linux system for parts at:
http://users.rcn.com/srstites/LifeBoat/LifeBoat.home.page.html