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 ...

Get LPI Linux Certification in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.