Sunday 10 February 2013

The differences between MBR and GPT partitioning architectures

In Microsoft Windows Operating Systems, there are two types of disk partitioning architectures, MBR and GPT. The main difference between them is how they access disk sectors and logical blocks. MBR or Master Boot Record was the first partitioning architecture invented for disk drivers that had the capacity lower then 2 TB (terabytes). GUI or GUID Partition Table was designed to cover the MBR size limit. Both architectures are in use today but there are some main differences between them. In this post, I will talk about the differences between these two disk partitioning types.
Data is divided into several blocks of information, that's why partition tables were invented. Partition tables keep track of the mappings between sectors and logical numbering blocks. Imagine that you have a file stored on your disk drive. The file is segmented into several pieces of information (study the networking tutorials from IT training day to understand how this is done), each segment receives a label and this information is stored in the partition table. By checking the partition table, devices are able to reconstruct the whole information.
Master boot record was invented when only x86 computers existed. On a MBR disk you can create 4 partitions or three primary and one extended. Of course, the extended one can be partitioned further. One big problem of using a MBR architecture is the possibility of data corruption. There is only one partition table for each partition. The next image taken from Microsoft's website will illustrate the MBR architecture:
You can see from the image that there are four partitions (three primary and one extended). The primary partitions are C,E and F. Each of the primary partitions have 1 partition table. The extended partition contains the logical drives (G, H, ... n).
The Master Boot Code contains a small piece of code that is executed. This structure is automatically created when a disk is partitioned as a MBR. The executed code does the following: scans the partition tables for the active partition(the partition where the Operating System is stored). The code also finds the location of the first sector from the active partition. It loads the boot sector code from the active partition into the memory and then transfers control to the executable code in the boot sector. If the master boot code doesn't locate the boot sector code from the active partition, the following messages can be displayed: Error loading operating system, invalid partition table or missing operating system.
The 0x55 AA is a 2 byte structure that is used to mark the end of a MBR architecture. It is also called a signature.
GUID Partition Table - this type of partitioning is supported by hard drives that have more than 2 TB storage capacity. A basic disk that uses GPT partitioning, can have up to 128 primary partitions. This technology also supports CRC (Cyclic Redundancy Check), reliability and backup. This is how a GPT architecture looks like (from Microsoft's website):
   You can see that GPT architecture uses a large part of the MBR architecture but also has other features. It contains GUID partitions (primary GUID partition) which can identify the type of data that is stored on the partition and the disk type. For each GUID partition table there is a backup partition. It also contains a GUID partition table header and a backup GUID partition table header. Read more about this on Microsoft's website:

No comments:

Post a Comment

what is Juice Jacking SCAM

  Juice Jacking is a cybersecurity threat that occurs when cybercriminals manipulate public charging stations, such as USB charging ports in...