A bootable CD, DVD or ISO image follows the El Torito Bootable CD-ROM Format Specification (Phoenix Technologies and IBM, version 1.0, 1995). It adds a boot record to the volume descriptors, which points to a boot catalogue: a list of boot images, each either a floppy or hard disk image for the firmware to emulate, or a program to load as it is (“no emulation”). All numbers are little-endian.
Boot record
A volume descriptor of type 0, usually at sector 17, straight after the primary descriptor.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
0x00 | 1 | uint8 | Boot record indicator | 0. |
0x01 | 5 | text | ISO 9660 identifier | CD001. |
0x06 | 1 | uint8 | Version | 1. |
0x07 | 32 | text | Boot system identifier | EL TORITO SPECIFICATION, padded with zeros. |
0x27 | 32 | – | Unused | Zeros. |
0x47 | 4 | uint32 | Boot catalogue pointer | The sector number of the first sector of the boot catalogue. |
0x4B | 1973 | – | Unused | Zeros. |
Boot catalogue
The catalogue is a list of 32-byte entries: a validation entry, an initial/default entry, then any number of sections, each a section header followed by its section entries (and their extensions).
0x00Validation entry header ID 1, platform, checksum,55 AA320x20Initial/default entry the image any BIOS boots320x40Section header then its section entries, repeated per section32 each
Validation entry
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
0x00 | 1 | uint8 | Header ID | 1. |
0x01 | 1 | uint8 | Platform ID | See platforms. |
0x02 | 2 | – | Reserved | 0. |
0x04 | 24 | text | ID string | The maker or developer of the disc. |
0x1C | 2 | uint16 | Checksum | Chosen so that the sum of all sixteen 16-bit words of the entry is 0. |
0x1E | 1 | uint8 | Key byte | 55. |
0x1F | 1 | uint8 | Key byte | AA. Both key bytes count in the checksum. |
Initial/default entry
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
0x00 | 1 | uint8 | Boot indicator | 88 bootable, 00 not bootable. |
0x01 | 1 | uint8 | Boot media type | Bits 0–3: see media types. Bits 4–7: 0. |
0x02 | 2 | uint16 | Load segment | The x86 segment to load the image at; 0 means the traditional 0x07C0. On flat-memory systems, the address divided by 16. |
0x04 | 1 | uint8 | System type | A copy of the partition type byte from the partition table inside a hard disk image. |
0x05 | 1 | – | Unused | 0. |
0x06 | 2 | uint16 | Sector count | How many 512-byte virtual sectors to load at the start. |
0x08 | 4 | uint32 | Load RBA | The 2,048-byte sector where the image starts. |
0x0C | 20 | – | Unused | 0. |
Section header
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
0x00 | 1 | uint8 | Header indicator | 90 more headers follow; 91 this is the last header. |
0x01 | 1 | uint8 | Platform ID | See platforms. |
0x02 | 2 | uint16 | Number of section entries | Entries that follow this header. |
0x04 | 28 | text | ID string | Identifies the section; a BIOS that recognises it may boot from it instead of the default entry. |
Section entry
Like the default entry, with selection criteria in the unused bytes.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
0x00 | 1 | uint8 | Boot indicator | 88 bootable, 00 not bootable. |
0x01 | 1 | bits | Boot media type | Bits 0–3 the media type; bit 4 reserved, 0; bit 5 a section entry extension follows; bit 6 the image contains an ATAPI driver; bit 7 the image contains SCSI drivers. |
0x02 | 2 | uint16 | Load segment | As in the default entry. |
0x04 | 1 | uint8 | System type | As in the default entry. |
0x05 | 1 | – | Unused | 0. |
0x06 | 2 | uint16 | Sector count | As in the default entry. |
0x08 | 4 | uint32 | Load RBA | As in the default entry. |
0x0C | 1 | uint8 | Selection criteria type | 0 none; 1 language and version information (IBM); 2–255 reserved. |
0x0D | 19 | bytes | Selection criteria | Vendor-specific. |
Section entry extension
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
0x00 | 1 | uint8 | Extension indicator | 44. |
0x01 | 1 | bits | Flags | Bit 5: another extension follows. Other bits unused. |
0x02 | 30 | bytes | Selection criteria | More vendor-specific criteria. |
Platforms and media types
| Platform ID | Platform |
|---|---|
00 | 80x86 (BIOS) |
01 | PowerPC |
02 | Mac |
EF | EFI (UEFI) – not in El Torito 1.0. UEFI 2.10 section 13.3.2.1: a Platform ID of
| Media type | Image |
|---|---|
| 0 | No emulation: the image is loaded and run as it is |
| 1 | 1.2 MB floppy |
| 2 | 1.44 MB floppy |
| 3 | 2.88 MB floppy |
| 4 | Hard disk (becomes drive 80h) |
| 5–15 | Reserved |
In no-emulation mode the firmware loads sector count 512-byte sectors from the load RBA; the image can then read the disc in 2,048-byte sectors through the BIOS extended disk functions.
Boot images and drive numbers
The sections below paraphrase El Torito 1.0 sections 3 to 6. The specification writes its numbers in hexadecimal without a prefix (“800 bytes” is 2,048), which is why a disc sector is 2,048 bytes and a virtual sector 512, four to a disc sector.
- The image is an exact copy of the floppy or hard disk to emulate, made by reading it as logical blocks from LBA 0 (cylinder 0, head 0, sector 1) up, with LBA = ((cylinder × heads) + head) × sectors per track + sector − 1, and stored as an ordinary file on the disc. The BIOS makes up a geometry for the virtual disk and turns the CHS addresses it receives back into LBAs, offset by the load RBA. The INT 41 pointer is not valid.
- Floppy geometry (tracks × heads × sectors, as the specification writes them in hex): 1.44 MB 0x50 × 2 × 0x12 (80 × 2 × 18); 2.88 MB 0x50 × 2 × 0x24 (80 × 2 × 36); 1.2 MB 0x50 × 2 × 0x0F (80 × 2 × 15). A hard disk image uses a geometry that fits the partition table in its first sector, which may hold only one partition, as the first entry.
- Bootable or not. The image boots only if the entry’s boot indicator is
88; anything else makes the BIOS try the next boot device, and the CD then becomes the last drive. - Drive numbers. Floppy image: the CD becomes drive 00, the old drive 00 becomes 01, other drives stay. Hard disk image: every drive 80 and up moves up by one and the CD becomes 80. No emulation: no drive number changes; the sectors are loaded at the load segment (usually 7C0) and the BIOS jumps to segment:0, and the program finds its boot information with INT 13 function 4B, AL = 1. The specification allows loading up to 0xFFFF sectors. After a no-emulation boot, INT 13 extension functions 41 to 48 read the CD in 2,048-byte sectors with absolute sector numbers.
- Selection. A disc with several boot entries may have a default entry, usually a floppy image, whose program picks a section entry by looking at the machine or asking the user, then reboots with it (function 4C).
- INT 13 function 08 returns the geometry from the catalogue entry; function 48 gives drive information, in which byte 10 bit 6 of the Phoenix Enhanced Disk Drive table is set when the device is a CD-ROM.
New INT 13 functions
| Function | Name | Registers and effect |
|---|---|---|
4A | Initiate disk emulation | AH = 4A, AL = 0, DS:SI = specification packet. Makes the drive available using the packet’s image LBA. Carry clear if emulating. |
4B | Terminate disk emulation | AH = 4B; AL = 0 return status and end emulation, AL = 1 return status only; DL = drive to end (7F for all); DS:SI = an empty specification packet, returned filled in. Carry set if the system is not emulating. Ending emulation restores the normal drive letters. |
4C | Initiate emulation and boot | AH = 4C, AL = 0, DS:SI = specification packet. Reboots from the packet’s image; returns (carry set) only if the packet does not point to a bootable image. |
4D | Return boot catalogue | AH = 4D, AL = 0, DS:SI = command packet. Copies sectors of the catalogue to the packet’s buffer. Carry set if the device is not an emulated CD or the packet is out of bounds. |
| Offset | Size | Command packet (function 4D) |
|---|---|---|
0 | 1 | Packet size: 8 |
1 | 1 | Number of catalogue sectors to transfer |
2 | 4 | Pointer to the buffer for the catalogue |
6 | 2 | First sector to transfer, relative to the start of the catalogue (0 on the first call) |
| Offset | Size | Specification packet (functions 4A, 4B, 4C) |
|---|---|---|
0x00 | 1 | Packet size: 0x13 (19) |
0x01 | 1 | Boot media type: bits 0–3 as in the media types; bits 4–5 zero; bit 6 the image contains an ATAPI driver (bytes 8–9 refer to the IDE interface); bit 7 SCSI drivers (bytes 8–9 refer to the SCSI interface) |
0x02 | 1 | Drive number: 0 for a floppy image, 80 for a bootable hard disk, 81–FF for a non-bootable or no-emulation drive |
0x03 | 1 | Controller index of the CD drive |
0x04 | 4 | Logical block address of the image to emulate |
0x08 | 2 | Device specification: SCSI, byte 8 the LUN and PUN and byte 9 the bus number; IDE, the low bit of byte 8 is 0 for master |
0x0A | 2 | User buffer segment: if not 0, the segment of a 3 KB buffer (at segment:0) for caching CD reads |
0x0C | 2 | Load segment (function 4C only); 0 means 7C0 |
0x0E | 2 | Sector count of virtual sectors to load at the load segment (function 4C only) |
0x10 | 1 | Low 8 bits of the cylinder count, as function 08 returns in CH |
0x11 | 1 | As function 08 returns in CL: bits 0–5 sectors, bits 6–7 the high 2 bits of the cylinder count |
0x12 | 1 | Head count, as function 08 returns in DH |
The specification’s own byte offsets for the packets are written in hexadecimal, as above. Return codes in AX are not listed in the text read.