Windows GPT disk GUID structure detailed

Source: Internet
Author: User
Tags crc32 crc32 checksum

Previous Article Windows disk MBR architecture detailed we introduce the master Boot record structure in basic disk. GPT disk as the partition structure introduced after Windows 2003. Using the GUID partition table structure, the benefit compared to MBR is that it supports larger and more partitions and improves fault tolerance. This article describes the structure of the GUID partition table and the meaning of each field.


GPT Disk's Protective MBR:


In the structure of GPT disk, the first LBA location (LBA 0) holds the protective MBR, and then the LBA1 's location is the GPT GUID partition header. The role of the protective MBR is to prevent some legacy MBR disk tools from destroying the GUID partition table for compatibility reasons. The structure of this storage protective MBR in the location of LBA 0 is based on the extensible Firmware Interface (EFI) specification. The protective MBR and MBR have the same structure and include a partition record with a system ID of 0xEE (as shown), which marks the partition as a GPT partition if the disk containing the partition is moved to Windows 2000 or accessed by some legacy disk utility, the partition will be annotated with the morning GPT protective partition and cannot be deleted.

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/90/6F/wKioL1jwer-CWPCdAACdwOH4PvA060.jpg-wh_500x0-wm_ 3-wmp_4-s_2952044552.jpg "title=" protective MBR "alt=" Wkiol1jwer-cwpcdaacdwoh4pva060.jpg-wh_50 "/>


Globally Unique Identifier Partition Table (GUID) Structure:


As shown, the GUID records that make up GPT disk are listed in the following ways:

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/90/6E/wKioL1jweYPCAoeeAACokmIK0Po530.jpg-wh_500x0-wm_ 3-wmp_4-s_500130103.jpg "title=" GPT "alt=" Wkiol1jweypcaoeeaacokmik0po530.jpg-wh_50 "/>

The GUID Partition Table header:gpt Header defines the area of the logical Block address used by the partition record. It also defines the location of the partition on disk, its own GUID, and a set of CRC32 checksum values. The Primary GPT header is located in the LBA1 location of the disk, immediately following the protective MBR. The Backup GPT header is on top of the last track on the disk. is a GPT header that contains several fields:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/90/6F/wKioL1jwfKPRwvbcAAB9Z71ttig789.jpg-wh_500x0-wm_ 3-wmp_4-s_3795729481.jpg "title=" GUID Partition Table Header "alt=" Wkiol1jwfkprwvbcaab9z71ttig789.jpg-wh_50 "/>


  • The first 0x00 is a 8-byte length signature file, which must be a fixed value to define EFI compatibility.

  • 0x08 started with four sets of 4-byte fields, revision the version information of the EFI specification, the Header size records the entire GPT head sizes, fixed values, CRC32 checksum information, reserved reserved bits.

  • The 0x18 then begins with 5 8-byte fields and a 16-byte length field, Primary LBA records the location of the Primary GPT head, the location of the backup LBA record backup GPT header, first Usable LBA records the starting position of the first partition, such as 64-bit Windows Server 2003, where the starting position is 34 and the end of the partition where the last Usable LBA record is located. The disk GUID is 16 bytes long and is used to identify the location of the partition header and disk, Partition Entry LBA record GUID partition record, fixed to LBA2.

  • Starting with 0x50 for 3 4-byte records, the number of Partition entries records the maximum disk partitions, for example 64-bit Windows Server is 128, Size of Partition Entry records the size of each GUID partition record, which has a value of 128 bytes, Partition Entry Array CRC32 Records a set of checksum values for the partition record.

  • The last 420 bytes of reserved space, starting from the 0x5c position, has a value of 0.


GUID Partition Entry array: A partition table similar to MBR, GUID Partition Entry array contains records for each partition on disk. For example, if 64-bit Windows Server 2003 creates an array value of 16384 bytes, the first available data is greater than or equal to LBA34. The GUID Partition Entry array also has a copy at the end of the partition, after the last available LBA, the GUID is Partition before the table header.


The GUID Partition entry:guid Partition Entry is 128 bytes long and is used to define a single partition structure. Each GUID Partition entry starts with the Partition type record. A 16-byte partition Type GUID, similar to the system ID in the MBR disk partition table, that defines the role of the data and partitions contained in the partition. is a typical GPT disk GUID Partition entry array record, which shows three types of partition records


The first part {45464920-5041-5254-0000-01005c000000} is the EFI system partition, the middle part {16E3C9E3–5C0B–B84D–817D–F92DF00215AE} is Microsoft Reserved partition, the bottom one {a2a0d0eb–e5b9–3344–87c0–68b6b72699c7} is a primary partition in Windows Basic disk.

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/90/70/wKioL1jwfvfgjy_oAAC_R0kGxyk828.jpg-wh_500x0-wm_ 3-wmp_4-s_2891264861.jpg "title=" EFI system Partition "alt=" Wkiol1jwfvfgjy_oaac_r0kgxyk828.jpg-wh_50 "/>

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/90/70/wKioL1jwfxLDbMtgAAEYRZwhpEs419.jpg-wh_500x0-wm_ 3-wmp_4-s_3929997921.jpg "title=" Reserved and Master.jpg "alt=" Wkiol1jwfxldbmtgaaeyrzwhpes419.jpg-wh_50 "/>

Some fields are primarily recorded in the middle of each section. Starting with the 0x10 position after the Partition Type GUID, is a unique Partition GUID record that is 16 bytes long to identify the uniqueness of each record. 0x20 begins with 3 8-byte fields, starting LBA and ending LBA record where the partition starts and ends, and the Attribute bit describes how the partition is used, such as whether it is hidden and read-only, and so on. The last 0x38 begins with a 72-byte field that is used to Unicode the name of the partition, with a maximum name of 36 characters.


This article is from the "Liu Hongliang Blog" blog, make sure to keep this source http://liuhongliang.blog.51cto.com/2895201/1916036

Windows GPT disk GUID structure detailed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.