1# $Id: README.eltorito,v 1.1 2000/10/10 20:40:10 beck Exp $ 2What is El Torito? 3------------------ 4Simply put, El Torito is a specification that says how a cdrom should 5be formatted such that you can directly boot from it. 6 7The "El Torito" spec says that ANY cdrom drive should work (scsi/eide) 8as long as the BIOS supports El Torito. So far this has only been 9tested with EIDE drives because none of the scsi controllers that has 10been tested so far appears to support El Torito. The motherboard 11definately has to support El Torito. The ones that do let you choose 12booting from HD, Floppy, Network or CDROM. 13 14How To Make Bootable CDs 15------------------------ 16 17For the x86 platform, many BIOS's have begun to support bootable CDs. 18The standard my patches for mkisofs is based on is called "El Torito". 19 20The "El Torito" standard works by making the CD drive appear, through BIOS 21calls, to be a normal floppy drive. This way you simply put an floppy 22size image (exactly 1440k for a 1.44 meg floppy) somewhere in the 23iso fs. In the headers of the iso fs you place a pointer to this image. 24The BIOS will then grab this image from the CD and for all purposes it 25acts as if it were booting from the floppy drive. This allows a working 26LILO boot disk, for example, to simply be used as is. 27 28It is simple then to make a bootable CD. First create a file, say "boot.img" 29which is an exact image of the boot floppu currently in use. There is 30at least one HOWTO on making bootable floppies. If you have a bootable 31floppy handy, you can make a boot image with the command 32 33dd if=/dev/fd0 of=boot.img bs=10k count=144 34 35assuming the floppy is in the A: drive. 36 37Place this image somewhere in the hierarchy which will be the source 38for the iso9660 filesystem. It is a good idea to put all boot related 39files in their own directory ("boot/" under the root of the iso9660 fs, 40for example), but this is not necessary. 41 42One caveat - Your boot floppy MUST load any initial ramdisk via LILO, 43not the kernel ramdisk driver! This is because once the linux kernel 44starts up, the BIOS emulation of the CD as a floppy disk is circumvented 45and will fail miserably. LILO will load the initial ramdisk using BIOS 46disk calls, so the emulation works as designed. 47 48The "El Torito" specification requires a "boot catalog" to be created as 49ll. 50This is a 2048 byte file which is of no interest except it is required. 51My patches to mkisofs will cause it to automatically create the 52boot catalog. You must specify where the boot catalog will go in the 53iso9660 filesystem. Usually it is a good idea to put it the same place 54as the boot image, and a name like "boot.catalog" seems appropriate. 55 56 57So we have our boot image in the file "boot.image", and we are going to 58put it in the directory "boot/" under the root of the iso9660 filesystem. 59We will have the boot catalog go in the same directory with the name 60"boot.catalog". The command to create the iso9660 fs in the file 61bootcd.iso is then 62 63mkisofs -b boot/boot.imh -c boot/boot.catalog -o bootcd.iso . 64 65The -b option specifies the boot image to be used (note the path is 66relative to the root of the iso9660 disc), and the -c option is 67for the boot catalog file. 68 69Now burn the CD and its ready to boot! 70 71CAVEATS 72------- 73 74I don't think this will work with multisession CDs. 75 76If your bootable floppy image needs to access the boot floppy, it has 77to do so through BIOS calls. This is because if your O/S tries to talk to 78the floppy directly it will bypass the "floppy emulation" the El Torito spec 79creates through BIOS. For example, under Linux it is possible to 80have an initial RAM disk loaded when the kernel starts up. If you let the 81kernel try to read in the initial RAM disk from floppy, it will fail 82miserably because Linux is not using BIOS calls to access the floppy drive. 83Instead of seeing the floppy image on the CD, Linux will be looking at 84the actually floppy drive. 85 86The solution is to have the initial boot loader, called LILO, load your 87initial RAM disk for you. LILO uses BIOS calls entirely for these 88operations, so it can grab it from the emulated floppy image. 89 90I don't think making a CD bootable renders it unreadable by non-El Torito 91machines. The El Torito spec uses parts of the iso9660 filesystem which 92were reserved for future use, so no existing code should care what it does. 93 94Mkisofs currently stores identification records in the iso9660 filesystem 95saying that the system is a x86 system. The El Torito spec also allows 96one to write PowerPC or Mac id's instead. If you look at the code in write.c 97you could figure out how to change what is written. 98