What is MBR in Computer? (Explained)

eComputerTips is reader-supported. When you buy through links on our site, we may earn a small commission without any additional cost to you.

What is MBR in computer? MBR is the short of Master Boot Record and it stores the partition records in the first sector of the drive.

The Master Boot Record is also referred in different names such as:

  • The master boot block
  • The Sector Zero
  • Master boot sector and
  • The master partition boot sector.

The primary function of the MBR is to tell the computer how exactly the hard drive in it is partitioned.

In addition to that, it also tells how exactly the operating system should be loaded.

The MBR is quite vulnerable to viruses that are common to the boot sector.

These viruses may corrupt or remove the MBR and render the hard drive unusable. This means that the computer will not boot up.

These are just the basics of MBR but if you need to understand it thoroughly, you will need to go through this article in its entirety.

What is MBR in Computer?

What is MBR

MBR or Master Boot Record refers to the first segment of the principal storage partition found in a BIOS-based computer.

Typically, the MBR contains two specific things such as:

  • A partition table and
  • A small program.

When this program is carried out, the particular partition that should contain the active operating system is determined.

It also helps in branching to the boot program which is in the boot segment of that partition and loads it.

Now, before you dive deep into the other aspects of the MBR, it is better to know how exactly you will know whether or not the hard drive of your computer is MBR.

For this, you will need to use the Windows Disk Management tool and follow these steps mentioned below:

  • Right-click on the Start menu
  • Choose Disk Management
  • Find the disk you want to check on the Disk Management window when it pops up
  • Right-click on the disk
  • Select Properties from the context menu and
  • Click on Volume tab in the Properties window.

Find the Partition style on the window and you will see the type of the disk you are using.

It will be mentioned either ‘Master Boot Record (MBR)’ or as ‘GUID Partition table (GPT).’

Technical Aspects

Technically, the Master Boot Record is the information stored in the first sector of the hard disk or a removable drive and it boots the information mentioned earlier into the Random Access Memory or RAM or the main storage of the computer.

Ideally, when the hard drive is partitioned, the MBR partition table is created but its location is not found in the partition.

This means that the storage medium that are not partitioned, such as the floppy disks, typically do not have any Master Boot Record in them.

However, if there is an MBR, it will be about 512 bytes and will usually be located on the first sector of the hard drive or the removable disk, as said earlier.

It will have a specific address called the CHS address which signifies:

  • Cylinder
  • Head
  • Sector

This address is usually created in Windows and DOS systems and can work independently of the operating system as a chain boot loader.

Generally, an MBR can have four partitions at the most. However, there are a few latest versions that can support as many as 16 partitions.

Each of these partitions has a storage space of 16 bytes and therefore the total storage space of all of the four partitions combined is up to 64 bytes.

Now, the drives that are formatted with Master Boot Record will need a total available space of up to 2 TB to use.

This is because, as said earlier, the maximum size of the MBR is 512 bytes.

Read Also:  PCIe and SATA SSD for Gaming - 10 Differences

Features of Master Boot Record

The MBR has some unique features. One of the most distinct features is related to the partitions in it.

Usually, the partitions in it can be of three different types such as:

  • Primary partition – This is the partition that stores and boots the operating system
  • Extended partition – This type of partition creates the logical partitions and
  • Logical partition – This partition creates and expands the limitation of only four partitions up to 26 partitions.

However, the MBR partition table shows the details of only two types of partition namely, the primary partition and the extended partition.

Working Process

The working process of the Master Boot Record starts immediately when you switch on the system.

It will start running the BIOS or Basic Input/output System program that is stored in the RAM.

This particular program contains the code that is used to find and carry out the MBR.

This will in turn help in locating the partitions of the different hard disks as well as load the operating system.

The MBR boot code uses the volume boot code of the partition to spot the system partition.

After that, the program uses the boot sector of the partition to boot the system by starting the operating system.

If any of the preset instructions does not match or are not executed, may be due to a missing Master Boot Record, the computer will not start.

The initial job of the BIOS program of the system is to evaluate the hardware in it and check the boot devices that are available and contain the Master Boot Record.

Once it finds that, the BIOS program starts reading the first sector and determines the final signature.

The next part of the working process involves transferring control to the Master Boot Record in order to boot the operating system.

However, this will happen only when the signature matches.

If this final signature is found to be mismatching, the BIOS program will look for other bootable devices.

And, in worst case scenario, if there is no additional device found, the operating system will not boot. In that case, you will receive an error message.

Parts of a Master Boot Record

There are three major parts of the Master Boot Record.

These are:

  • The master boot routine – The 446 bytes of it contains all the information that is necessary for the Master Boot Record such as a variable load coder. When the hard drive is booted, the Master Boot Record transfers the control to the operating system that is registered in the partition table.
  • The Disk Partition Table – Also referred to as DPT, this is typically found in the first sector of the hard drive. The 64-byte DPT contains all the necessary details regarding the partitions and their respective locations.
  • Identification code – This is the specific code that identifies the Master Boot record. This code is usually 2 bytes and its value is usually AA55H or 55AAH.

Issues and Remedies

Now that you know about the basics of the Master Boot Record, you should also know that these can encounter a few particular issues before and during the working process.

Since the MBR plays a significant role in the optimal functioning of the computer, it is absolutely essential to be able to troubleshoot and fix the common issues that may occur with the Master Boot Record.

Here are the common issues and a few quick remedies to these issues.

Usually, the MBR may encounter issues due to any of the two following reasons:

  • When there is a physical damage caused to the hardware of the system and
  • When the MBR itself is corrupted or hijacked by some kind of a virus.

Now, as for the remedies, the one to use will depend on the type of problem and, most importantly, on the type of operating system installed in your computer.

However, assuming that you are using a Windows, you will typically have two specific options mainly. These are:

  • By using an Automatic System Repair wizard with the help of an external device such as a DVD or a CD and
  • By repairing it manually by using the command prompt.
Read Also:  14 Differences Between SATA and PATA

In the first method, the main boot medium is altered in the BIOS to the gadget in concern.

When you follow the instructions and the steps in the wizard, you will be allowed to access and use the system repair mechanism which will restore the Master Boot Record automatically.

On the other hand, in the second method, everything should be done manually by you.

You will need to initiate the process by using commands such as bootrec.

However, you will need to research on the commands to use for this particular method because the commands to use will typically depend on the version of the operating system and whether or not Windows is triggered on the computer.

What is the Function of MBR?

The functions of the MBR are varied and many and all of them results in the enhanced performance of the system over all.

The most important function of the Master Boot Record is to examine the partition table of the hard disk and find out whether or not it is in proper working condition.

In addition to that, the MBR also looks for an active bootable partition in the partition table of the hard drive.

And finally, the MBR also helps in storing the contents of the initial logical sector of the active partition in the memory storage.

Ideally, it is the three parts of the MBR namely, the master partition table, the master boot code, and the disk signature, that simplifies the working process of it. The working process, in simple words, involves:

  • The BIOS looking for a target device to boot at the first startup
  • If it contains the master boot record, the boot code of the MBR uses the volume boot code to locate the system partition and
  • The operating system is started by using the boot sector of the particular partition.

Therefore, as you can see, the major role played in the startup process of the computer is by the MBR.

Without it, the system will have no instructions available and will have no idea whatsoever as to how to start the operating system of the computer.

Advantages

One of the most significant advantages of the MBR partition table is that it is compatible with most of the available editions of Windows.

This means that it will work perfectly even in the older systems. It simply has to be BIOS based.

The reason behind this is that the Master Boot Record partition scheme is based on the legacy BIOS.

Disadvantages

As for the downsides of the MBR, it includes:

  • The limit of only 4 primary partitions which can be a serious issue for the users who need a higher number of primary partitions in their device and
  • The fact that it cannot work on hard drives that are larger than 2 TB and in that case it will work on the initial 2 TB and the rest of the space will go waste.

Also, you cannot consider the MBR based drives to be very reliable and robust. This is because all data and information of the disk is stored in one single location.

This means that, if it is overwritten by any chance or gets corrupted, you will not be able to recover the data. This will result in booting issues.

You will have to delete and install everything from the scratch, which is quite a hassle and not worthy to go for.

There is no way the MBR can get an idea of such corruption of data and its related issues beforehand because it does not store the Cyclic Redundancy Check or CRC values as the GPT or the GUID Partition table does.

What is an MBR Example?

Typically, a readable or hexadecimal version of a Master boot Record may not be easy to understand when you look at it apparently.

However, the hexadecimal editor or a command hexadump may be very helpful in that matter.

Read Also:  What is Hard Drive RPM - FAQ, List & Work Process

This will display the hexa directly from the unprocessed data storage device. Or else, a brief explanation with an example will surely do the needful.

Here is a typical image for reference:

mbr

Ideally, an MBR will have a large section which is usually referred to as the Code Area.

This particular region will store the shell code in addition to the zeros padding.

This means that, you can consider this as a bootstrap for the operating system.

Then, there will be a small section of 4 bytes which is called the disk signature. This is actually the ID of the MBR.

Following it there is the 2 bytes the null area that involves the naming of the partition table.

Then, there will be a reasonably large section which is usually referred to as the table of primary partitions.

In this section, there are 16 byte entries of the four partitions of the MBR. Each of these entries describes the primary partition.

As said earlier, the MBR partition table describes only two out of the four partitions in the disk.

As for the other two 16 byte entries, there is typically zero padding only.

Finally, there is an MBR signature part of 2 bytes only and it usually ends with 55 AA.

With the help of this signature, you can say whether or not the disk of your computer has MBR. All you have to do is simply extract the first 512 bytes of the data storage device and look at the last two bytes.

As said earlier, the primary partitions of the disks have 16 bytes and these 16 bytes are divided as follows to indicate different aspects of the partition:

  • The first byte indicates the bootable (80) or non bootable (00) status
  • Next three bytes indicate the Cylinder, Head, Sector address of the first absolute sector of the partition but may not be in that particular order always
  • The next byte indicates the file system
  • The following three bytes indicate the CHS address of the last absolute sector of the partition
  • The next four bytes indicate the Logical Block Address of the first absolute sector of the partition and finally
  • The last four bytes indicate the number of sectors in the partition.

Now, if you take a typical primary partition entry, you can even decrypt it yourself. For example, assume that the 16 byte Partition 1 entry is as follows:

80 01 01 00 83 FE 3F 01 3F 00 00 00 43 7D 00 00

Here, each of the 16 entries, either in a group of isolation have a different meaning to portray. Such as:

  • 80 – Bootable status of the device
  • 01 01 00 – The CHS address of the first absolute sector of the partition
  • 83 – A Linux file system
  • FE 3F 01 – The CHS address of the last absolute sector of the partition in the same format
  • 3F 00 00 00 – The LBA of the first absolute sector in the partition and
  • 43 7D 00 00 – The number of sectors in the partition.

So, you can see that things are not as difficult as you would have thought before you started reading this article.

There is no doubt that with such knowledge and understanding of the Master Boot Record or MBR partitioning scheme, you will surely make the best decision next time when you choose a computer or initialize a disk.

Conclusion

So, coming to the end of the article, that is all about MBR partitioning scheme.

You now surely have a fair bit of knowledge about this partition style and about its overall importance in data storage as well and will not mix it up with GUID Partition Table any more.

About Dominic Cooper

Dominic CooperDominic Cooper, a TTU graduate is a computer hardware expert. His only passion is to find out the nitty gritty of all computers. He loves to cook when he is not busy with writing, computer testing and research. He is not very fond of social media. Follow Him at Linkedin