Full Information About GUID Partition Table Windows OS
Globally Unique Identifier Partition Table or GPT is standard technique to create partition table on any physical hard drive or logical hard drive. It is successor of commonly used Master Boot Record (MBR). GPT uses UEFI (Unique Extensible Firmware Interface) firmware at place of previously used BIOS for Master Boot Record. GPT supports BIOS as well, that’s why GPT reserves its first sector for “Protective MBR”. It allow to create 128 partitions in Microsoft Windows OSs and from 128 partitions 1 partition is reserved for UEFI firmware, 1 partition is reserved for Microsoft use and another two partitions will be reserved in case of Dynamic disk. Each GUID Partition Table is having a Unique GUID & partition content type. Therefore, there will be no collision b/w partition identifiers. It allows each partition to name upto 36 characters. GPT manages all entries, partitions tables and protective MBR in logical block addresses, like: LBA 0, LBA 1, LBA 2 & so on as shown in fig 1 Architecture of GPT. GPT consists 64 bits for Logical block addresses. It allows maximum disk size of 9.4 ZB with 512 bytes sectors. It maintains two different GPTs, which results in improvement of security with application of Cyclic Redundancy Check (CRC).
As you can see in fig 1, the first LBA 0 is having Protective MBR used for backward compatibility & providing security to BIOS based systems in case of misrecognizing or overwriting GPT disk drives. LBA 1 is having Primary GPT Header consisting Globally Unique Identifier (GUID), CRC32 checksum, & info of its own and secondary header location and size. From LBA 2 – 33 Partition Entries are described in 128 bytes size for each entry. LBA 34 is the first & LBA -34 is the last usable sector on disk drive. From LBA -33 to -1 is secondary or backup GPT Header used to provide security by applying CRC32 Checksum.
Protective MBR
This sector is added to GPT for backward compatibility with computers having BIOS firmware. Protective MBR provides compatibility as well as security to older systems using BIOS firmware to detect first sector of MBR. It provide facility to use GPT on BIOS firmware but sometimes when GPT is not detected then Protective MBR protect data from Overwriting. The first sector of protective MBR is still use to store stage of bootloader but it has modified to recognize GPT partitions and perform read, write operations. It is always located at LBA 0.
Partition Table Header
It defines usable block on hard drive. It keeps its information like: LBA1, secondary header position info, usable block LBA 2, and info of partition table. It is responsible for CRC32 (Cyclic Redundancy Check) with backup. It does not let use hard disk drive till it confirm that nothing is modified. Partition Table Header contains disk GUID. If any changes has done in any GPT header then OS will not start till the changed partition is removed or repaired.
Partition Entries
This block contains information of disk partitions and each partition contains 128 bytes of block entry to keep information of partition. The first 16 bytes defines about partition type Globally Unique Identifier (GUID). The second 16 bytes defines about unique partition GUID, it is unique for each partition. Then next 8 bytes keeps info of first LBA and next 8 bytes keeps info of last LBA. Next 8 bytes keeps information of attribute flags. Attribute flags can three types containing 60, 62 & 63 bit value. In which 60 denotes “read-only”, 62 denotes “hidden” & 63 denotes “do not auto mount”. The last 72 bytes define “partition name”. Partition entries is shown in table 1.
Table 1: GUID Partition Table Entry format
Conclusion
In this blog, we have learnt about internal structure and work flow of GUID Partition Table. We have also learnt its usage, benefits, and future scope. In addition, in next blog, we will learn to analyze the Master Boot Record and how can we protect our computer from malware attack to change the initial address of MBR.