GPT is the partition table of the UEFI specification, with 128-bit partition GUIDs, 64-bit sector addresses and a backup table at the end of the disk. It is the default for modern Windows, macOS and Linux disks of any size, and carries a protective MBR for older tools.
Overview
A GPT disk begins with a protective MBR, followed at LBA 1 by a header (signature EFI PART, revision, header CRC-32, disk GUID, partition array location, entry count and size, array CRC-32). A partition array (normally 128 entries of 128 bytes) follows, with type GUID, unique GUID, first and last LBA, attributes and a UTF-16 name. A backup header and array sit at the end of the disk.
History
Defined as part of the EFI specification by Intel in the late 1990s and standardized in UEFI.
Windows added GPT boot support with Vista x64 and Server 2008.
Structures
Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.
Read Entries
Offset
Size
Type
Field
Notes
0x10
16
bytes
–
0x20
8
u64 LE
First
0x28
8
u64 LE
Last
0x30
8
u64 LE
–
0x38
72
bytes
Name
Read Header
Offset
Size
Type
Field
Notes
0x0
8
bytes
–
0xC
4
u32 LE
Header Size
0x10
4
u32 LE
Stored Crc
0x18
8
u64 LE
–
0x20
8
u64 LE
–
0x28
8
u64 LE
–
0x30
8
u64 LE
–
0x38
16
bytes
–
0x48
8
u64 LE
–
0x50
4
u32 LE
–
0x54
4
u32 LE
–
0x58
4
u32 LE
–
Other fields read
Read in
Offset
Size
Type
Field
Notes
Read Header
0x10
4
bytes
–
Constants
Gpt Module
Name
Value
Type
Notes
AttributeLegacyBootable
1UL << 2
ulong
Crc32
Name
Value
Type
Notes
Table
BuildTable()
uint[]
Implementation limits
Class
Name
Value
Notes
Gpt Module
MaxEntries
4096
Signatures and magic strings referenced
Text
Where checked
EFI PART
Read Header
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.