From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:GPT partition table" |
|---|
| claim | "The GPT header is signature EFI PART, revision, header_size (92 usual), header_crc32, reserved, my_lba, alternate_lba, first/last usable LBA, disk GUID, partition_entries_lba, entry count, entry size (128) and entry-array CRC32; libblkid validates both CRCs, my_lba and entry size 128 and falls back to the header in the last LBA." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:GPT partition table" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "gpt_header" |
|---|
| size | "0x5c" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "signature" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "revision" |
|---|
|
| offset | "0xc" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "header_size" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "header_crc32" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "reserved1" |
|---|
|
| offset | "0x18" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "my_lba" |
|---|
|
| offset | "0x20" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "alternate_lba" |
|---|
|
| offset | "0x28" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "first_usable_lba" |
|---|
|
| offset | "0x30" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "last_usable_lba" |
|---|
|
| offset | "0x38" |
|---|
| size | 16 |
|---|
| type | "efi_guid_t" |
|---|
| name | "disk_guid" |
|---|
|
| offset | "0x48" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "partition_entries_lba" |
|---|
|
| offset | "0x50" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "num_partition_entries" |
|---|
|
| offset | "0x54" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "sizeof_partition_entry" |
|---|
|
| offset | "0x58" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "partition_entry_array_crc32" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct gpt_header and get_gpt_header() validation; offsets computed from field order" |
|---|
| repo | "util-linux/util-linux" |
|---|
| commit | "d427f58b7a22b960ccc8d02ce30c58bdbe4286d8" |
|---|
| path | "libblkid/src/partitions/gpt.c" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "GPT header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T06:03:50.687Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:51:54.102Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read struct gpt_header and get_gpt_header in util-linux d427f58b7a22 libblkid/src/partitions/gpt.c: field order and sizes give 0x5C; checks signature, header_size between 92 and the sector size, header CRC over header_size bytes with the CRC field zeroed, my_lba equal to the LBA read, entry size equal to sizeof(gpt_entry) (128), entry array CRC; probe retries at the last LBA." |
|---|
|
|
|---|