Now for something a bit technical…

MBR (Master Boot Record) Data Structure

In a Basic DOS partition, the MBR contains information on the logical structure of the hard drive and instructions on how to boot the system from the hard drive. The MBR is located on the first sector (LBA 0, CHS=cylinder 0; head 0; sector 1) of the hard drive. It is 512 bytes in size and consists of four parts:

Offset 0 to offset 0x1B7: Boot Code – This occupies 440 bytes. The code may not exist on hard drives not being used as operating system boot devices. When the computer is powered on, the BIOS code will be self-checked. Then the Boot Code is copied into a safe area of memory to prevent it being overwritten by other programs or a virus. This code is then executed and tells the computer how to process the Disk Partition Table (DPT) and locate the file system’s boot record.

Offset 0x1B8 to offset 0x1BD: Windows Hard Disk Drive ID – This is a unique identification code assigned by the Windows OS during the hard drive initialization process. It is an essential parameter of the MBR. Without this ID, the Windows OS will recognize the drive as uninitialized. In reality, Windows will try to assign a new ID to the hard drive if the ID doesn’t exist.
Offset 0x1BE to 0x1FD: Disk Partition Table (DPT) – This will be covered in a later post.

Offset 0x1FE: “0x55AA” – This is the MBR signature. The last two bytes of the MBR sector have to be ’0x55AA’. Without these values, the computer will recognize sector 0 as being an illegal MBR sector and report an MBR error.