Hack 90. Rescue Me!
So you've tried all the standard tips and tricks to get your system to boot on its own, and nothing has worked. In that case, a bootable Linux system on a CD may be your new best friend. Hardware failure, filesystem corruption, overzealous upgrades, and significant tweaking of your system's startup process are among the things that can cause your system to fail to boot successfully. Assuming you've gotten to this point and the suggestions in "Resolve Common Boot and Startup Problems" [Hack #89] didn't work out, your next good alternative is to download, burn, and boot from what is known as a "rescue disk."
A rescue disk is a small Linux distribution that boots and runs from a CD and provides the kernel and operating system capabilities that you need to access your hardware, as well as the tools you need to resolve problems with the interaction between that hardware and the desktop or server system you're trying to boot. The things that a rescue disk must provide fall into four general categories:
Though there are plenty of rescue disks around, including many graphical Live-CD Linux distributions, my personal favorite for years has been Kent Robotti's RIP (Recovery Is Possible!) disk, available from http://www.tux.org/pub/people/kent-robotti/looplinux/rip/. This is a relatively small (25 MB) rescue disk that does not offer any graphical user interface but does provide a complete set of up-to-date filesystem repair utilities for ext2, ext3, JFS, reiserfs, reiser4, and XFS filesystems, as well as the LVM2 utilities for mounting and managing logical volumes. As a nongraphical rescue disk, it targets experienced sysadmins who are comfortable at the command line, which you should be when trying to rescue or recover data from an ailing system. 10.3.1. Downloading and Burning the Rescue DiskThe two ISO images on the RIP page differ in terms of the bootloaders they useone uses GRUB, and the other uses the standard ISOLINUX bootloader. I prefer to use the latter because it is simpler, so I always retrieve the file RIP-13.4.iso.bin, which is a binary CD image that you can burn directly to CD and then use to boot your system. The standard Linux command-line CD-burning utility is called cdrecord. Prior to the 2.6 Linux kernel, using an IDE CD writer with cdrecord required the use of a loadable kernel module that provided SCSI emulation for IDE, because cdrecord expected SCSI identifiers when specifying the target output device. With the 2.6 kernel, CD-burning utilities can use ATA CD drives directly, without any special modules. Once you've retrieved the file, you'll need to identify your system's CD burner(s). To do this, su to root and then execute the cdrecord -scanbus command. This causes cdrecord to probe the system for suitable devices and display the information that you'll need to supply in order to write to them. Here's an example: # cdrecord -scanbus Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J#rg Schilling Linux sg driver version: 3.1.24 Using libscg version 'schily-0.7' scsibus0: 0,0,0 0) 'TOSHIBA ' 'DVD-ROM SD-R1202' '1026' Removable CD-ROM 0,1,0 1) * 0,2,0 2) * 0,3,0 3) * 0,4,0 4) * 0,5,0 5) * 0,6,0 6) * 0,7,0 7) * Once you've identified the device associated with your CD burner, burn the CD image to a writable CD-ROM using a command such as the following: # cdrecord -v dev=0,0,0 speed=4 RIP-13.4.iso.bin This command will produce very verbose output (due to the use of the -v option) and will wait nine seconds before actually starting to write to the disc, just in case you change your mind. Once writing begins, the cdrecord command displays a status line that it continues to update until the entire file is written to the CD. 10.3.2. Using the Rescue CDOnce you've created the rescue CD, you need only put it in the ailing system and reboot. If your system is not configured to boot from the CD drive before booting from a hard disk partition, you may need to change your system's boot sequence in the BIOS settings in order to get the system to boot from the CD. Once you've booted from the rescue CD, you can quickly and easily perform tasks such as the following:
10.3.3. See Also
|