On a IBM PC compatible machine the BIOS selects a boot device, then it copies the first sector from the device (which may be an MBR, VBR or any executable code), to address location 0x7C00.
Kinds of boot sectors:
There are several major kinds of boot sectors could be encountered on IBM PC compatible hard disks, floppy disks and similar storage devices:
- A master boot record (MBR) is the first sector of a data storage device that has been partitioned. The MBR sector may contain code to locate the active partition and invoke its Volume Boot Record.
- A volume boot record is the first sector of a data storage device that has not been partitioned, or the first sector of an individual partition on a data storage device that has been partitioned. It may contain code to load and invoke an operating system (or other standalone program) installed on that device or within that partition.
- To be a valid boot sector, the two-byte hex word 0xAA55, called the boot sector signature, must exist at the end of the sector; otherwise, either the BIOS or MBR code will report an error message and halt any OS bootstrapping process.
- CD-ROMs usually have their own structure of boot sectors, for IBM PC compatible systems this is subject to El Torito specifications.
- Non IBM PC compatible systems may have different boot sector formats on their disk devices.
Since code in the boot sector is executed automatically, boot sectors have historically been a common attack vector for computer viruses. To combat this behavior, the BIOS often includes an option to prevent writing to the boot sectors of attached hard drives.
From Wikipedia, the free encyclopedia...