GPT partition

From LQWiki
Jump to navigation Jump to search

GPT (GUID partition Table) is the hard drive partitioning system that is gradually replacing the venerable MBR system. Unlike MBR, a GPT partition table extends over multiple sectors, allowing a virtually unlimited number of primary partitions to be defined. In addition, GPT can be used for any size disk, whereas MBR is limited to disks up to 2 TB in size.

The GUID (Global Unique ID) is a code assigned to each partition as an identifier, similar to (but distinct from) the UUID assigned to filesystems. It belongs to the partition as such and is stored in the partition table, making it independent of the filesystem and indeed of the machine. This is useful if disks are to be accessed by clusters of servers. The code is 32 bytes long, with the first 16 bytes indicating the type of partition.

The first sector of a GPT label is a dummy MBR known as the protective MBR. It contains a partition table with a single dummy partition covering the whole disk, or the first 2 TB if the disk is larger than that. Its main function is to protect the disk from being overwritten by software which might interpret the lack of an MBR as indicating a empty disk. It also serves as a convenient location for the bootloader when the disk is being booted from a traditional BIOS or from a UEFI working in BIOS/legacy mode.

Subsequent sectors contain the true partition table with GUIDs and initial and final sectors for each partition.

The entire table is reproduced at the end of the drive, acting as a back-up copy in case the working copy becomes corrupted.