0

I have been doing research on partitions lately and im quite confused on a few things:

  • what is a partition table and what is it used for

  • what is a partitioning scheme (GPT and MBR) and what are they used for

Lastly I have done some research and have seen the term 'MBR' and 'GPT' being used to describe partition tables, my last question is, Is MBR and GPT another name for a partition?

4

Partitions

Let's start with another question: What is a disk (from a software point of view)?

A disk is a piece of memory. It has a start and an end. It holds pieces of data, enumerated starting at 0 (you call this an address). One piece of data usually is called a sector which commonly yields 512 bytes.

Imagine a world without file-systems. You can totally use a disk by just directly writing your data to it. Your data is then located on the disk. It has a certain length. It starts at address a and takes up space up to address b. Now you probably want to have more than one set of data and you want to have your data organized in some way. You may say: I want to split the memory into smaller parts with fixed sizes. I call these parts partitions. I use them to organize my data.

So you come up with the concept of a partition table. The partition table is a well-specified list of integer numbers characterizing (start, end, designated usage type) the disk's partitions.

The MBR is actually much more than just a partition table, but it contains a partition table. The MBR also contains some executable code involved with booting the system. You could say, the MBR is one widely used implementation of the concept of a partition table. The MBR is expected to be found at sector 0. It is made to fit into that one sector of 512 bytes. As a result, there is a limit regarding the number and size of partitions it can describe.

GPT is another implementation, but it is larger and consequently able to describe more and larger partitions.

Etymology

To understand the etymology of the term MBR, we need to consider the history. Before you can even think about how to organize the data, you want your system to boot. Powered off, a computer is pretty much "broken" as it cannot do anything. To become useful after power on, the very first program needs to be loaded from a well known location. This well known location can be the first sector of the hard-drive (this is a gross simplification of the boot process). The very first program is referred to as boot-loader. Add a few standards and the MBR (master boot record) is born. From this point of view, having a partition table in the MBR was a nice add-on more than a necessity.

The boot-loader usually reads the partition table, looks at the first bootable partition, and continues to load the actual operating system. This is why the MBR partition scheme usually comes with one partition for the operating system.

With the GPT (GUID Partition Table), there is one designated partition for the boot process, the ESP (EFI system partition). The ESP is usually formatted with a FAT file system. The boot loader is stored in a file. The actual operating system typically resides in another partition. This is why the GPT partition scheme usually comes with at least two partitions: One for the boot-loader, one for the operating system.

  • if MBR is not a partition table then why is it called the MBR partition table scheme so much, the same is with GPT? – Qasim Apr 16 at 10:08
0

The partition table in where the position of the partitions is stored. There is nothing stored at the partitions. The OS reads the partition table, and restricts where software can write (so /dev/sda1 has an offset (startOffset) added to its block numbers, and any block less than 0 or higher than $EndOffset-startOffset$ is blocked.

The Master boot record is stored next to the partition table, and contains the 2nd stage boot loader (stage one is in the ROM). This then loads stage 3 (e.g. grub).

GPT is a new partition table standard.

  • this does not answer the full question but thanks anyways for the help – Qasim Apr 15 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.