Most Linux distributions come on a CD-ROM and there are various rescue disk images available that you can burn to a CD-ROM. In the near future, most PC's won't even have a floppy drive, so the CD-ROM is the only choice.
Most modern BIOS-es support the El Torito standard to boot from a CD-ROM. There are two different ways to boot Linux from a CD-ROM:
As an initial RAM disk on a diskette is loaded by the boot loader and the boot loader uses BIOS, this will also work from an emulated diskette image on a CD-ROM. This does not apply to a RAM disk that is loaded by the kernel (the non-initrd type), because the kernel does not use BIOS.
The LILO, GRUB and SYSLINUX boot diskettes described in this document should all work from CD-ROM, provided you create them on normal 1.44MB diskettes and not on overformatted 1.72MB diskettes.
It is not possible to use overformatted diskettes on a bootable CD-ROM (21 sectors per track 82 tracks), but it is possible to use 2.88MB diskette images. Real 2.88MB diskettes and their drives are very rare, but as diskette images on bootable CD-ROM's this format has gained popularity.
Both types of bootable CD-ROM can be created with mkisofs. The resulting ISO image can then be burnt to a CD-ROM using cdrecord or another CD writing program, even under Windows. I've tried both types using CD-RW disks.
Let's start with an emulated diskette. In the example I used the GRUB diskette, as it was already formatted at 1.44M (the image from my home page uses LILO and it should work fine too). First create a directory tree for the ISO image.
mkdir iso mkdir iso/boot mkdir iso/dataNext copy some files to the data subdirectory and copy the diskette to the boot directory.
cp somefile iso/boot/data dd if=/dev/fd0 of=iso/boot/boot.imgNow create the ISO image.
mkisofs -o emuboot.iso -b boot/boot.img \ -c boot/boot.catalog -r isoFinally burn it to a CD-ROM. Use the appropriate device ID.
cdrecord dev=0,1,0 -eject -pad -data emuboot.iso
This CD is bootable and from the booted Linux you should be able to mount the CD-ROM to access the data files. As my CD-ROM is on /dev/hdd and the RAM disk image does not include this device, I had to mknod it first:
mknod /dev/hdd b 22 64 mount -r -t iso9660 /dev/hdd /mnt
Next create a bootable Linux CD-ROM with ISOLINUX. First create the file isolinux.cfg with the following contents:
prompt 1 timeout 100 say Available options: linux and noram label linux kernel zimage append initrd=root.gz label noram kernel zimageIn fact this file is identical to syslinux.cfg on the SYSLINUX diskette.
Remove the old boot directory from the iso directory tree and replace it with the isolinux directory containing the kernel, the RAM disk image and the boot files:
rm -rf iso/boot mkdir iso/isolinux cp zImage iso/isolinux/zimage cp root.img.gz iso/isolinux/root.gz cp syslinux-1.75/isolinux.bin iso/isolinux cp isolinux.cfg iso/isolinux
Next create the ISO image and burn it to CD as usual:
mkisofs -o isoboot.iso -b isolinux/isolinux.bin \ -c isolinux/boot.catalog \ -no-emul-boot -boot-load-size 4 \ -boot-info-table -r iso
Older BIOS-es cannot boot from CD-ROM. There are two solutions: