Section 32.1. Objective 1: Creating Recovery Disks


32.1. Objective 1: Creating Recovery Disks

If the boot floppy is not included with your installation media, you can create it by using dd. To do so, first mount the CD-ROM. Next, type the command:

 dd if=/mnt/cdrom/images/boot.img of=/dev/fd0 

replacing /mnt/cdrom with the mount directory of your CD-ROM. You may also need to replace /dev/fd0 with the appropriate mount point of your floppy.

If you have only a Windows machine available, the dd command won't do you any good. In that case, use the rawrite.exe command to do the same job.

Some distributions provide utilities to create boot disks after the fact. On Red Hat-based systems, there is mkbootdisk. You must supply the kernel version for which you want to crate a boot disk. For example, if you have kernel versions 2.6.9-1.667, 2.6.9-1.667smp, and 2.4.1 installed on your system, you can create a boot disk for the second kernel with the following command:

 mkbootdisk 2.6.9-1.667smp 

This command prompts you to insert a floppy disk (use --noprompt if you do not wish to be asked) into device /dev/fd0 (change it with the --device option). The command will then write a boot sector, kernel images, and initial ramdisk to the device.

Debian has a similar command, mkboot, but unlike mkbootdisk, you supply the filename of the kernel that you want to boot, such as:

 mkboot vmlinux 

A boot disk itself is not sufficient to boot the system. After loading the boot loader and then the kernel, the boot disk will look for the root partition on the hard drive (pulled from /etc/fstab when you created the boot disk). This means if there is something wrong with your hard drive or root partitions, you will still not be able to boot your system. In those cases, you will need a rescue disk such as the first CD of a Red Hat installation or a self-contained Linux system such as Knoppix.

If you need to make a custom boot disk, refer to the Bootdisk HOWTO located at http://www.tldp.org/HOWTO/Bootdisk-HOWTO.



LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2004
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net