Boot-able CDs

Table of Contents

Create boot-able CDs 
linux single boot 
multi boot cdrom images 
Make my bootable CD 
Create wincombo 
Windows single boot 
Windows multi boot 

Create boot-able CDs 

linux single boot

use isolinux as the bootloader? nothing easier than that.

first make a direcory isolinux in the root tree of your rescue system: mkdir $ROOTFS/isolinux

copy the kernel image, the gzipped initrd image, isolinux.bin and isolinux.cfg to $ROOTFS/isolinux

make the cd image with the following command:

mkisofs -R -b isolinux/isolinux.bin -c isolinux/ -no-emul-boot -boot-load-size 4 -boot-info-table $ROOTFS > cd.iso

voila, that's it.

Help mkisofs 

mkisofs will only write 8.3 style uppercase only filenames by default. If you want filenames up to 31 chars long, then specify the -l option. If you want mixed case filenames you need to enable the Rock Ridge extensions with the -R option, and may want to use the -r option as well which assigns sensible user/group ownership to all files. You will definately need the -R option if you want to copy whole unix directory trees to the CD.

       Specifies that  the  boot  image  used  to  create  "El  Torito"
       bootable CDs is a 'no emulation' image. The system will load and
       execute this image without performing any disk emulation.
-boot-load-size load_sectors
       Specifies  the number of "virtual" (512-byte) sectors to load in
       no-emulation mode.  The default is to load the entire boot file.
       Some BIOSes may have problems if this is not a multiple of 4.

When the -boot-info-table option is given, mkisofs will modify the boot file specified by the -b option by inserting a 56-byte "boot informa- tion table" at offset 8 in the file. This modification is done in the source filesystem, so make sure you use a copy if this file is not eas- ily recreated! This file contains pointers which may not be easily or reliably obtained at boot time.

The format of this table is as follows; all integers are in section 7.3.1 ("little endian") format.

Offset    Name           Size      Meaning
 8        bi_pvd         4 bytes   LBA of primary volume descriptor
12        bi_file        4 bytes   LBA of boot file
16        bi_length      4 bytes   Boot file length in bytes
20        bi_csum        4 bytes   32-bit checksum
24        bi_reserved    40 bytes  Reserved

The 32-bit checksum is the sum of all the 32-bit words in the boot file starting at byte offset 64. All linear block addresses (LBAs) are given in CD sectors (normally 2048 bytes).

Help isolinux.cfg 

# isolinux.cfg

DEFAULT RescueSystem

LABEL RescueSystem
KERNEL /isolinux/vmlinuz
APPEND initrd=initrdfs.gz ramdisk_size=40960 root=/dev/ram0

In the configuration file blank lines and comment lines beginning with a hash mark (#) are ignored.

DEFAULT kernel options… 

Sets the default command line. If SYSLINUX boots automatically, it will act just as if the entries after DEFAULT had been typed in at the "boot:" prompt, except that the option "auto" is automatically added, indicating an automatic boot.

If no configuration file is present, or no DEFAULT entry is present in the config file, the default is kernel name "linux", with no options.

APPEND options… 

Add one or more options to the kernel command line. These are added both for automatic and manual boots. The options are added at the very beginning of the kernel command line, usually permitting explicitly entered kernel options to override them. This is the equivalent of the LILO "append" option.


Indicates that if "label" is entered as the kernel to boot, SYSLINUX should instead boot "image", and the specified APPEND and IPAPPEND options should be used instead of the ones specified in the global section of the file (before the first LABEL command.) The default for "image" is the same as "label", and if no APPEND is given the default is to use the global entry (if any). Up to 64 LABEL entries are permitted for ISOLINUX.

Labels are mangled as if they were filenames, and must be unique after mangling. For example, two labels "v2.1.30" and "v2.1.31" will not be distinguishable under SYSLINUX, since both mangle to the same DOS filename.

TIMEOUT timeout 

Indicates how long to wait at the boot: prompt until booting automatically, in units of 1/10 s. The timeout is cancelled as soon as the user types anything on the keyboard, the assumption being that the user will complete the command line already begun. A timeout of zero will disable the timeout completely, this is also the default.


The maximum possible timeout value is 35996; corresponding to just below one hour.

DISPLAY filename 

Displays the indicated file on the screen at boot time (before the boot: prompt, if displayed). Please see the section below on DISPLAY files.


If the file is missing, this option is simply ignored.

multi boot cdrom images 

you can use isolinux in conjunction with memdisk to create multi boot cds.

tree hierarchy 

you can download the tree shown below without the image files here. just untar the archive, copy the images you want to boot into the images directory and adjust the isolinux.cfg file.

            |- RESCUECD
            |- isolinux/
                  |- images/
                  |    |
                  |    |- dr_image.img
                  |    |- part_img.img
                  |    |- rescuecd.iso
                  |    |- win_95a.img
                  |    |- win_95b.img
                  |    |- win_98.img
                  |    |- win_98se.img
                  |    |- win_me.img
                  |- txt/
                  |    |
                  |    |- message.txt
                  |- initrdfs.gz
                  |- isolinux.bin
                  |- isolinux.cfg
                  |- memdisk
                  |- vmlinuz


the rescuecd image is a special case 'cause we don't want to load the whole iso into RAM, so there is a special initrdfs.gz which takes care of starting it. the other images will all straightforward booted by the memdisk tool.

DISPLAY /isolinux/txt/message.txt

    KERNEL /isolinux/vmlinuz
    APPEND initrd=initrdfs.gz init=/linuxrc ramdisk_size=5000 root=/dev/ram0
    TIMEOUT 100

    KERNEL /isolinux/vmlinuz
    APPEND initrd=initrdfs.gz init=/linuxrc ramdisk_size=5000 root=/dev/ram0 cd_into_ram
    TIMEOUT 100

    KERNEL /isolinux/memdisk
    APPEND initrd=images/dr_image.img
    TIMEOUT 100

    KERNEL /isolinux/memdisk
    APPEND initrd=images/part_img.img
    TIMEOUT 100

    KERNEL /isolinux/memdisk
    APPEND initrd=images/win_95a.img
    TIMEOUT 100

    KERNEL /isolinux/memdisk
    APPEND initrd=images/win_95b.img
    TIMEOUT 100

    KERNEL /isolinux/memdisk
    APPEND initrd=images/win_98.img
    TIMEOUT 100

    KERNEL /isolinux/memdisk
    APPEND initrd=images/win_98se.img
    TIMEOUT 100

    KERNEL /isolinux/memdisk
    APPEND initrd=images/win_me.img
    TIMEOUT 100

creating the image 

mkisofs -R -b isolinux/isolinux.bin -c isolinux/ -no-emul-boot -boot-load-size 4 -boot-info-table cd_root > rescuecd.iso


What is MEMDISK? 

MEMDISK is meant to allow booting the boot image of legacy operating systems.

The boot image is a sector by sector image taken from a bootable floppy. When a PC boots from floppy this is normally done from the first floppy drive, known as drive number 0 or as drive A:. So, to let the CD-Rom boot there must be some mechanism that emulates a floppy drive (drive number 0).

MEMDISK simulates a disk by claiming a chunk of high memory for the disk and a (very small - 2K typical) chunk of low (DOS) memory for the driver itself, then hooking the INT 13h (disk driver) and INT 15h (memory query) BIOS interrupts.

How can I use MEMDISK? 

MEMDISK is an auxillary module used in conjunction with ISOLINUX. You need a disk image as well as the memdisk file itself. As far as the bootloader is concerned, memdisk is the "kernel" and disk image is the initial ramdisk (initrd).

You can use MEMDISK straight off the boot loader command line like the following:

memdisk initrd=diskimg.img

.. where, of course, diskimg.img is the name of the disk image file. The. memdisk file and the disk image need to be present in the appropriate location.

Normally, however, you would put something like following in the configuration file:

label dos
   kernel memdisk
   append initrd=dosboot.img

How should the image be constructed? 

The image file should contain a disk image, either a floppy disk or hard disk image. The disk image should not be compressed.

If the disk image is one of the following sizes, it's assumed to be a floppy image:

368,640 bytes 360K floppy (old 5.25")
737,280 bytes 720K floppy (old 3.5")
1,222,800 bytes 1200K floppy (standard 5.25")
1,474,560 bytes 1440K floppy (standard 3.5")
2,949,120 bytes 2880K floppy (enhanced 3.5")

For any other size, the image is assumed to be a hard disk image, and should have an MBR and a partition table. The C/H/S geometry is determined by examining the partition table, so the image does need to contain a valid partition table which convers the entirety of the image for proper operation.

It is also possible to specify the geometry manually, overriding the autodetect feature, by specifying the following command-line options:

c=number Specify the number of cylinders (max 1024[*])
h=number Specify the number of heads (max 256[*])
s=number Specify the number of sectors (max 63)
floppy The image is a floppy disk image
harddisk The image is a hard disk image