Master boot record
The master boot record (MBR), also the partition sector, in IBM PC architecture, is the 512-byte (½ kilobyte) boot sector, i.e. the sector on the logical beginning of a hard disk that contains the sequence of commands necessary for booting the operating system(s) (OSes).
The bootstrapping firmware contained within the ROM BIOS loads and executes the master boot record. The MBR of a drive usually includes the drive's partition table, which the PC uses to load and run the boot record of the partition that is marked with the active flag. This design allows the BIOS to load any OS without knowing exactly where to start inside its partition. Because the MBR is read almost immediately when the computer is started, many computer viruses made in the era before virus scanner software became widespread operated by changing the code within the MBR.
For Intel x86 processors the sequence of assembly language commands in the master boot record operates in real mode, even when the operating system to be loaded works (most of the time) in protected mode.
In the boot process, it differs whether from partitioned media or not. In both cases the BIOS init transfers control to the first sector of the disk after reading it into memory. If the disk is partitioned, the sector contains partition selection code which reads *the first sector of the selected partition* into its place and transfers control to it, while if the disk does not have partitions then this sector is the one which loads the OS.
See also
Categories: IBM PC compatibles | Computer terminology