Understanding Partition Scheme MBR vs GPT

In this article I will try to explain the most basic and common things about partitions and partition scheme which one should know as it will be used on your day to day life if you are a system administrator.

To start of lets start with the most basic question

What is a partition?

Partition is the act of dividing a hard disk (HDD) into multiple logical storage units referred to as partitions, to treat one physical disk drive as if it were multiple disks, so that a different file system can be used on each partition.

What are the types of partitions?
Basically partition can be divided into two parts

  • Primary Partition
  • Extended partition
  • Logical Partition
Now to understand more of both the types of partition you should also know about the two partition schemes available i.e.
  • Master Boot Record (MBR)
  • GUID Partition Table (GPT)

Master Boot Record

  • MBR is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives that holds the information on how the logical partitions, containing file systems, are organized on that medium.
  • This MBR code is usually referred to as a boot loader.
  • It is the first sector of the Hard Disk with a size of 512 bytes.
  • The first 434 - 446 bytes are the primary boot loader, 64 bytes for partition table and 6 bytes for MBR validation timestamp.
  • The Partition Table, located in the master boot record, contains 16-byte entries, each of which describes a partition.
  • The organization of the partition table in the MBR limits the maximum addressable storage space of a disk to 2 TB (232 × 512 bytes)

Primary Partition

  • The total data storage space of a PC HDD can contain at most four primary partitions, or alternatively three primary partitions and an extended partition.
  • Only one partition may be designated, at any given time, as active. That partition will be used for booting the system.
  • All Windows operating systems from Windows 95 onwards can be located on (almost) any partition, but the boot files (io.sys, bootmgr, ntldr, etc.) must reside on a primary partition.

Extended Partition

What if you want to have more than 4 partitions in your machine?

  • For these scenarios "Extended Partition" comes to the rescue. Now as explained with MBR scheme a maximum of 4 partitions can be created so we create 3 Primary partitions and one extended partition
  • Within the partition table in reality takes the same amount of space as primary partitions.
  • Now you can create multiple logical partition inside the extended partition.
  • Since these extended partitions are not defined inside the main MBR, they are not primary partitions, and you typically cannot boot from them

Logical Partition

  • A logical partition is a a partition that has been created inside of an extended partition.
  • By using an extended partition you can now have up to 15 logical partitions per disk.

To be brief limitations of MBR Partition scheme

  • Supports maximum of 4 partitions
  • Limitation of maximum disk size of 2TB
  • It uses 32 bits for storing logical block addresses and size information
To overcome these features GPT partition scheme came into the picture so let us understand it in more detail

GUID Partition Table

  • It is a standard for the layout of the partition table on a physical hard disk, using globally unique identifiers (GUID).
  • GPT allocates 64 bits for logical block addresses, therefore allowing a maximum disk size of 264 sectors.
  • For disks with 512-byte sectors, maximum size is 9.4 ZB (9.4 × 1021 bytes) or 8 ZiB
  • The partition contains 2 "GPT headers" one at the top of the device and another at the bottom providing a redundancy so that in case any one of the GPT headers get corrupted the partition information could be collected from the secondary header.
  • If the minimum size of 16,384 bytes is allocated for the partition entry array, and the default size of 128 bytes is used for each partition entry, then the maximum number of partitions is limited to 128.


Related Articles:


How to Encrypt Hard Disk (partition) using LUKS in Linux
2 ways to backup and restore partition table in Linux (CentOS / RHEL 7)