GUID Partition Table

• Unified Extensible Firmware Interface (UEFI) • GUID Partition Table (GPT)

bit processor mode processor bit -

2011 April in v2.3.1UEFI Table) (GUIDPartition compatibility device Disk ARM) x64, (, compatibility Processor 16 space addressable 1MB

• • • • • UEFI UEFI advantages BIOS limitations

  Unified Unified Extensible Firmware Interface

Computer Center, CS, NCTU 2

size(4) 、 start LBA(4) 、

last CHS(3) last 、 ) (1)

73 –

type(1) bytes = 2TBytesbytes

、 41

first CHS(3) first 、 1) x 512 bytes ~ 2 1) x 512 bytes~ - 32 active(1) (2

  Maximum capacity: 8ZBytes (2 8ZBytes capacity: Maximum system BIOS some on Used Partition record Partition capacity Maximum

• • • • GPT Limitation of MBR partition table partitionof MBR Limitation

  GUID Partition GUID Table

Computer Center, CS, NCTU 3

(2)

GPT data GPT 1: Secondary 1: - 34 ~ 34 - 128 partitions128

 WD (4K sector) (4KWD LBA LBA) (1KSSD LBA 0: Legacy MBR Legacy 0:LBA Header GPT LBA 1: Entries Partition LBA 2~33: Partitions 34~: LBA

• • • • • • • Misaligned block Misaligned GPT

  GUID Partition GUID Table

Computer Center, CS, NCTU 4

(3)

aware OSes: check the “protective MBR” “protective the check OSes: aware - A single partition of type 0xEE, and of whole disk size (max 2T) (max size disk whole of and 0xEE, type of partition single A space no partition, unknownGPT: read cannot which OSes For GPT For

• • •

Legacy MBR MBR (LBA 0) Legacy

 GUID Partition GUID Table

Computer Center, CS, NCTU 5

byte LBA) -

meaning meaning 92 bytes)

1)

-

)

5C 00 005C 00

UNIXes

Contents (4) on

– UUID

(in bytes, usually

", 45", 4620 49 5052 41 54) zero forpartitions 1) + (primary partition table last LBA little endian

(location this of header copy) (location the ofother header copy)

EFI EFI PART LBA (secondary partition table first LBA LBA ) of header (0 to header size), with this field zeroed during calculation

Size a ofpartition entry (usually 128) ofCRC32 partition array Reserved; must be zeroes forthe rest of the block (420 bytes for a 512 Current Current LBA Backup LBA First usable LBA Last usable Disk GUID (also referred as Partition(always 2in entries primary startingcopy) LBA Number of partition entries Signature (" Revision version (For 1.0 (throughGPT at least UEFI version 2.3.1), the value is 000100 00 Header size in CRC32 Reserved; must be

* bytes

8 bytes 4 bytes 4 bytes 4 bytes 8 bytes 8 bytes 4 bytes 4 bytes 8 bytes 8 bytes 4 bytes 4 bytes 8 bytes

Length 16

Partition header table (LBA (LBA 1) tableheader Partition

8 0 92 72 80 84 88 40 48 56 16 20 24 32 12  GUID Partition GUID Table Offset

Computer Center, CS, NCTU 6

...| \

(5)

hd – =512 count=1 skip=1 | skip=1 | =512 count=1 bs /ada0

dev

if=/

Partition header table (LBA (LBA 1) tableheader Partition

dd

 GUID Partition GUID Table * 00000200 00000030 0e 60 38 3a 00 00 00 00 7f a3 90 90 46 b4 de 11 |.`8:...... F...| b4 0e 60 38 3a 00 00 00 00 7f a3 90 00000030 de 11 46 90 00 00 00 00 00 |...!.."t...... |8e b8 00 21 85 12 22 74 02 00 00 00000040 00 00 00 00 |...... R....|1a 52 00 00 80 e0 9d 00 00 80 00 00000050 00 |...... |00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000060 00 # PART.... 00 |EFI 00 00 00 5c 00 01 46 52 00 50 49 54 41 45 20 00000000 00 |..'...... |00 00 00 01 00 00 00 00 00 96 f0 00 e6 00 00000010 27 00000020 2f 60 38 00 00 3a 00 00 00 22 00 00 00 00 00 00 |/`8:...."...... |

Computer Center, CS, NCTU 7

only) -

codeunits)

16LE

-

(6) UTF

Contents

endian) - –

(36 Total GUID (little (inclusive, usually odd) usually(inclusive, Partition name Partition Partition typePartition GUID partition Unique LBA First LastLBA 60 denotes(e.g.readflags bitAttribute

8 bytes8 bytes8 bytes8 Length 72 bytes72 16 bytes16 bytes16

0

32 40 48 56 16 128 128 bytes for each partition entry partition each for bytes 128

Offset •

Partition entries (LBA 2~33) (LBA entries Partition

 GUID Partition GUID Table

Computer Center, CS, NCTU 8

001560B84F0F - 00022D09712B 00022D09712B 00022D09712B 00022D09712B 00022D09712B - - - - - 8FF8 BE0B

8FF8 8FF8 8FF8 8FF8 ------(7)

11D6 11DC 11D6 11D6 11D6 11D6 ------– 7F41 6ECF - 6ECF 6ECF 6ECF 6ECF - - - - -

516E7CB6 516E7CB8 516E7CBA 83BD6B9D 516E7CB4 516E7CB5

ufs vinum boot swap - - - - -

Partition type GUID Partition

freebsd freebsd freebsd freebsd freebsd  GUID Partition GUID Table

Computer Center, CS, NCTU 9