The master boot record (MBR), also the partition sector, in IBM PC architecture, is a 512-byte sector on the beginning of a hard disk drive that contains a sequence of commands necessary for booting an operating system.

The boot code contained within the ROM BIOS loads and executes the master boot record. The MBR of a drive usually includes the drive's partition table, using which it can load and run the boot record of the partition that is marked with the active flag. This design allows the BIOS to load any operating system without knowing exactly where to start inside its partition. Because the MBR is read almost immediately when the computer is started, many viruses operate by changing the code within the MBR. For Intel processors the sequence of assembly language commands in the master boot record operates in real mode.

See boot sector, boot loader