Top Qs
Timeline
Chat
Perspective

GUID Partition Table

Computer disk partitioning standard From Wikipedia, the free encyclopedia

GUID Partition Table
Remove ads
Remove ads

The GUID Partition Table (GPT) is a standard for the layout of partition tables of a physical computer storage device, such as a hard disk drive or solid-state drive. It is part of the Unified Extensible Firmware Interface (UEFI) standard.

Thumb
The layout of a disk with the GUID Partition Table. In this example, each logical block is 512 bytes in size and each entry has 128 bytes. The corresponding partition entries are assumed to be located in LBA 2–33. Negative LBA addresses indicate a position from the end of the volume, with −1 being the last addressable block.

It has several advantages over master boot record (MBR) partition tables, such as support for more than four primary partitions and 64-bit rather than 32-bit logical block addresses (LBA) for blocks on a storage device. The larger LBA size supports larger disks.

Some BIOSes support GPT partition tables as well as MBR partition tables, in order to support larger disks than MBR partition tables can support.

GPT uses universally unique identifiers (UUIDs), which are also known as globally unique identifiers (GUIDs), to identify partitions and partition types.

All modern personal computer operating systems support GPT. Some, including macOS and Microsoft Windows on the x86 architecture, support booting from GPT partitions only on systems with EFI firmware, but FreeBSD and most Linux distributions can boot from GPT partitions on systems with either the BIOS or the EFI firmware interface.

Remove ads

History

Summarize
Perspective

The Master Boot Record (MBR) partitioning scheme, widely used since the early 1980s, had limitations when it came to modern hardware. The available size for block addresses and related information is limited to 32 bits. For hard disks with 512byte sectors, the MBR partition table entries allow a maximum size of 2 TiB (2³² × 512bytes) or 2.20 TB (2.20 × 10¹² bytes).[1]

In the late 1990s, Intel developed a new partition table format as part of what eventually became the Unified Extensible Firmware Interface (UEFI). The GUID Partition Table is specified in chapter 5 of the UEFI 2.11 specification.[2]:111 GPT uses 64 bits for logical block addresses, allowing a maximum disk size of 264 sectors. For disks with 512byte sectors, the maximum size is 8 ZiB (264 × 512bytes) or 9.44 ZB (9.44 × 10²¹ bytes).[1] For disks with 4,096byte sectors the maximum size is 64 ZiB (264 × 4,096bytes) or 75.6 ZB (75.6 × 10²¹ bytes).

In 2010, hard-disk manufacturers introduced drives with 4,096byte sectors (Advanced Format).[3] For compatibility with legacy hardware and software, those drives include an emulation technology (512e) that presents 512byte sectors to the entity accessing the hard drive, despite their underlying 4,096byte physical sectors.[4] Performance could be degraded on write operations, when the drive is forced to perform two read-modify-write operations to satisfy a single misaligned 4,096byte write operation.[4] Since April 2014, enterprise-class drives without emulation technology (4K native) have been available on the market.[5][6]

Readiness of the support for 4 KB logical sectors within operating systems differs among their types, vendors and versions.[7] For example, Microsoft Windows supports 4K native drives since Windows 8 and Windows Server 2012 (both released in 2012) in UEFI.[8]

Remove ads

Features

Summarize
Perspective

Like MBR, GPT uses logical block addressing (LBA) in place of the historical cylinder-head-sector (CHS) addressing. The protective MBR is stored at LBA 0, and the GPT header is in LBA 1. The GPT header has a pointer to the partition table (Partition Entry Array), which is typically at LBA 2. Each entry in the partition table has the same size, which is 128 or 256 or 512, etc., bytes; typically this size is 128 bytes. The UEFI specification stipulates that a minimum of 16,384 bytes, regardless of sector size, are allocated for the Partition Entry Array. Thus, on a disk with 512-byte sectors, at least 32 sectors are used for the Partition Entry Array, and the first usable block is at LBA 34 or higher, while on a 4,096-byte sector disk, at least 4 sectors are used for the Partition Entry Array, and the first usable block is at LBA 6 or higher. In addition to the primary GPT header and Partition Entry Array, stored at the beginning of the disk, there is a backup GPT header and Partition Entry Array, stored at the end of the disk. The backup GPT header must be at the last block on the disk (LBA -1) and the backup Partition Entry Array is placed between the end of the last partition and the last block.[2]:pp. 115-120, §5.3

Remove ads

MBR variants

Summarize
Perspective

Protective MBR (LBA 0)

For limited backward compatibility, the space of the legacy Master Boot Record (MBR) is still reserved in the GPT specification, but it is now used in a way that prevents MBR-based disk utilities from misrecognizing and possibly overwriting GPT disks. This is referred to as a protective MBR.[9]

A single partition of type EEh, encompassing the entire GPT drive (where "entire" actually means as much of the drive as can be represented in an MBR), is indicated and identifies it as GPT. Operating systems and tools which cannot read GPT disks will generally recognize the disk as containing one partition of unknown type and no empty space, and will typically refuse to modify the disk unless the user explicitly requests and confirms the deletion of this partition. This minimizes accidental erasures.[9] Furthermore, GPT-aware OSes may check the protective MBR and if the enclosed partition type is not of type EEh or if there are multiple partitions defined on the target device, the OS may refuse to manipulate the partition table.[10]

If the actual size of the disk exceeds the maximum partition size representable using the legacy 32-bit LBA entries in the MBR partition table, the recorded size of this partition is clipped at the maximum, thereby ignoring the rest of the disk. This amounts to a maximum reported size of 2 TiB, assuming a disk with 512 bytes per sector (see 512e). It would result in 16 TiB with 4 KiB sectors (4Kn), but since many older operating systems and tools are hard coded for a sector size of 512 bytes or are limited to 32-bit calculations, exceeding the 2 TiB limit could cause compatibility problems.[9]

Hybrid MBR (LBA 0 + GPT)

In operating systems that support GPT-based boot through BIOS services rather than EFI, the first sector may also still be used to store the first stage of the bootloader code, but modified to recognize GPT partitions. The bootloader in the MBR must not assume a sector size of 512 bytes.[9]

Remove ads

Partition table header (LBA 1)

Summarize
Perspective
More information Offset, Length ...

The partition table header defines the usable blocks on the disk. It also defines the number and size of the partition entries that make up the partition table (offsets 80 and 84 in the table).[2]:117-118

Remove ads

Partition entries (LBA 2–33)

Summarize
Perspective
More information Offset, Length ...

After the primary header and before the backup header, the Partition Entry Array describes partitions, using a minimum size of 128 bytes for each entry block.[13] The starting location of the array on disk, and the size of each entry, are given in the GPT header. The first 16 bytes of each entry designate the partition type's globally unique identifier (GUID). For example, the GUID for an EFI system partition is C12A7328-F81F-11D2-BA4B-00A0C93EC93B. The second 16 bytes are a GUID unique to the partition. Then follow the starting and ending 64 bit LBAs, partition attributes, and the 36 character (max.) Unicode partition name. As is the nature and purpose of GUIDs and as per RFC 4122, no central registry is needed to ensure the uniqueness of the GUID partition type designators.[14][2]:1970

The 64-bit partition table attributes are shared between 48-bit common attributes for all partition types, and 16-bit type-specific attributes:

More information Bit, Content ...

Microsoft defines the type-specific attributes for basic data partition as:[16][17]

More information Bit, Content ...

Google defines the type-specific attributes for ChromeOS kernel as:[18]

More information Bit, Content ...
Remove ads

Operating-system support

Summarize
Perspective

UNIX and Unix-like systems

More information OS family, Version or edition ...

Windows: 32-bit versions

Windows 7 and earlier do not support UEFI on 32-bit platforms, and therefore do not allow booting from GPT partitions.[33]

More information OS version, Release date ...

Windows: 64-bit versions

Limited to 128 partitions per disk.[33]

More information OS version, Release date ...
Remove ads

Partition type GUIDs

Summarize
Perspective

"Partition type GUID" means that each partition type is strictly identified by a GUID number unique to that type, and therefore partitions of the same type will all have the same "partition type GUID". Each partition also has a "partition unique GUID" as a separate entry, which as the name implies is a unique id for each partition.

More information Operating system, Partition type ...
Remove ads

See also

Notes

  1. Adding ULL suffix to an integer constant makes it of type unsigned long long int.
  2. GUIDs are structured in little endian format,[11] but appear as mixed endian, due to a byte array being used to store the last eight bytes.[12]
  3. Third party implementation exists (GPTTSD)
  4. Windows XP 64-bit does not normally support booting from GPT disks, but unofficial methods exist to boot XP from it.[38]
  5. Only if using its service pack 1 or 2
  6. In a multi-disk setup, non-UEFI bootloader (boot drive) requires MBR-based partitioning, while a system drive can use GUID partitioning.
  7. The GUIDs in this table are written as per RFC 4122, i.e. big-endian byte order, recognizable by the position of the version bits. For example, the GUID for an EFI System partition (C12A7328-F81F-11D2-BA4B-00A0C93EC93B), when serialized in GPT data structures (little-endian), corresponds to the hex sequence 28 73 2A C1 1F F8 D2 11 BA 4B 00 A0 C9 3E C9 3B. The first three blocks are byte-swapped to little-endian, the last is a byte array. See details in TN2166[10]
  8. The formation of this GUID does not follow the GUID definition; it is formed by using the ASCII codes for the string "Hah!IdontNeedEFI". Such formation of "GUID" value breaks down the guaranteed uniqueness of GUID.
  9. Some computer manufacturers have their own GUIDs for partitions that are analogous to the EFI System Partition, but that hold boot loaders to launch manufacturer-specific recovery tools.[45]
  10. Previously, Linux used the same GUID for the data partitions as Windows (Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). Linux never had a separate unique partition type GUID defined for its data partitions. This created problems when dual-booting Linux and Windows in UEFI-GPT setup. The new GUID (Linux filesystem data: 0FC63DAF-8483-4772-8E79-3D69D8477DE4) was defined jointly by GPT fdisk and GNU Parted developers.[47] It is identified as type code 0x8300 in GPT fdisk.
  11. Hurd and GRUB use the same Linux ext2 file system to run and Hurd no longer supports the UFS file system[59]
  12. Hurd uses the same Linux swap file system
  13. The GUID for /usr on Solaris is used as a generic GUID for ZFS by macOS.
  14. NetBSD and MidnightBSD had used the FreeBSD GUIDs before their unique GUIDs were created.
  15. The Ceph filesystem uses GUIDs to mark the state of preparation a disk is in.[68][69]
  16. The legacy Fuchsia GUIDs had two oddities: UUIDs were not generated randomly (several runs of bits were common between partitions), and partitions were uniquely identified by type GUID. The standardized scheme uses randomly-generated GUIDs, and slotted partitions (e.g. zircon_{a,b,r}) share the same type and are distinguished by name and unique GUID.[84]
  17. Due to the limitations of the Rigid Disk Block (RDB), the size of this partition cannot exceed 2 TiB.

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads