GPT (GUID Partition Table)

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

OffsetSizeTypeFieldNotes
0x1016bytes–
0x208u64 LEFirst
0x288u64 LELast
0x308u64 LE–
0x3872bytesName

Read Header

OffsetSizeTypeFieldNotes
0x08bytes–
0xC4u32 LEHeader Size
0x104u32 LEStored Crc
0x188u64 LE–
0x208u64 LE–
0x288u64 LE–
0x308u64 LE–
0x3816bytes–
0x488u64 LE–
0x504u32 LE–
0x544u32 LE–
0x584u32 LE–

Other fields read

Read inOffsetSizeTypeFieldNotes
Read Header0x104bytes–

Constants

Gpt Module

NameValueTypeNotes
AttributeLegacyBootable1UL << 2ulong

Crc32

NameValueTypeNotes
TableBuildTable()uint[]

Implementation limits

ClassNameValueNotes
Gpt ModuleMaxEntries4096

Signatures and magic strings referenced

TextWhere checked
EFI PARTRead Header
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.