1 GPT boot protocol 2 3There are two ways to boot a GPT-formatted disk on a BIOS system. 4Hybrid booting, and the new GPT-only booting protocol originally 5proposed by the author, and later adopted by the T13 committee in 6slightly modified form. 7 8 9 *** Hybrid booting *** 10 11Hybrid booting uses a standard MBR, and has bootable ("active") 12partitions present, as partitions, in the GPT PMBR sector. This means 13the PMBR, instead of containing only one "protective" partition (type 14EE), may contain up to three partitions: a protective partition (EE) 15*before* the active partition, the active partition, and a protective 16partition (EE) *after* the active partition. The active partition is 17limited to the first 2^32 sectors (2 TB) of the disk. 18 19All partitions, including the active partition, should have GPT 20partition entries. Thus, changing which partition is active does NOT 21change the GPT partition table. 22 23This is the only known way to boot Microsoft operating systems from a 24GPT disk with BIOS firmware. 25 26 27 *** New protocol *** 28 29This defines the T13-approved protocol for GPT partitions with BIOS 30firmware. It maintains backwards compatibility to the extent 31possible. It is implemented by the file mbr/gptmbr.bin. 32 33The (P)MBR format is the normal PMBR specified in the UEFI 34documentation, with the first 440 bytes used for the boot code. The 35partition to be booted is marked by setting bit 2 in the GPT Partition 36Entry Attributes field (offset 48); this bit is reserved by the UEFI 37Forum for "Legacy BIOS Bootable". 38 39 40 -> The handover protocol 41 42The PMBR boot code loads the first sector of the bootable partition, 43and passes in DL=<disk number>, ES:DI=<pointer to $PnP>, sets EAX to 440x54504721 ("!GPT") and points DS:SI to a structure of the following 45form: 46 47 Offset Size Contents 48 --------------------------------------------------------- 49 0 1 0x80 (this is a bootable partition) 50 1 3 CHS of partition (using INT 13h geometry) 51 4 1 0xED (partition type: synthetic) 52 5 3 CHS of partition end 53 8 4 Partition start LBA 54 12 4 Partition length in sectors 55 16 4 Length of the GPT entry 56 20 varies GPT partition entry 57 58The CHS information is optional; gptmbr.bin currently does *NOT* 59calculate them, and just leaves them as zero. 60 61Bytes 0-15 matches the standard MBR handover (DS:SI points to the 62partition entry), except that the information is provided 63synthetically. The MBR-compatible fields are directly usable if they 64are < 2 TB, otherwise these fields should contain 0xFFFFFFFF and the 65OS will need to understand the GPT partition entry which follows the 66MBR one. The "!GPT" magic number in EAX and the 0xED partition type 67also informs the OS that the GPT partition information is present. 68 69Syslinux 4.00 and later fully implements this protocol. 70