GUID Partition Table Unified Extensible Firmware Interface (UEFI) GUID Partition Table (GPT)
Computer Center, CS, NCTU 2 Unified Extensible Firmware Interface BIOS limitations 16-bit processor mode 1MB addressable space UEFI advantages UEFI v2.3.1 in April 2011 Disk device compatibility (GUID Partition Table) Processor compatibility (x86, x64, ARM)
Computer Center, CS, NCTU 3 GUID Partition Table – (1) Limitation of MBR partition table Partition record active(1) 、 first CHS(3) 、 type(1) 、 last CHS(3) 、 start LBA(4) 、 size(4) Maximum capacity ( ) x 512 bytes ~ 2 41 bytes = 2TBytes GPT Maximum capacity: 8ZBytes (2 73 bytes) Used on some BIOS system
Computer Center, CS, NCTU 4 GUID Partition Table – (2) GPT LBA 0: Legacy MBR LBA 1: GPT Header LBA 2~33: Partition Entries 128 partitions LBA 34~: Partitions LBA -34 ~ -1: Secondary GPT data Misaligned block SSD (1K LBA) WD (4K sector)
Computer Center, CS, NCTU 5 GUID Partition Table – (3) Legacy MBR (LBA 0) A single partition of type 0xEE, and of whole disk size (max 2T) For OSes which cannot read GPT: unknown partition, no space For GPT-aware OSes: check the “protective MBR”
Computer Center, CS, NCTU 6 GUID Partition Table – (4) Partition header table (LBA 1) OffsetLengthContents 08 bytesSignature ("EFI PART", ) 84 bytes Revision (For GPT version 1.0 (through at least UEFI version 2.3.1), the value is ) 124 bytesHeader size in little endian (in bytes, usually 5C meaning 92 bytes) 164 bytesCRC32 of header (0 to header size), with this field zeroed during calculation 204 bytesReserved; must be zero 248 bytesCurrent LBA (location of this header copy) 328 bytesBackup LBA (location of the other header copy) 408 bytesFirst usable LBA for partitions (primary partition table last LBA + 1) 488 bytesLast usable LBA (secondary partition table first LBA - 1) 5616 bytesDisk GUID (also referred as UUID on UNIXes) 728 bytesPartition entries starting LBA (always 2 in primary copy) 804 bytesNumber of partition entries 844 bytesSize of a partition entry (usually 128) 884 bytesCRC32 of partition array 92*Reserved; must be zeroes for the rest of the block (420 bytes for a 512-byte LBA)
Computer Center, CS, NCTU 7 GUID Partition Table – (5) Partition header table (LBA 1) # dd if=/dev/ada0 bs=512 count=1 skip=1 | hd c |EFI PART....\...| e6 f |..' | f a |/`8:...." | e a f a b4 de 11 |.`8: F...| e b |...!.."t | e0 9d 1a | R....| | | *
Computer Center, CS, NCTU 8 GUID Partition Table – (6) Partition entries (LBA 2~33) 128 bytes for each partition entry OffsetLengthContents 016 bytesPartition type GUID 1616 bytesUnique partition GUID 328 bytesFirst LBA (little-endian) 408 bytesLast LBA (inclusive, usually odd) 488 bytesAttribute flags (e.g. bit 60 denotes read-only) 5672 bytesPartition name (36 UTF-16LE code units) 128Total
Computer Center, CS, NCTU 9 GUID Partition Table – (7) Partition type GUID freebsd-boot83BD6B9D-7F41-11DC-BE0B B84F0F freebsd516E7CB4-6ECF-11D6-8FF D09712B freebsd-swap516E7CB5-6ECF-11D6-8FF D09712B freebsd-ufs516E7CB6-6ECF-11D6-8FF D09712B freebsd-vinum516E7CB8-6ECF-11D6-8FF D09712B freebsd-zfs516E7CBA-6ECF-11D6-8FF D09712B