What is MBR and GPT partition table

Sarath Pillai's picture
Types of Partition Table

In this post we will be discussing about the following things.

 

  • 1.What is MBR partition table?
  • 2.What were the demerits of MBR partition structure?
  • 3.What is GPT Partition table?
  • 4.What are the plus points of GPT?
  • 5.What tools in Linux can be used to create GPT partition structure?

 

With the increasing demand for large size partitions, the partitioning and file systems are becoming more complex and advanced.

there are two mainly used disk partition styles.They are as follows.

1.MBR (Master Boot Record) partitioning style

2.GPT  (GUID Partition Table)

Both the above mentioned schemes are used to identify the location of the partition on the hard disk.the type of partition used is decided when the disk is initiliazed.

the above shown diagram shows a disk initialization dialog in windows, when a new disk is added to the machine. when you initialize the disk these days you are presented with exactly the same options as shown in the above figure.

Master Boot Record (MBR) or Globally Unique Identifier Partition Table (GPT.).Previously there was only one option MBR.

MBR Partitioning style:

in this style the MBR resides in the first 512 bytes of the hard disk. This 512 bytes contains two things in MBR partitioning scheme.

1. 440 bytes for boot loader(Grub, or windows boot loader)

2. the remaining space is used for the partition table, ie: there can only be 4 primary partition in an MBR partitioning scheme.this remaining area also has the partition location information.

this can be done by two methods

  • CHS method: in this method a partition is located through cylinder,head,sector method. this is mentioned by a 24 bit number, in this case it can only mention disk at the max of 8gb.
  • LBA method: LBA stands for Logical Block Addressing, in this each and every sector is numbered serially resulting easy addressing of spaces upto 2TB.

Demerits of MBR partitioning scheme:

  1. it only allows four primary partitions.
  2. the workaround for creating more than four partition by making one of them extended(containing logical partitions inside that) this also leads to problems sometimes as some operating systems can only boot from Primary partitions.
  3. the CHS implementation in MBR partition table can lead to problems because the Cylinder,Head,Sector geometry of the disk can change.
  4. even the LBA scheme implemented puts a 2tb limitation.
  5. Logical partitions are stored in Linked List data structure over the extended partition, and can easily fail, which intern make can make some logical partitions inaccessible.

GPT Partition Style:

Now the MBR type partition table keep the partition table info such as information about the four primary partition in the first 512 bytes of the hard disk. In case of GPT the first sector is kept for "protective MBR" so that, old bios based computers can also boot from GPT partition table.

The GPT partition information starts from the second block or call it LBA 1

Note: LBA is nothing but the sectors numbered in such a way that it can be easily addressed, like LBA 0 is for MBR,LBA 1 for GPT header info etc.

And most of the time LBA 2 contains GPT partition array entry.

the partition array entry typically reserves 128 bytes for each partition entry. Now for a disk of 512-byte sectors the partition array entry can reach upto 16,384 bytes. And in most cases the 34'th sector or call it block is the first usable sector in the disk.

Merits of GPT partition Style:

1.GPT supports up to 128 partitions so there is no need for extended of logical partitions.

2.GPT addresses 64 bit number LBA scheme, so it can address up to 8 ZiB size partitions.

3.GPT structure have primary and secondary header, so recovery is more promising that MBR

4.GPT provides 1 byte partition code, but GPT give you 16byte GUID value to uniquely identify the partition.

Tools for Creating GPT partitions:

Fdisk cannot create a GPT partition so we need to use some other tool to create it.

1.Parted can be used to create GPT partition table, and partitions of more than 2tb size.

2.Gdisk is also a nice tool to create GPT partition table.

Rate this article: 
Average: 4.3 (1298 votes)

Comments

Please explain this:-
"And in most cases the 34'th sector or call it block is the first usable sector in the disk."
Why so?

"there can only be 4 primary partition in an MBR partitioning scheme." Why so?

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.