SDB:How to Create a System Boot CD

From openSUSE


Version: 7.2 -

Situation

You cannot boot your installed system by using the boot manager LILO configured with YaST2. In addition, it is no longer possible to create a system book disk as described in the article "Creating a System Boot Disk" with newer SuSE Linux versions, since the size of the boot files exceeds the storage space on the floppy disk.

Procedure

If your computer is equipped with a CD writer, you can create a bootable CD containing the Linux start files.

Please note that the solution described in these lines is a workaround. As a general rule, it should be possible to configure the boot manager LILO accordingly. For this purpose, refer to the documentation at /usr/share/doc/packages/lilo/README and to the man pages on lilo.conf and lilo, which can be viewed with the commands man lilo.conf and man lilo.

Boot CD with ISOLINUX

The following information is obsolete as the procedures don't work with Open SuSE 10.3:

# cp /usr/share/syslinux/isolinux.bin /tmp/CDroot/ cp: cannot stat `/usr/share/syslinux/isolinux.bin': No such file or directory

The easiest way to create a bootable CD is by using the boot manager Isolinux. By the way, SuSE installation CDs are also made bootable by means of Isolinux.

  • First, boot your installed system as follows (from SuSE Linux 7.2 on):
    • Boot from the installation CD or DVD as you would in a usual installation.
    • When booting, select the option "Installation" (default).
    • Now select your language and keyboard layout.
    • In the next menu, select "Boot installed system".
    • The root partition will be automatically detected and the system will be booted from it.
  • Open a root shell. By executing the following commands, a temporary directory will be created for the boot CD where the files necessary to boot the Linux system (the boot loader Isolinux along with the kernel and the initrd) will be copied.
mkdir /tmp/CDroot
cp /usr/share/syslinux/isolinux.bin /tmp/CDroot/
cp /boot/vmlinuz /tmp/CDroot/linux
cp /boot/initrd /tmp/CDroot
  • Now make the boot loader's configuration file /tmp/CDroot/isolinux.cfg with an editor of your choice. If you use pico, the command reads:
pico /tmp/CDroot/isolinux.cfg

Enter the following lines in the file:

DEFAULT linux
LABEL linux
  KERNEL linux
  APPEND initrd=initrd root=/dev/hdXY [boot parameter]

Replace the parameter root=/dev/hdXY with your root partition. If you do not know its exact name, look it up in the file /etc/fstab.
You can also replace the value [boot parameter] with additional options that may be used when booting.

An example of a configuration file:

DEFAULT linux
LABEL linux
  KERNEL linux
  APPEND initrd=initrd root=/dev/hda7 hdd=ide-scsi
  • Finally, create an ISO9660 file system for the CD from these files with the following command:
mkisofs -o /tmp/bootcd.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /tmp/CDroot

Make sure to enter this command in a single line.

  • The file /tmp/bootcd.iso can be now written to a CD either by using a graphical CD burner such as koncd or xcdroast, or from the command line with:
cdrecord -v speed=2 dev=0,0,0 /tmp/bootcd.iso -eject

It might be necessary to adapt the parameter dev=0,0,0 to the CD writer's SCSI ID (examine the output of cdrecord -scanbus; see also man cdrecord).

  • Testing the boot CD: Reboot your computer and check if the Linux system is correctly started from the CD.

Note: This procedure (making a bootable CD) exceeds the scope of the free of charge installation support.

We would like to thank our former colleague Stefan Schmidt for his valuable contribution to this article. Thanks, Stefan!

SDB:Booting with the initial ramdisk