+4 votes
248 views
in Setting by (242k points)
reopened
MBR (Master Boot Record): How to Boot a PC

1 Answer

+5 votes
by (1.6m points)
edited
 
Best answer

What is the MBR?
Structure and tasks of the MBR
The MBR is damaged, what do I do?
Alternatives to MBR

image

MBR (Master Boot Record): How to Boot a PC

The MBR is a relic from the early days of PC technology. It was first introduced in 1983 with the IBM PC DOS 2.0 and has been a staple ever since, especially on Windows computers. Here we show you how this little element, originally on formatted data carriers, is capable of booting highly complex operating systems. In addition, we explain what to do if an MBR stops fulfilling its function of starting the PC..

Index
  1. What is the MBR?
  2. Structure and tasks of the MBR
  3. The MBR is damaged, what do I do?
  4. Alternatives to MBR

What is the MBR?

The MBR or master boot record it is the first physical sector of a data carrier (for example, a hard disk, a USB stick) that is used to boot (start) computers. For this, the computer must have a BIOS and an x86 operating system.

Note

x86 refers to a specific processor architecture introduced by Intel in 1976. Among other things, it processes special instruction registers, developed for example by chipmakers Intel and AMD, to control the operating system. Initially, x86 processors with a 32-bit architecture (processing power: 32-bit) predominated, today's systems run on more powerful x86 64-bit processors (processing power: 64-bit). The x86 64-bit standard is also known as x64.

The MBR always has the same standard address on the data carriers. Cylinder 0, Head 0, Sector 1. It is typically 512 bytes in size, which is the size of a sector on a storage medium..

MBR can be found on almost all external storage media (eg USB sticks) that are compatible with PC technology (x64 / x86 architecture) and can work with Windows. On data carriers that are not designed to boot a PC, the MBR is not functionally integrated, but only serves as a readable source of information . For example, audio file players read information about the location and size of partitions containing the MP3 files to be played there.

Structure and tasks of the MBR

The master boot sector always consists of at least four components:

  • Start program ( bootloader )
  • Data carrier, disk signature (from Windows 2000)
  • Master partition table
  • MBR or boot signature ( Magic number )

The startup program is in the first 446 bytes of the MBR. The small software is activated when the PC is booted and starts the boot process at the operational level. This launches a more extensive routine with standardized processing steps, culminating with the operating system (eg Windows) ready for use. In order to control this process, the main memory installed in the computer is addressed. It is activated if the computer can use electrical power for necessary processing operations when it is turned on..

Windows computers (Windows 2000 and later) identify data carriers with a partition table by signing the disk or the data carrier.

The partition table documents the divisions of data carriers into separate storage sections. For this purpose, it uses four entries of 16 bytes each, which indicate the location and size of each partition. This indicates where a C: \ or D: \ partition begins and ends. The table also contains information on the type of data medium, for example? FAT32 ?,? LINUX Native? or? Dynamic data support ?. The order of the partitions in the partition table does not always correspond to the physical order on the hard disk.

The MBR or boot signature contains the strings 55 and AA in two bytes. Thanks to its characteristic encoding, which is always at the end of the MBR sector, a main boot record is clearly identified as such. If this information is not present, the primary boot sector is not identified and the boot process is canceled with an error message.

image
Structure and components of an MBR.

MBR activities require a trigger turned on by the BIOS (Basic Input / Output System) when turning on the PC. BIOS is special software, also known as firmware ( firm : firm in this context). It is located on the motherboard of a PC with x86 architecture, where it is embedded in a special chip (for example, an EPROM chip, a flash memory). The BIOS remains a fixed component, even when the computer is turned off.

The BIOS itself does not need to know exactly how a disk is partitioned. It just ensures that the MBR bootloader is loaded into memory and executed. If the primary boot sector has been read and its bootloader is active in working memory, the active (that is, boot) partition of a partitioned hard disk is first determined by the partition table.

When this is found, a chain reaction occurs according to the chain loading principle . The identified boot sector of the addressed partition is operationally integrated, and the partition's bootloader takes control of main memory. Later, more extensive processes and routines are executed that take care of the actual startup of the operating system. Since the partition's bootloader itself performs more complex tasks, it is usually larger than the MBR bootloader.

If the computer has more than one operating system installed , the boot process stops before finishing until the user makes a choice (for example, between Windows 7 and Windows 10). These special bootmanagers are usually timed; If there is no external input, the preferred operating system starts automatically after a specified period of time.

The MBR is damaged, what do I do?

If an x86 PC does not boot, it is often due to a primary boot sector error. For this, it is enough that the BIOS cannot read the two bytes of the MBR signature. In such cases, there are various troubleshooting strategies , which mainly depend on the installed operating system. Windows users today have two main methods at their disposal:

  • automatic system repair with emergency media (CD, DVD, USB stick),
  • manual repair via command line.

With the automatic method, you must first change the primary boot media in the BIOS. Otherwise the boot routine will be interrupted as it will search in vain for an intact MBR on the active partition of the integrated hard drive. The computer starts after the BIOS modification, for example from a Windows 7 DVD, the option? Computer repair options? Can be selected. after some intermediate steps. After other intermediate steps, you finally get to System Repair, which automatically resets the MBR.

Using the manual method, repair the main boot record with the Windows command prompt command line tool ( cmd.exe ) and start the repair routines there with standardized commands ( bootrec / fixmbr , bootrec / fixboot ). How you get to the command line is highly dependent on the installed operating system. Furthermore, the procedure depends on whether Windows can be started or whether it is impossible to access it instead.

To protect your privacy, the video will be uploaded after clicking.

However, apart from errors in the main boot sector, there can be other causes. It could even be a boot virus that has been stored in the boot sector and is activated when the computer is turned on. If possible, only experienced users should perform repairs on the MBR, as there is a risk of data loss. Therefore, remember to back up your system and important user data. If the recovery of the MBR partition is not as successful or if an error occurs, the hardware may be irreparably damaged.

Alternatives to MBR

The main boot record has some disadvantages, such as the lack of mechanisms for troubleshooting (for example, if the MBR becomes corrupted), restrictions on the size of the hard disk or manipulation of partitions. Thus, only MBR partitions with a storage capacity of up to 2 TB are supported. In its original form, the classic partition scheme can only handle 4 partitions.

In practice, the limitations can be partially offset by a few tricks and alternatives. This way you can modify the boot sector and create an extended partition , which in turn is divided into smaller logical partitions . However, those? Tricks? they are just emergency solutions that are not really adequate at the pace of current development of information technology.

Today's systems are moving away from the MBR format to gradually adopt the hard disk partitioning system known as the GPT format. GPT proves its superiority in the field of data security, it can handle larger hard drives and multiple partitions. GPT-formatted data carriers work closely with a firmware interface, which has long succeeded the BIOS. For example, starting with Windows Vista Service Pack 1 (64-bit x86 version), it is possible to use Unified Extensible Firmware ( UEFI). The new boot technology is a kind of? Miniature operating system? It supports 64-bit processors out of the box natively.

advice

Do you want to delve into the subject? Learn more about the differences between MBR and GPT in our next article.

As more flexible and efficient alternatives already exist, the MBR has been losing its importance over time. Today, primary boot sectors are used primarily to boot computers with older hardware. Additionally, MBR technology is still widely used for compatibility reasons .


...