Reputation: 179
Can anyone explains how CD/DVD Boot Sector works to me? I've extracted some boot sectors from ISO images and found out that some of them are 6 sectors long and some are 8. I tried to look it up but no results. What is the minimum(maximum) length of a CD/DVD boot sector? Does it have to end with 0x55 0xAA?
Upvotes: 3
Views: 3178
Reputation: 937
Bootable ISO 9660 images are very different from other media such as floppies and hard drives. In the latter case, the BIOS loads a single, 512-byte sector, verifies the final 55 AA bytes, and then jumps to what it loaded.
El Torito, the extension that defines bootable ISO 9660 images for PCs, supports various methods of booting. Four of the methods emulate floppy (1.2M, 1.44M, 2.88M) and hard disk boot sectors; the BIOS will map the first floppy or hard disk to the CD-ROM so that you can take bootable floppies or small, bootable hard disks and convert them to ISO images. The last method is called native booting. Native boot sectors can be anywhere from 1-65535 sectors in length, or up to 32 MiB. Native boot sectors do not have to end in 55 AA.
ISO 9660 native sectors are almost always 2048 bytes, so native boot sectors will usually be 4 sectors long (512 * 4 == 2048).
You can find more info including a link to the El Torito standard here:
http://wiki.osdev.org/ISO_9660
http://wiki.osdev.org/El-Torito
https://en.wikipedia.org/wiki/El_Torito_(CD-ROM_standard)
Also, this document shows the binary structure of El Torito:
http://fossies.org/linux/xorriso/doc/boot_sectors.txt
Upvotes: 5