Understanding GUID Partition Table (GPT)
Understanding GUID Partition Table (GPT)
In computer hardware, GPT stands for GUID Partition Table (GPT), and is a standard for the layout of the
partition table on a physical hard disk. It forms a part of the Extensible Firmware Interface (EFI) standard,
which is Intel's proposed replacement for the PC BIOS. It is also used on some BIOS systems because of the
limitations of MBR partition tables. GPT allows for a maximum disk and partition size of 9.4 zettabytes (9.4 ×
1021 bytes[1]) As of 2010, most current operating systems support GPT, although some operating systems
(including Mac OS X and Windows) require systems with EFI hardware to support booting from GPT
partitions.
The MBR partition table restricts partition sizes to a maximum of 2.19 terabytes (2.19 × 1012 bytes) or almost
exactly 2 TiB (2,199,023,255,040 bytes or 4,294,967,295 (232−1) sectors × 512 (29) bytes per sector).[2]. GPT
supports partition sizes up to 9.3 zettabytes or 8 ZiB−512 bytes (9,444,732,965,739,290,426,880 bytes or
18,446,744,073,709,551,615 (264−1) sectors × 512 (29) bytes per sector).
Contents
■ 1 History
■ 2 Features
■ 3 Legacy MBR (LBA 0)
■ 4 Partition table header (LBA 1)
■ 5 Partition entries (LBA 2–33)
■ 6 OS support of GPT
■ 6.1 Unix-class operating systems
■ 6.2 Windows 32-bit versions
■ 6.3 Windows x64 64-bit versions
■ 7 Partition type GUIDs
■ 8 See also
■ 9 References
■ 10 External links
History
Main articles: INT 13h and Enhanced BIOS Diagram illustrating the layout of the GUID
Partition Table scheme. In this example, each
The widespread MBR partitioning scheme, dating from the logical block (LBA) is 512 bytes in size, and
early 1980s, imposed limitations which affected the use of each partition entry is 128 bytes. LBA
modern hardware. Intel therefore developed a new partition-
addresses that are negative indicate position
table format in the late 1990s as part of what eventually became
from the end of the volume, with −1 as the last
UEFI. The GPT as of 2010 forms a subset of the UEFI
addressable block.
specification.[3]
Features
MBR-based partition table schemes insert the partitioning information in the master boot record (MBR) (which
on a BIOS system is also the container for code that begins the process of booting the system). In a GPT,
partition table information is stored in the GPT header, but to maintain compatibility, GPT retains the MBR
entry as the first sector on the disk followed by a primary partition table header, the actual beginning of a GPT.
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 2 of 11
Like modern MBRs, GPTs use logical block addressing (LBA) in place of the historical cylinder-head-sector
(CHS) addressing. Legacy MBR information is contained in LBA 0, the GPT header is in LBA 1, and the
partition table itself follows. 64-bit Windows operating systems reserve 16,384 bytes (or 32 sectors at 512
bytes) for the GPT, leaving LBA 34 as the first usable sector on the disk.
Apple warns:[4] "Do not assume that the block size is always going to be 512 bytes." Modern storage devices
such as solid-state drives may contain 1024-byte LBAs and some magneto-optical (MO) drives use 2048-byte
sectors (but MO drives are typically not partitioned).
Hard disk manufacturers are transitioning to 4096-byte sectors. As of 2010, the first such drives continue to
present 512-byte physical sectors to the OS, so degraded performance can result when the drive's (hidden)
internal 4 KiB sector boundaries do not coincide with the 4 KiB logical blocks, clusters and virtual memory
pages common in many operating systems and file systems. This is a particular problem on writes when the
drive is forced to perform two read-modify-write operations to satisfy a single misaligned 4 KiB write
operation.[5] Such a misalignment occurs by default if the first partition is placed immediately after the GUID
partition table, as the next block is LBA 34. The next 4 KiB boundary begins with LBA 40.
Drives which boot Intel-based Macs must be formatted with a GUID Partition Table, rather than with the Apple
Partition Map (APM).
GPT also provides redundancy, writing the GPT header and partition table both at the beginning and at the end
of the disk.
If the disk exceeds 2 TiB—-the maximum partition size representable using the 32-bit LBAs of the legacy
MBR (assuming a 512 byte block size)—-the size of this partition is marked as 2 TiB, ignoring the rest of disk.
Apple's Boot Camp Intel based Apple macs software creates a hybrid partition table to allow the booting of
Windows (which at the time of Boot Camp's creation did not support GPT or EFI). In this system the protective
partition is reduced in size to cover from sector 1 to the sector before the first regular partition included in the
hybrid MBR. Additional MBR partitions are then defined to correspond to the next three GPT partitions.
The header contains the disk GUID (Globally Unique Identifier). It records its own size and location (always
LBA 1) and the size and location of the secondary GPT header and table (always the last sectors on the disk).
Importantly, it also contains a CRC32 checksum for itself and for the partition table, which may be verified by
the firmware, bootloader and/or operating system on boot. Because of this, hex editors should not be used to
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 3 of 11
modify the contents of the GPT. Such modification would render the checksum invalid. In this case, the
primary GPT may be overwritten with the secondary one by disk recovery software. If both GPTs contain
invalid checksums, the disk would be unusable.
The values for current and backup LBAs of the primary header should be the second sector of the disk (1) and
the last sector of the disk, respectively. The secondary header at the end of the disk identifies its own table of
partition entries, which is located directly before that header.
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 4 of 11
Apple warns: "Do not hardwire the current size of the partition entry (128 bytes)."[7] Microsoft TechNet says
that attributes are divided into two halves: the lower 4 bytes representing partition independent attributes, and
the upper 4 bytes are partition type dependent. Microsoft uses the following bits in general:[8]
Partition attributes
Bit Content
0 System partition (disk partitioning utilities must reserve the partition as is)
2 Legacy BIOS Bootable (equivalent to MBR 80h Active flag)[9]
60 Read-only
62 Hidden
63 Do not automount (i.e., do not assign drive letter)
OS support of GPT
Hybrid MBRs are non-standard and can be interpreted in different ways by different OSes.[10] Unless otherwise
noted, OSes provide precedence to the GPT data when a hybrid MBR configuration is encountered.
The term No native support on this arch and version. should be understood this way:
Not supported as data disk[11], only known legacy partitions found in protective MBR are accessible via the
OS. Detachable disks: only support for MBR partitioning; No access with end user applications. GPT
contained raw data is accessible with third-party administrator tools for low level disk access. True file
system level support in read or read-write form might be subject of software from a third-party vendor.
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 5 of 11
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 6 of 11
Boot from
Version/ Boot from GPT
OS Platform GPT on Note
edition on PC/BIOS
EFI
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 7 of 11
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 8 of 11
Reserved 8DA63339-0007-60C0-C436-083AC8230908
ZFS[4] 6A898CC3-1DD2-11B2-99A6-080020736631
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 9 of 11
1. ^ The GUIDs in this table are written assuming a little-endian byte order. For example, the GUID for an
EFI System partition is written as C12A7328-F81F-11D2-BA4B-00A0C93EC93B here, which corresponds
to the 16 byte sequence 28h 73h 2Ah C1h 1Fh F8h D2h 11h BAh 4Bh 00h A0h C9h 3Eh C9h 3Bh —
only the first three blocks are byte-swapped.
2. ^ The formation of this GUID does not follow the GUID definition, it is formed by using the ASCII
codes. Such formation of "GUID" value breaks down the guaranteed uniqueness of GUID.
3. a b Previously Linux used the same GUID for the data partitions as Windows. 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. This new GUID was defined jointly by GPT fdisk and GNU
Parted developers. It is identified as type code 8300 in GPT fdisk.[citation needed]
4. a b The GUID for /usr on Solaris is used as a generic GUID for ZFS by Mac OS X.
5. ^ Definitions are in src/sys/sys/disklabel_gpt.h
([Link] . NetBSD had
used the FreeBSD GUIDs before unique NetBSD-specific GUIDs were created.
6. ^ Definitions are in [Link]
7. ^ Definitions are in [2] ([Link]
r1=1.4;r2=1.5) . MidnightBSD had used the FreeBSD GUIDs before unique GUIDs were created.
See also
■ Master boot record
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 10 of 11
References
1. ^ Bill Boswell (2002-07-01). "FAQ: Drive Partition Limits" ([Link]
-[Link]) . [Link]. [Link]
Retrieved 2010-06-09. "GPT disks also support very large partitions thanks to a 64-bit Logical Block Address
scheme. A logical block corresponds to one sector, or 512 bytes, yielding a maximum theoretical capacity of eight
zettabytes."
2. ^ "FAQ: Drive Partition Limits" ([Link] (pdf). UEFI
Forum. [Link] Retrieved 2010-06-09.
3. ^ Nikkel, Bruce J. (September 2009). "Forensic analysis of GPT disks and GUID partition tables". Digital
Investigation 6 (1-2): 39–47. "The current popular BIOS and MBR partitioning scheme was originally developed in
the early 1980s for the IBM Personal Computer using IBM PC-DOS or MS-DOS. The Basic Input/Output System
(BIOS) provides an interface to the hardware and initiates the boot process (IBM, 1983). The MBR, located in sector
zero, contains the initial boot code and a four entry partition table (Microsoft, 1983). Intended to solve booting and
partitioning limitations with newer hardware, a replacement for both the BIOS and the MBR partition table was
developed by Intel in the late 1990s (Intel, 2000). This is now called the Unified EFI (UEFI, 2008 UEFI Forum.
Unified extensible firmware interface specification version 2.2 [Link], 2008) specification, and managed by the
UEFI Forum (UEFI, 2009). A subset of this specification includes GUID (globally unique identification) Partition
Tables, or GPT, intended to replace the DOS/MBR partition tables."
4. ^ "Technical Note TN2166: Secrets of the GPT" ([Link] . Apple.
[Link]
5. ^ "Western Digital’s Advanced Format: The 4K Sector Transition
Begins" ([Link] . Anandtech.
[Link]
6. ^ [Link]
7. ^ [Link]
8. ^ [Link]
9. ^ "e09127r3 EDD-4 Hybrid MBR boot code
annex" ([Link]
4_Hybrid_MBR_boot_code_annex.pdf) . [Link]
4_Hybrid_MBR_boot_code_annex.pdf.
10. ^ a b c Smith, Rod. "Hybrid MBRs: The Good, the Bad, and the So Ugly You'll Tear Your Eyes
Out" ([Link] . [Link]
11. ^ a b c d "Windows and GPT FAQ" ([Link] .
Microsoft. [Link]
12. ^ "Ubuntu on MacBook" ([Link] . Ubuntu Community Documentation.
[Link]
13. ^ Smith, Rod. "GPT fdisk for Linux" ([Link] . [Link]
14. ^ "GNU Parted FAQ" ([Link] .
[Link]
15. ^ "mklabel - GNU Parted Manual" ([Link] .
[Link]
16. ^ "Myths and Facts About Intel Macs" ([Link] . rEFIt. [Link]
17. ^ Microsoft Raises the Speed Limit with the Availability of 64-Bit Editions of Windows Server 2003 and Windows
XP Professional [1] ([Link]
External links
■ Microsoft TechNet: Disk Sectors on GPT Disks (Archived page)
([Link]
-[Link]?mfr=true)
■ Microsoft TechNet: Troubleshooting Disks and File Systems ([Link]
us/library/[Link])
■ Microsoft TechNet: Using GPT Drives ([Link]
[Link])
■ Microsoft: FAQs on Using GPT disks in Windows
([Link]
[Link] 7.2.2012
GUID Partition Table - Wikipedia, the free encyclopedia Page 11 of 11
[Link] 7.2.2012