mkisofs -R -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table $ROOTFS > cd.iso
http://rescuecd.sourceforge.net/288.html#isolinux
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/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table $ROOTFS > cd.iso
voila, that's it.
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.
-no-emul-boot 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).
# isolinux.cfg DEFAULT RescueSystem PROMPT 1 LABEL RescueSystem KERNEL /isolinux/vmlinuz APPEND initrd=initrdfs.gz ramdisk_size=40960 root=/dev/ram0 TIMEOUT 100
In the configuration file blank lines and comment lines beginning with a hash mark (#) are ignored.
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.
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.
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. |
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. |
you can use isolinux in conjunction with memdisk to create multi boot cds. http://syslinux.zytor.com/memdisk.php
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.
cd_root/ | | |- 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.
DEFAULT 1 DISPLAY /isolinux/txt/message.txt PROMPT 1 LABEL 1 KERNEL /isolinux/vmlinuz APPEND initrd=initrdfs.gz init=/linuxrc ramdisk_size=5000 root=/dev/ram0 TIMEOUT 100 LABEL 2 KERNEL /isolinux/vmlinuz APPEND initrd=initrdfs.gz init=/linuxrc ramdisk_size=5000 root=/dev/ram0 cd_into_ram TIMEOUT 100 LABEL 3 KERNEL /isolinux/memdisk APPEND initrd=images/dr_image.img TIMEOUT 100 LABEL 4 KERNEL /isolinux/memdisk APPEND initrd=images/part_img.img TIMEOUT 100 LABEL 5 KERNEL /isolinux/memdisk APPEND initrd=images/win_95a.img TIMEOUT 100 LABEL 6 KERNEL /isolinux/memdisk APPEND initrd=images/win_95b.img TIMEOUT 100 LABEL 7 KERNEL /isolinux/memdisk APPEND initrd=images/win_98.img TIMEOUT 100 LABEL 8 KERNEL /isolinux/memdisk APPEND initrd=images/win_98se.img TIMEOUT 100 LABEL 9 KERNEL /isolinux/memdisk APPEND initrd=images/win_me.img TIMEOUT 100
mkisofs -R -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table cd_root > rescuecd.iso
http://syslinux.zytor.com/memdisk.php
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.
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
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
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
W98_ID=$(echo $(ls Boot/*.img | wc -l)) MEMTEST_ID=`expr $W98_ID + 1` svs W98_ID MEMTEST_ID cat <<EOF > isolinux.cfg PROMPT 1 DISPLAY /isolinux/menu.txt DEFAULT $W98_ID TIMEOUT 100 EOF cat !$ ls Boot/*.img | cat -n | awk '{printf "LABEL "$1"\n KERNEL /isolinux/memdisk\n APPEND initrd="$2"\n\n"}' >> !$ cat !$ cat <<EOF >> !$ LABEL $MEMTEST_ID KERNEL /isolinux/memtest.86 EOF cat !$ ls Boot/*.img | cat -n | sed "s/$t/) /; s|Boot/|Boot - |; s/\.img$//" > menu.txt.s printf " $MEMTEST_ID) Launch - Mem Test 86" >> !$ cat !$ cat !$ >> menu.txt es !$
$ cat menu.txt 1) Boot - Norton Ghost (Network) 2) Boot - Tech W0rm 3) Boot - Win98 (se) [*] 4) Launch - Mem Test 86 $ cat isolinux.cfg PROMPT 1 DISPLAY /isolinux/menu.txt DEFAULT 3 TIMEOUT 100 LABEL 1 KERNEL /isolinux/memdisk APPEND initrd=Boot/NGhost.img LABEL 2 KERNEL /isolinux/memdisk APPEND initrd=Boot/TechW0rm.img LABEL 3 KERNEL /isolinux/memdisk APPEND initrd=Boot/Win98se.img LABEL 4 KERNEL /isolinux/memtest.86
MKISOPTS="-r -N -L -d -D -J" TODAY=`date '+%Y-%m-%d'` ISOFILE="../wincombo.iso"
mkisofs $MKISOPTS -f \ -V "W98+Office2k" \ -A "MS Win98 & Office2000 (Created $TODAY)" \ -o $ISOFILE \ -b isolinux/isolinux.bin -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table .
dir $ISOFILE
cdrecord -multi dev=0,0,0 -eject -v speed=8 $ISOFILE
isolinux.bin won't allow tab char in menu.txt. It shows up weirdly.
isolinux.bin only recognize 8.3 file names. So my memtest86 won't boot. Have to sepcify /isolinux/memtest8 to lanuch it. Change memtest86 to memtest.86
Norton Ghost Network don't have CDRom support! So I can't use it to write my CDROM's image to disk.
MKISOPTS="-r -N -L -d -D -J" TODAY=`date '+%Y-%m-%d'` ISOFILE="../wincombo.iso"
mkisofs $MKISOPTS \ -V "W98+Office2k" \ -A "MS Win98, Office2000 & IE6. Created on $TODAY" \ -o $ISOFILE \ -b Boot/TECHW0RM.IMG -c Boot/boot.cat .
dir $ISOFILE
md ~/briefcase/wincombo/isolinux
cp /usr/lib/syslinux/isolinux.bin . cp /usr/lib/syslinux/memdisk .
cat <<EOF > isolinux.cfg PROMPT 1 DISPLAY /isolinux/menu.txt DEFAULT 2 TIMEOUT 100 EOF ls Boot/*.img | cat -n | awk '{printf "LABEL "$1"\n KERNEL /isolinux/memdisk\n APPEND initrd="$2"\n\n"}' >> !$ $ cat !$ PROMPT 1 DISPLAY /isolinux/menu.txt DEFAULT 2 TIMEOUT 100 LABEL 1 KERNEL /isolinux/memdisk APPEND initrd=Boot/TechW0rm.img LABEL 2 KERNEL /isolinux/memdisk APPEND initrd=Boot/win98se.img -- The 'KERNEL' has to appear under every LABEL! ls Boot/*.img | cat -n | sed "s/$t/) /; s|Boot/|Boot |; s/\.img$//" > menu.txt $ cat !$ 1) Boot TechW0rm 2) Boot win98se
$ ls Boot/*.img | cat -n | awk '{printf "LABEL $1\n\tAPPEND initrd=$2\n\n"}' LABEL $1 APPEND initrd=$2 LABEL $1 APPEND initrd=$2
The problem of the following approach is that using 1 or 2 doesn't work when booted.
cat <<EOF > isolinux.cfg PROMPT 1 TIMEOUT 100 KERNEL /isolinux/memdisk DEFAULT win98se EOF for ff in Boot/*.img; do printf "LABEL $(fname $ff)\n\tAPPEND initrd=$ff\n\n"; done >> !$ $ cat !$ PROMPT 1 TIMEOUT 100 KERNEL /isolinux/memdisk DEFAULT win98se LABEL TechW0rm APPEND initrd=Boot/TechW0rm.img LABEL win98se APPEND initrd=Boot/win98se.img
MKISOPTS="-r -N -L -d -D -J" TODAY=`date '+%Y-%m-%d'` ISOFILE="../wincombo.iso" mkisofs $MKISOPTS -f \ -V "W98+Office2k" \ -A "MS Win98, Office2000 & IE6. Created on $TODAY" \ -o $ISOFILE \ -b isolinux/isolinux.bin -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table . dir $ISOFILE
-f Follow symbolic links when generating the filesystem. When this option is not in use, symbolic links will be entered using Rock Ridge if enabled, otherwise the file will be ignored.
cdrecord dev=0,0,0 blank=fast cdrecord -multi dev=0,0,0 -eject -v speed=4 ~/try/wincombo.iso