What exaclty is MBR (Master Boot Record) in Linux type systems?


Master Boot Record, MBR is also sometimes referred to as the master boot block, master partition boot sector, and sector 0. The MBR is the first sector of the computer hard drive that tells the computer how to load the operating system, how the hard drive is partitioned, and how to load the operating system.
A master boot record (MBR) is the 512-byte boot sector that is the first sector of a partitioned data storage device of a hard disk.
MBR(Master Boot record) is a location on disk which have details about
  • Primary boot loader code(446 Bytes)
  • Partition table information(64 Bytes)
  • Magic number(2 Bytes)
Which makes MBR a total of 512 bytes. So, what are these three details for:
Primary Boot loader code: This code provides boot loader information and location details of actual boot loader code on the hard disk. This is helpful for CPU to load second stage of Boot loader.

Partition table: MBR contains 64 bytes of data which stores Partition table information such as the start and end of each partition, size of partition, type of partition (primary or extended). As we all know HDD support only 4 partitions, this is because of the limitation of its information in MBR. For a partition to represent in MBR, it requires 16 Bytes of space in it so at most we will get 4 partitions.
 
Magic Number: The magic number provides validation check for MBR. If MBR gets corrupted this magic number is used to retrieve it.
Once your CPU knows all these details, it will try to analyze them and read the first portion of MBR to load Second stage of Boot loader.
To know more about Second stage Boot loader, please refer our post Linux boot process and login process explained

Related

open source 9182016231757422323

Post a Comment

emo-but-icon

 

Recent Posts

comments

Join Us

 

Recommended

item