From Syslinux Wiki
Revision as of 12:25, 7 December 2010 by Mjt (talk | contribs) (created some info about mbr)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

MBR (Master Boot Record)

The task of MBR (Master Boot Record) is to load boot code from an active partition of a drive.

Syslinux distribution comes with several versions of mbr code. These are mbr.bin, altmbr.bin and gptmbr.bin, each in 3 different flavours, -- regular, and with suffixes _c and _f.

mbr.bin is a regular boot code for msdos-like partition table.

altmbr.bin is also for msdos-style partition table, how it's different from regular mbr.bin?

gptmbr.bin is a boot code that can be used on a drive with GPT partition table.

The different flavours differs in the way how they determine boot drive. The regular code uses information about boot drive from the BIOS (passed in DL register). In some cases, this information may be somehow broken or incorrect, and for this case there's _c version, which checks if Ctrl key is held during boot and if it is, the code boots from drive 0x80, or else it uses regular way. And the _f version which always boots from BIOS drive 0x80.

In all cases the mbr code is 440 bytes long and can be written into start of a drive (with appropriate partition table) to make it bootable. MS-DOS style partition table is located in the first sector of the drive as well, right _after_ the mbr code (starting with 440 byte).