When you turn on your PC, the processor has to begin processing. However, your system
memory is empty, and the processor doesn't have anything to execute, or really even know
where it is. To ensure that the PC can always boot regardless of which BIOS is in the
machine, chip makers and BIOS manufacturers arrange so that the processor, once turned on,
always starts executing at the same place, FFFF0h. This is discussed in much more detail here.
In a similar manner, every hard disk must have a consistent "starting point"
where key information is stored about the disk, such as how many partitions it has, what
sort of partitions they are, etc. There also needs to be somewhere that the BIOS can load
the initial boot program that starts the process of loading the operating system. The
place where this information is stored is called the master boot record (MBR).
It is also sometimes called the master boot sector or even just the boot sector.
The master boot record is always located at cylinder 0, head 0, and sector 1, the first
sector on the disk. This is the consistent "starting point" that the disk always
uses. When the BIOS boots the machine, it will look here for instructions and information
on how to boot the disk and load the operating system. The master boot record contains the
following structures:
- Master Partition Table: This small table contains the descriptions of the
partitions that are contained on the hard disk. There is only room in the master partition
table for the information describing four partitions. Therefore, a hard disk can have only
four true partitions, also called primary partitions. Any additional partitions are
logical partitions that are linked to one of the primary partitions. Partitions are discussed here.
- Master Boot Code: The master boot record contains the small initial boot program
that the BIOS loads and executes to start the boot process. This program eventually
transfers control to the boot program stored on whichever partition is used for booting
the PC.
Due to the great importance of the information stored in the master boot record, if it
ever becomes damaged or corrupted in some way, serious data loss can be--in fact, often
will be--the result. Since the master boot code is the first program executed when you
turn on your PC, this is a favorite place for
virus writers to target.
Next: Primary, Extended and Logical Partitions