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