GPT disk / GPT partition
A GPT disk is a disk containing a GPT partition table.
The GPT table is stored in the 33 sectors immediately following the MBR (LBA 1 to 33).
Additionally a backup of the GPT table is stored at the end of the disk.
To prevent an unintentional overwriting of GPT partitions by MBR partition managers
the whole disk space (except for the MBR) is marked as occupied by the so-called GPT protective partition.
Since the MBR table contains only 32 bit sector numbers the GPT protective partition is limited
to a size of 2 TiB.
The following table summarizes the main differences between MBR and GPT partitions.
Parameter |
MBR |
GPT |
Sector numbers |
32 bit |
64 bit |
Max. disk size |
2 TiB |
8 x 1012 TiB |
Partition ID |
ID with 8 bit |
GUID with 128 bit |
Partitions per disk |
4 pri. |
128 |
Checksum |
no |
yes |
The GPT tables contain the following data:
------------------------------------------------------
GPT header (length 512 bytes)
------------------------------------------------------
Offset Bytes Meaning
00h 8 signature ("EFI PART")
08h 4 revision
0Ch 4 header size
10h 4 crc32 of header
14h 4 reserved
18h 8 LBA of current header
20h 8 LBA of backup header
28h 8 first LBA for partitions
30h 8 last LBA for partitions
38h 16 unique disk GUID
48h 8 partition entries start LBA
50h 4 number of partition entries
54h 4 size of a partition entry
58h 4 crc32 of partition entries
5Ch 420 reserved
-----------------------------------------------------
------------------------------------------------------
GPT partition entry (length 128 bytes)
------------------------------------------------------
Offset Bytes Meaning
00h 16 partition type GUID
10h 16 unique partition GUID
20h 8 first LBA of partition
28h 8 last LBA of partition
30h 8 attributes
38h 72 name of partition (36 unicode characters)
-----------------------------------------------------
The GPT header contains the unique disk GUID and each GPT partition entry contains a unique partition GUID.
When you create a new GPT disk with GPT partitions these unique GUIDs will be different from already existing ones.
This means that the unique disk GUID can be used to unambiguously identify the GPT disk,
and the unique partition GUID can be used to unambiguously identify the GPT partition.
The drawing below shows the main elements of a GPT disk: MBR with reference to GPT protective partition, primary and backup GPT table with references to GPT partitions.
|