7.7. Creating Boot CDs

If problems occur booting your system using a boot manager or if the boot manager cannot be installed on the MBR of your hard disk or a floppy disk, it is also possible to create a bootable CD with all the necessary start-up files for Linux. This requires a CD writer installed in your system.

Creating a bootable CD-ROM with GRUB merely requires a special form of stage2 called stage2_eltorito and, optionally, a customized menu.lst. The classic files stage1 and stage2 are not required.

Create a directory in which to create the ISO image, for example, with cd /tmp and mkdir iso. Also create a subdirectory for GRUB:

mkdir -p iso/boot/grub
 

Copy the file stage2_eltorito into the directory grub :

cp /usr/lib/grub/i386-pc/stage2_eltorito iso/boot/grub
 

Also copy the kernel (/boot/vmlinuz), the initrd (/boot/initrd), and the file /boot/message to iso/boot/ :

cp /boot/vmlinuz iso/boot/
cp /boot/initrd iso/boot/
cp /boot/message iso/boot/
 

To make them available to GRUB, copy the file menu.lst to iso/boot and adjust the path entries to make them point to a CD-ROM device. Do this by replacing the device name of the hard disks, listed in the format (hd*), in the path names with the device name of the CD-ROM drive, which is (cd):

gfxmenu (cd)/boot/message
timeout 8
default 0

title Linux
    kernel (cd)/boot/vmlinuz root=/dev/hda5 vga=794 resume=/dev/hda1
splash=verbose showopts
    initrd (cd)/boot/initrd
 

Finally, create the ISO image with the following command:

mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info-table -o grub.iso iso
 

The write the resulting file grub.iso to a CD using the utility of your preference.


SUSE LINUX 9.2