wire / wire-format / gpt-partition-table
GPT is the modern partition scheme. Layout: protective MBR (LBA 0), primary GPT header (LBA 1), partition entries (LBA 2-33, 128 entries × 128 bytes), data partitions, secondary partition entries, secondary GPT header (last LBA). GPT header: signature 'EFI PART' (8 bytes), revision (4), header size (4), CRC32 (4), reserved (4), current LBA (8), backup LBA (8), first usable LBA (8), last usable LBA (8), disk GUID (16), partition entries start LBA (8), number of entries (4), size of entry (4), CRC32 of entries (4).
aka: GPT (GUID Partition Table)
spec: UEFI specification
GPT is the modern partition scheme. Layout: protective MBR (LBA 0), primary GPT header (LBA 1), partition entries (LBA 2-33, 128 entries × 128 bytes), data partitions, secondary partition entries, secondary GPT header (last LBA). GPT header: signature 'EFI PART' (8 bytes), revision (4), header size (4), CRC32 (4), reserved (4), current LBA (8), backup LBA (8), first usable LBA (8), last usable LBA (8), disk GUID (16), partition entries start LBA (8), number of entries (4), size of entry (4), CRC32 of entries (4).
| field | size | meaning |
|---|---|---|
| Protective MBR | 512 bytes (LBA 0) | Legacy MBR with one partition of type 0xEE (GPT protective). Prevents old tools from misinterpreting the disk. |
| GPT header signature | 8 bytes | 'EFI PART' (0x45 0x46 0x49 0x20 0x50 0x41 0x52 0x54). |
| Revision | 4 bytes | 0x00010000 (version 1.0). |
| Header size | 4 bytes | 92 (0x5C). |
| CRC32 (header) | 4 bytes | CRC32 of the header (with this field zeroed during computation). |
| Current LBA | 8 bytes | LBA of this header. |
| Backup LBA | 8 bytes | LBA of the backup (secondary) header. |
| First usable LBA | 8 bytes | First LBA available for partitions. |
| Last usable LBA | 8 bytes | Last LBA available for partitions. |
| Disk GUID | 16 bytes | Unique identifier for the disk. |
| Partition entries start | 8 bytes | LBA of the partition entry array. |
| Number of entries | 4 bytes | Number of partition entries (default 128). |
| Size of entry | 4 bytes | Size of each partition entry (default 128 bytes). |
| CRC32 (entries) | 4 bytes | CRC32 of the partition entry array. |
| Partition entry | 128 bytes | Type GUID (16), unique GUID (16), first LBA (8), last LBA (8), attributes (8), name (72 bytes, UTF-16LE). |
example:
45 46 49 20 50 41 52 54
GPT header signature: 'EFI PART'
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/gpt-partition-table
or /wire-format/gpt-partition-table.json