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