[go: nahoru, domu]

Master boot record: Difference between revisions

Content deleted Content added
SdkbBot (talk | contribs)
m General fixes, removed erroneous space
removed weasel word, clarified
Tags: Mobile edit Mobile web edit
 
(36 intermediate revisions by 29 users not shown)
Line 1:
{{Short description|First sector of a partitioned computer disk}}
{{About|aan IBM PC-specific type of [[boot sector]] on partitioned media|the first sector on non-partitioned media|volume boot record}}
{{Use dmy dates|date=April 2019|cs1-dates=y}}
A '''master boot record''' ('''MBR''') is a special type of [[boot sector]] at the very beginning of [[disk partitioning|partitioned]] computer [[mass storage device]]s like [[fixed disk]]s or [[removable drive]]s intended for use with [[IBM PC-compatible]] systems and beyond. The concept of MBRs was publicly introduced in 1983 with [[PC DOS 2.0]].
 
{{Use list-defined references|date=January 2022}}
The MBR holds the information on how the logical partitions, containing [[file system]]s, are organized on that medium. The MBR also contains executable code to function as a loader for the installed operating system—usually by passing control over to the loader's [[Second-stage boot loader|second stage]], or in conjunction with each partition's [[volume boot record]] (VBR). This MBR code is usually referred to as a [[boot loader]].<ref name="FOLDOC"/>
 
A '''master boot record''' ('''MBR''') is a special type of [[boot sector]] atin the veryfirst few beginningblocks of [[disk partitioning|partitioned]] computer [[mass storage device]]s like [[fixed disk]]s or [[removable drive]]s intended for use with [[IBM PC-compatible]] systems and beyond. The concept of MBRs was publicly introduced in 1983 with [[PC DOS 2.0]].
The organization of the partition table in the MBR limits the maximum addressable storage space of a partitioned disk to 2&nbsp;[[Tebibyte|TiB]] {{nowrap|(2<sup>32</sup>&nbsp;×&nbsp;512&nbsp;bytes)}}.<ref name="Microsoft_2013_2581408"/> Approaches to slightly raise this limit assuming 32-bit arithmetics or 4096-byte sectors are not officially supported, as they fatally break compatibility with existing boot loaders and most MBR-compliant operating systems and system tools, and can cause serious data corruption when used outside of narrowly controlled system environments. Therefore, the MBR-based partitioning scheme is in the process of being superseded by the [[GUID Partition Table]] (GPT) scheme in new computers. A GPT can coexist with an MBR in order to provide some limited form of backward compatibility for older systems.
 
The MBR holds the information on how the logicaldisc's partitions,sectors containing(aka [[file"blocks") system]]sare divided into partitions, areeach organizedpartition onnotionally thatcontaining mediuma file system. The MBR also contains executable code to function as a loader for the installed operating system—usually by passing control over to the loader's [[Second-stage boot loader|second stage]], or in conjunction with each partition's [[volume boot record]] (VBR). This MBR code is usually referred to as a [[boot loader]].<ref name="FOLDOC"/>
MBRs are not present on non-partitioned media such as [[floppy|floppies]], [[superfloppy|superfloppies]] or other storage devices configured to behave as such.
 
The organization of the partition table in the MBR limits the maximum addressable storage space of a partitioned disk to 2&nbsp;[[Tebibyte|TiB]] {{nowrap|(2<sup>32</sup>&nbsp;×&nbsp;512&nbsp;bytes)}}.<ref name="Microsoft_2013_2581408"/> Approaches to slightly raise this limit assumingutilizing 32-bit arithmeticsarithmetic or 4096-byte sectors are not officially supported, as they fatally break compatibility with existing boot loaders and, most MBR-compliant operating systems and associated system tools, and canmay cause serious data corruption when used outside of narrowly controlled system environments. Therefore, the MBR-based partitioning scheme is in the process of being superseded by the [[GUID Partition Table]] (GPT) scheme in new computers. A GPT can coexist with an MBR in order to provide some limited form of backward compatibility for older systems.
 
MBRs are not present on non-partitioned media such as [[floppy|floppies]], [[superfloppy|superfloppies]] or other storage devices configured to behave as such, nor are they necessarily present on drives used in non-PC platforms.
 
== {{Anchor|DISK-TIMESTAMPS}}Overview ==
Support for partitioned media, and thereby the master boot record (MBR), was introduced with IBM [[PC&nbsp;DOS]] 2.0 in March 1983 in order to support the 10&nbsp;MB [[hard disk]] of the then-new [[IBM Personal Computer XT]], still using the [[FAT12]] file system. The original version of the MBR was written by David Litton of IBM in June 1982. The partition table supported up to four ''primary partitions'', of which [[DOS]] could only use one. This did not change when [[FAT16]] was introduced as a new file system with DOS 3.0. Support for an ''[[extended partition]]'', a special primary partition type used as a container to hold other partitions, was added with DOS 3.2, and nested ''logical drives'' inside an extended partition came with DOS 3.30. Since MS-DOS, PC&nbsp;DOS, OS/2 and Windows were never enabled to boot off them, the MBR format and boot code remained almost unchanged in functionality, (except for in some third-party implementations,) throughout the eras of DOS and OS/2 up to 1996.
 
In 1996, support for [[logical block addressing]] (LBA) was introduced in Windows 95B and MS-DOS 7.10 (Not to be confused with IBM PC-DOS 7.1) in order to support disks larger than 8&nbsp;GB. ''Disk timestamps'' were also introduced.<ref name="Sedory_2004_Timestamp"/><!-- TBD: Recheck, if MBR LBA support was really added with 95B/7.1 only, since LBA support in general was added with 95A/7.0 in 1995 already IIRC. --> This also reflected the idea that the MBR is meant to be operating system and file system independent. However, this design rule was partially compromised in more recent Microsoft implementations of the MBR, which enforce [[cylinder-head-sector|CHS]] access for [[FAT16B]] and [[FAT32]] partition types [[Partition type#PID 06h|{{mono|0x06}}]]/[[Partition type#PID 0Bh|{{mono|0x0B}}]], whereas LBA is used for [[Partition type#PID 0Eh|{{mono|0x0E}}]]/[[Partition type#PID 0Ch|{{mono|0x0C}}]].
 
Despite sometimes poor documentation of certain intrinsic details of the MBR format (which occasionally caused compatibility problems), it has been widely adopted as a de facto industry standard, due to the broad popularity of PC-compatible computers and its semi-static nature over decades. This was even to the extent of being supported by computer operating systems for other platforms. Sometimes this was in addition to other pre-existing or [[cross-platform]] standards for bootstrapping and partitioning.<ref name="Lucas_2003_OpenBSD"/>
 
MBR partition entries and the MBR boot code used in commercial operating systems, however, are limited to 32 bits.<ref name="Microsoft_2013_2581408"/> Therefore, the maximum disk size supported on disks using 512-byte sectors (whether real or emulated) by the MBR partitioning scheme (without 3332-bit arithmetic) is limited to 2&nbsp;TiB.<ref name="Microsoft_2013_2581408"/> Consequently, a different partitioning scheme must be used for larger disks, as they have become widely available since 2010. The MBR partitioning scheme is therefore in the process of being superseded by the [[GUID Partition Table]] (GPT). The official approach does little more than ensuring data integrity by employing a ''protective MBR''. Specifically, it does not provide backward compatibility with operating systems that do not support the GPT scheme as well. Meanwhile, multiple forms of ''hybrid MBRs'' have been designed and implemented by third parties in order to maintain partitions located in the first physical 2&nbsp;TiB of a disk in both partitioning schemes "in parallel" and/or to allow older operating systems to boot off GPT partitions as well. The present non-standard nature of these solutions causes various compatibility problems in certain scenarios.
 
The MBR consists of 512 or more [[byte]]s located in the first [[disk sector|sector]] of the drive.
Line 175 ⟶ 178:
|-
| style="text-align:center" | {{anchor|MBRAAP_OFS_1AEh}}<code>0x01AE</code> (430)
| style="text-align:center; background:#F2F2F2" | AAP physical drive (<code>0x80</code>-<code>0xFE</code>; <code>0x00</code>: not used; <code>0x01</code>-<code>0x7F</code>, <code>0xFF</code>: reserved)
| rowspan="6" style="vertical-align:middle; text-align:center; background:#F2F2F2" | ''AAP record'' (optional) (AAP [[#PTE|partition entry]] #0 with special semantics)
| style="text-align:center" | 1
Line 247 ⟶ 250:
|-
| style="text-align:center" | {{anchor|NEWLDR_OFS_008h}}<code>0x0008</code> (8)
| style="text-align:center; background:#F2F2F2" | LOADER physical drive and boot flag (<code>0x80</code>-<code>0xFE</code>, <code>0x00</code>-<code>0x7E</code>, <code>0xFF</code>, <code>0x7F</code>) (if not used, this and following 3 bytes must be all 0)
| style="text-align:center" | 1
|-
Line 259 ⟶ 262:
|-
| style="text-align:center" | {{anchor|NEWLDR_OFS_00Dh}}<code>0x000D</code> (13)
| style="text-align:center; background:#F2F2F2" | Reserved (default: <code>0x000000</code>)<!-- Already used, but it is not documented yet. -->
| style="text-align:center" | 3
|-
Line 604 ⟶ 607:
|}
|-
| {{anchor|PTE_OFS_8h}}{{mono|0x08}} || || 4&nbsp;bytes || [[logical block addressing|LBA]] of first absolute sector in the partition{{Efn|name="note-4"|The number of sectors is an index field; thus, the zero value is invalid, reserved and must not be used in normal partition entries. TheThis entry is used by operating systems in certain circumstances; in such cases the CHS addresses are ignored.<ref name="Microsoft_2000_LBA-Blocks"/>}}
|-
| {{anchor|PTE_OFS_Ch}}{{mono|0x0C}} || || 4&nbsp;bytes || Number of sectors in partition{{Efn|name="note-45"|Zero is reserved and must not be used in normal partition entries. This entry is used by operating systems in certain circumstances; in such cases the CHS addresses are ignored.<ref name="Microsoft_2000_LBA-Blocks"/>}}
|}
 
Line 617 ⟶ 620:
Since block addresses and sizes are stored in the partition table of an MBR using 32 bits, the maximum size, as well as the highest start address, of a partition using drives that have 512-byte sectors (actual or emulated) cannot exceed 2 <abbr title="TebiByte = 1024×1024×1024×1024 byte">[[Tebibyte|TiB]]</abbr>−512 bytes ({{val|2199023255040}} bytes or {{val|4294967295}} (2<sup>32</sup>−1) sectors&nbsp;× 512 (2<sup>9</sup>) bytes per sector).<ref name="Microsoft_2013_2581408"/> Alleviating this capacity limitation was one of the prime motivations for the development of the GPT.
 
Since partitioning information is stored in the MBR partition table using a beginning block address and a length, it may in theory be possible to define partitions in such a way that the allocated space for a disk with 512-byte sectors gives a total size approaching 4 TiB, if all but one partition are located below the 2&nbsp;TiB limit and the last one is assigned as starting at or close to block 2<sup>32</sup>−1 and specify the size as up to 2<sup>32</sup>−1, thereby defining a partition that requires 33 rather than 32 bits for the sector address to be accessed. However, in practice, only certain [[Logical block addressing#LBA48|LBA-48]]-enabled operating systems, including Linux, FreeBSD and Windows 7<ref name="Smith_2011_gdisk"/> that use 64-bit sector addresses internally actually support this. Due to code space constraints and the nature of the MBR partition table to only support 32 bits, boot sectors, even if enabled to support LBA-48 rather than [[Logical block addressing|LBA-28]], often use 32-bit calculations, unless they are specifically designed to support the full address range of LBA-48 or are intended to run on 64-bit platforms only. Any boot code or operating system using 32-bit sector addresses internally would cause addresses to wrap around accessing this partition and thereby result in serious data corruption over all partitions.
 
For disks that present a sector size other than 512 bytes, such as [[USB]] [[external drive]]s, there are limitations as well. A sector size of 4096 results in an eight-fold increase in the size of a partition that can be defined using MBR, allowing partitions up to 16 TiB (2<sup>32</sup>&nbsp;×&nbsp;4096&nbsp;bytes) in size.<ref name="Superuser_2013"/> Versions of Windows more recent than Windows XP support the larger sector sizes, as well as Mac OS X, and [[Linux]] has supported larger sector sizes since 2.6.31<ref name="Seagate_4K"/> or 2.6.32,<ref name="Western-Digital_1"/> but issues with boot loaders, partitioning tools and computer BIOS implementations present certain limitations,<ref name="IBM_4K"/> since they are often hard-wired to reserve only 512 bytes for sector buffers, causing memory to become overwritten for larger sector sizes. This may cause unpredictable behaviour as well, and therefore should be avoided when compatibility and standard conformity is an issue.
Line 624 ⟶ 627:
 
== System bootstrapping ==
On [[IBM PC-compatible]] computers, the [[bootstrapping]] [[firmware]] (contained within the [[read-only memory|ROM]] [[BIOS]]) loads and executes the master boot record.<ref name="OSDev_2011_MBR"/> The [[PC XT|PC/XT (type 5160)]] used an [[Intel 8088]] [[Computer processor|microprocessor]]. In order to remain compatible, all x86 BIOS architecture systems start with the microprocessor in an [[X86#Operating modes|operating mode]] referred to as [[real mode]]. The BIOS reads the MBR from the storage device into [[physical memory]], and then it directs the microprocessor to the start of the boot code. Since theThe BIOS runswill in real mode,switch the processor is into real mode, whenthen thebegin MBRto programexecute beginsthe toMBR executeprogram, and so the beginning of the MBR is expected to contain real-mode [[machine code]].<ref name="OSDev_2011_MBR"/>
 
Since the BIOS bootstrap routine loads and runs exactly one sector from the physical disk, having the partition table in the MBR with the boot code simplifies the design of the MBR program. It contains a small program that loads the [[Volume Boot Record]] (VBR) of the targeted partition. Control is then passed to this code, which is responsible for loading the actual operating system. This process is known as [[chain loading]].
Line 637 ⟶ 640:
 
== Disk identity{{anchor|ID}} ==
[[File:Qtparted-usb-hdd-snapshot.png|thumb|300px|Information contained in the partition table of an external hard drive as it appears in the utility program [[QtParted]], running under Linux (with KDE)]]
In addition to the bootstrap code and a partition table, master boot records may contain a [[#DISK_ID|disk signature]]. This is a 32-bit value that is intended to identify uniquely the disk medium (as opposed to the disk unit—the two not necessarily being the same for removable hard disks).
 
Line 677 ⟶ 680:
* [[CS register|CS]]:[[IP register|IP]] = {{mono|0x0000}}:{{mono|0x7C00}} (fixed)
: Some Compaq BIOSes erroneously use {{mono|0x07C0}}:{{mono|0x0000}} instead. While this resolves to the same location in real mode memory, it is non-standard and should be avoided, since MBR code assuming certain register values or not written to be relocatable may not work otherwise.
* {{cn span|date=April 2021|text=[[DL register|DL]] = boot drive unit ([[fixed disk]]s / [[removable drive]]s: {{mono|0x80}} = first, {{mono|0x81}} = second, ..., {{mono|0xFE}}; [[floppy|floppies]] / [[superfloppy|superfloppies]]: {{mono|0x00}} = first, {{mono|0x01}} = second, ..., {{mono|0x7E}}; values {{mono|0x7F}} and {{mono|0xFF}} are reserved for ROM / remote drives and must not be used on disk<!-- by Microsoft/IBM and Digital Research/Novell/Caldera. -->).}}<ref name="Paul_1997"/><ref name="Paul_2017"/>
: DL is supported by IBM BIOSes as well as most other BIOSes. The Toshiba T1000 BIOS is known not to support this properly, and some old Wyse 286 BIOSes use DL values greater or equal to 2 for fixed disks (thereby reflecting the logical drive numbers under DOS rather than the physical drive numbers of the BIOS). USB sticks configured as removable drives typically get an assignment of DL = {{mono|0x80}}, {{mono|0x81}}, etc. However, some rare BIOSes<!-- In ca. 2002-2003. --> erroneously presented them under DL = {{mono|0x01}}, just as if they were configured as superfloppies.
: A standard conformant BIOS assigns numbers greater or equal to {{mono|0x80}} exclusively to fixed disk / removable drives, and traditionally only values {{mono|0x80}} and {{mono|0x00}} were passed on as physical drive units during boot. By convention, only fixed disks / removable drives are partitioned, therefore, the only DL value a MBR could see traditionally was {{mono|0x80}}. Many MBRs were coded to ignore the DL value and work with a hard-wired value (normally {{mono|0x80}}), anyway.
Line 695 ⟶ 698:
* CS:IP = {{mono|0x0000}}:{{mono|0x7C00}}{{efn|name="NB_CS-IP"}} (constant)
* DL = boot drive unit (see above)
: MS-DOS 2.0-70–7.0 / PC &nbsp;DOS 2.0-60–6.3<!-- Not sure about PC DOS 7.0/2000 and 7.10 right now. --> MBRs do not pass on the DL value received on entry, but they rather use the boot status entry in the partition table entry of the selected primary partition as physical boot drive unit. Since this is, by convention, {{mono|0x80}} in most MBR partition tables, it won't change things unless the BIOS attempted to boot off a physical device other than the first fixed disk / removable drive in the row. This is also the reason why these operating systems cannot boot off a second hard disk, etc. Some FDISK tools allow to mark partitions on secondary disks as "active" as well. In this situation, knowing that these operating systems cannot boot off other drives anyway, some of them continue to use the traditionally fixed value of {{mono|0x80}} as active marker, whereas others use values corresponding with the currently assigned physical drive unit ({{mono|0x81}}, {{mono|0x82}}), thereby allowing tobooting boot offfrom other drives, at least in theory. In fact, this will work with many MBR codes, which take a set bit 7 of the boot status entry as active flag rather than insisting on {{mono|0x80}}, however, MS-DOS/PC &nbsp;DOS MBRs are hard-wired to accept the fixed value of {{mono|0x80}} only. Storing the actual physical drive number in the partition table will also cause problems, when the BIOS assignment of physical drives changes, for example when drives are removed, added or swapped. Therefore, for a normal MBR accepting bit 7 as active flag and otherwise just using and passing on to the VBR the DL value originally provided by the BIOS allows for maximum flexibility. MS-DOS 7.1 - 81–8.0 MBRs have changed to treat bit 7 as active flag and any values {{mono|0x01}}..{{mono|0x7F}} as invalid, but they still take the physical drive unit from the partition table rather than using the DL value provided by the BIOS. DR-DOS 7.07 extended MBRs treat bit 7 as active flag and use and pass on the BIOS DL value by default (including non-standard values {{mono|0x00}}..{{mono|0x01}} used by some BIOSes also for partitioned media), but they also provide a special [[#NEWLDR|NEWLDR]] configuration block in order to support alternative boot methods in conjunction with LOADER and REAL/32 as well as to change the detail behaviour of the MBR, so that it can also work with drive values retrieved from the partition table (important in conjunction with LOADER and AAPs, see NEWLDR offset <code>[[#NEWLDR_OFS_00Ch|0x000C]]</code>), translate Wyse non-standard drive units {{mono|0x02}}..{{mono|0x7F}} to {{mono|0x80}}..{{mono|0xFD}}, and optionally fix up the drive value (stored at offset <code>[[Design of the FAT file system#EBPB_OFS_19h|0x019]]</code> in the [[Extended BIOS Parameter Block]] (EBPB)<!-- In OS/2, DOS 4.0 and NT. --> or at sector offset <code>[[Design of the FAT file system#BSIBM_OFS_1FDh|0x01FD]]</code> <!-- in DOS 3.2 to 3.31. --> ) in loaded VBRs before passing execution to them (see NEWLDR offset <code>[[#NEWLDR_OFS_014h|0x0014]]</code>)—this also allows other boot loaders to use NEWLDR as a chain-loader, configure its in-memory image on the fly and "tunnel" the loading of VBRs, EBRs, or AAPs through NEWLDR.
* The contents of DH and ES:DI should be preserved by the MBR for full Plug-and-Play support (see above), however, many MBRs, including those of MS-DOS 2.0 - 80–8.0 / PC &nbsp;DOS 2.0 - 60–6.3<!-- Not sure about PC DOS 7.0/2000 and 7.1 right now. --> and Windows NT/2000/XP, do not. (This is unsurprising, since those versions of DOS predate the Plug-and-Play BIOS standard, and previous standards and conventions indicated no requirements to preserve any register other than DL.) Some MBRs<!-- DR-DOS 7.07, Windows Vista/7, but not Windows 2000/XP. --> set DH to 0.
 
The MBR code passes additional information to the VBR in many implementations:
* DS:SI = points to the 16-byte [[MBR partition table]] entry (in the relocated MBR) corresponding with the activated VBR. [[PC-MOS]] 5.1 depends on this to boot if no partition in the partition table is flagged as bootable. In conjunction with LOADER, [[Multiuser DOS]] and [[REAL/32]] boot sectors use this to locate the boot sector of the active partition (or another bootstrap loader like IBMBIO.LDR at a fixed position on disk) if the boot file (LOADER.SYS) could not be found. [[PTS-DOS]] 6.6<!-- TBD: not sure about 6.5x right now. --> and [[S/DOS]] 1.0 use this in conjunction with their [[Advanced Active Partition]] (AAP) feature. In addition to support for LOADER and AAPs, DR-DOS 7.07 can use this to determine the necessary INT 13h access method when using its dual CHS/LBA VBR code and it will update the boot drive / status flag field in the partition entry according to the effectively used DL value. [[Apple Darwin|Darwin]] bootloaders (Apple's <code>boot1h</code>, <code>boot1u</code>, and David Elliott's <code>boot1fat32</code>) depend on this pointer as well, but additionally they don't use DS, but assume it to be set to {{mono|0x0000}} instead.<ref name="Elliott_2009_Darwin"/> This will cause problems if this assumption is incorrect. The MBR code of OS/2<!-- TBD: Recheck! -->, MS-DOS 2.0 to 8.0, PC &nbsp;DOS 2.0 to 7.10 and Windows NT/2000/XP provides this same interface as well, although these systems do not use it.<!-- Editor's note: I'm not sure about PC DOS 7.1 right now. --> The Windows Vista/7 MBRs no longer provide this DS:SI pointer. While some extensions only depend on the 16-byte partition table entry itself, other extensions may require the whole 4 (or 5 entry) partition table to be present as well.
* DS:[[BP register|BP]] = optionally points to the 16-byte [[MBR partition table]] entry (in the relocated MBR) corresponding with the activated VBR. This is identical to the pointer provided by DS:SI (see above) and is provided by MS-DOS 2.0-80–8.0, PC &nbsp;DOS 2.0-70–7.10, Windows NT/2000/XP/Vista/7 MBRs<!-- TBD: Check OS/2 and early NT. -->. It is, however, not supported by most third-party MBRs.
 
Under DR-DOS 7.07 an extended interface may be optionally provided by the extended MBR and in conjunction with LOADER:
Line 720 ⟶ 723:
Some third-party utilities may also be used for directly editing the contents of partition tables (without requiring any knowledge of hexadecimal or disk/sector editors), such as [[MBRwizard|MBRWizard]].{{efn|name="NB_PTEDIT32"}}
 
<code>dd</code> is also a POSIX command commonly used POSIX command to read or write to any location on a storage device, MBR included. In [[Linux]], ms-sys may be used to install a Windows MBR. The [[GRUB]] and [[LILO (boot loader)|LILO]] projects have tools for writing code to the MBR sector, namely <code>grub-install</code> and <code>lilo -mbr</code>. The GRUB Legacy interactive console can write to the MBR, using the <code>setup</code> and <code>embed</code> commands, but GRUB2 currently requires <code>grub-install</code> to be run from within an operating system.
 
Various programs are able to create a "[[backup]]" of both the primary partition table and the logical partitions in the extended partition.
 
Linux <code>sfdisk</code> (on a [[SystemRescueCD]]) is able to save a backup of the primary and extended partition table. It creates a file that can be read in a text editor, or this file can be used by sfdisk to restore the primary/extended partition table. An example command to back up the partition table is <code>sfdisk -d /dev/hda > hda.out</code> and to restore is <code>sfdisk /dev/hda < hda.out</code>. It is possible to copy the partition table from one disk to another this way, useful for setting up mirroring, but sfdisk executes the command without prompting/warnings using <code>sfdisk -d /dev/sda | sfdisk /dev/sdb</code>.<ref name="Linux_MAN_sfdisk"/>
 
== Main Boot Record ==
In June 2020 [[FreeBSD]] changed their wording from "Master Boot Record" to "Main Boot Record"<ref>[https://lists.freebsd.org/pipermail/svn-src-head/2020-June/137316.html FreeBSD svn commit: r362466]</ref> 10 days after GitHub changed their default branch from master to main [[List of name changes due to the George Floyd protests|in response to the George Floyd protests]]. This commit was reverted very quickly as it was pushed without prior review by the community; currently FreeBSD sticks to the name "Master Boot Record".<ref>https://svnweb.freebsd.org/base?view=revision&revision=362488</ref>
 
== See also ==
Line 775:
<ref name="Lucas_2003_OpenBSD">{{cite book |title=Absolute OpenBSD: Unix for the practical paranoid |author-first=Michael |author-last=Lucas |page=73 |date=2003 |isbn=9781886411999 |url=https://books.google.com/books?id=wuUuTXMkNx8C&pg=PA72 |access-date=2011-04-09 |quote=Every operating system includes tools to manage MBR partitions. Unfortunately, every operating system handles MBR partitions in a slightly different manner.}}</ref>
<ref name="Smith_2000_Multi-Boot">{{cite book |title=The Multi-Boot Configuration Handbook |author-first=Roderick W. |author-last=Smith |pages=[https://archive.org/details/isbn_9780789722836/page/260 260–261] |date=2000 |publisher=[[Que Publishing]] |isbn=0-7897-2283-6 |url=https://archive.org/details/isbn_9780789722836/page/260}}</ref>
<ref name="Brouwer_2012_Types-1">{{cite web |title=List of partition identifiers for PCs |author-first=Andries Evert |author-last=Brouwer |author-link=Andries Evert Brouwer |work=Partition types |date=2013 |orig-yeardate=1995 |url=http://www.win.tue.nl/~aeb/partitions/partition_types-1.html |access-date=2017-08-24 |url-status=live |archive-url=https://web.archive.org/web/20170824112750/http://www.win.tue.nl/~aeb/partitions/partition_types-1.html |archive-date=2017-08-24}}</ref>
<ref name="Brouwer_2003_Types-2A">{{cite web |title=Properties of partition tables |author-first=Andries Evert |author-last=Brouwer |author-link=Andries Evert Brouwer |work=Partition types |date=2004-04-22 |orig-yeardate=2000 |url=http://www.win.tue.nl/~aeb/partitions/partition_types-2.html |access-date=2017-08-24 |url-status=live |archive-url=https://web.archive.org/web/20170824112413/http://www.win.tue.nl/~aeb/partitions/partition_types-2.html |archive-date=2017-08-24 |quote=Matthias [R.] Paul writes: "[…] [[PTS-DOS]] [uses] a special fifth partition entry in front of the other four entries in the MBR and corresponding AAP-aware MBR bootstrap code. […]"}}</ref>
<ref name="Brouwer_2003_Types-2B">{{cite web |title=Properties of partition tables |author-first=Andries Evert |author-last=Brouwer |author-link=Andries Evert Brouwer |work=Partition types |date=2004-04-22 |orig-yeardate=2000 |url=http://www.win.tue.nl/~aeb/partitions/partition_types-2.html |access-date=2017-08-24 |url-status=live |archive-url=https://web.archive.org/web/20170824112413/http://www.win.tue.nl/~aeb/partitions/partition_types-2.html |archive-date=2017-08-24 |quote=Some OEM systems, such as AST DOS (<!-- Partition ID. -->type <code>[[Partition type#PID_14h|14<sub>hex</sub>]]</code>) and NEC DOS (type <code>[[Partition type#PID_24h|24<sub>hex</sub>]]</code>) had 8 instead of 4 partition entries in their MBR sectors. (Matthias R. Paul).}} (NB. [[NEC]] [[MS-DOS]] 3.30 and [[AST Research|AST]] MS-DOS partition tables with eight entries are preceded with a signature <code>A55A<sub>hex</sub></code><!-- Byte sequence 5Ah, A5h. --> at offset {{mono|0x017C}}.)</ref>
<ref name="Sedory_2007_DOS33MBR">{{cite web |title=Notes on the Differences in one OEM version of the DOS 3.30 MBR |date=2007-05-18 |orig-yeardate=2003 |author-first=Daniel B. |author-last=Sedory |work=Master Boot Records |url=http://thestarman.pcministry.com/asm/mbr/DOS33MBR.htm |access-date=2017-08-24 |url-status=live |archive-url=https://web.archive.org/web/20170824003525/http://thestarman.pcministry.com/asm/mbr/DOS33MBR.htm |archive-date=2017-08-24 |quote=When we added partitions to this NEC table, the first one was placed at offsets {{mono|0x01EE}}<!-- Actually, the author writes +7EEh, but this is just an artefact of how the dump was loaded in memory during his analysis. The actual offset is +1EEh. Aligned offsets to the start of the sector here in order to avoid confusion. --> through {{mono|0x01FD}}<!-- See preceding comment. --> and the next entry was added just above it. So, the entries are inserted and listed backwards from that of a normal Table. Thus, looking at such a Table with a disk editor or partition listing utility, it would show the first entry in a NEC eight-entry table as being the last one (fourth entry) in a normal Partition Table.}} (NB. Shows an 8-entry partition table and where its boot code differs from MS-DOS 3.30.)</ref>
<ref name="Microsoft_2000_LBA-Blocks">{{Cite book |publisher=[[Microsoft Press]] |date=2002 |title=Microsoft Windows 2000 Server Operations Guide |author-first=Sybil |author-last=Wood |page=[https://archive.org/details/microsoftwindows00wood/page/18 18] |isbn=978-0-73561796-4 |url=https://archive.org/details/microsoftwindows00wood/page/18}}</ref>
<ref name="RBIL_html">{{cite web |title=Ralf Browns Interrupt List (v61 html) |author-first=Ralf D. |author-last=Brown |author-link=Ralf D. Brown |date=2000-07-16 |publisher=Delorie Software |url=http://www.delorie.com/djgpp/doc/rbinter/id/13/6.html |access-date=2016-11-03}}</ref>
Line 785:
<ref name="OSDev_2011_MBR">{{cite web |title=MBR (x86) |work=OSDev Wiki |date=2012-03-05 |publisher=OSDev.org |url=http://wiki.osdev.org/index.php?title=MBR_(x86)&oldid=12904 |access-date=2013-04-20 |url-status=live |archive-url=https://web.archive.org/web/20170824003752/http://wiki.osdev.org/index.php?title=MBR_(x86)&oldid=12904 |archive-date=2017-08-24}}</ref>
<ref name="Sedory_2003_MBR200">{{cite web |title=IBM DOS 2.00 Master Boot Record |author-first=Daniel B. |author-last=Sedory |date=2003-07-30 |publisher=The Starman's Realm |url=http://thestarman.pcministry.com/asm/mbr/200MBR.htm |access-date=2011-07-22 |url-status=live |archive-url=https://web.archive.org/web/20170824003921/http://thestarman.pcministry.com/asm/mbr/200MBR.htm |archive-date=2017-08-24}}</ref>
<ref name="Singh_2009_OSX">{{cite web |title=Booting Mac OS X |author-first=Amit |author-last=Singh |date=2009-12-25 |orig-yeardate=December 2003 |publisher=Mac OS X Internals: The Book |url=http://osxbook.com/book/bonus/ancient/whatismacosx/arch_boot.html |access-date=2011-07-22}}</ref>
<ref name="Boyne_2011_EFI-Boot">{{cite web |title=The EFI boot process |author-first=Jonathan |author-last=de Boyne Pollard |work=Frequently Given Answers |date=2011-07-10 |url=http://jdebp.eu./FGA/efi-boot-process.html |access-date=2011-07-22 |url-status=live |archive-url=https://web.archive.org/web/20170824004128/http://jdebp.eu./FGA/efi-boot-process.html |archive-date=2017-08-24}}</ref>
<ref name="Domsch_2003_EDD">{{cite web |title=Re: RFC 2.6.0 EDD enhancements |work=Linux Kernel Mailing List |author-first=Matt |author-last=Domsch |date=2005-03-22 |orig-yeardate=2003-12-19 |url=https://lkml.org/lkml/2003/12/19/139 |access-date=2017-08-24 |url-status=live |archive-url=https://web.archive.org/web/20170824004143/https://lkml.org/lkml/2003/12/19/139 |archive-date=2017-08-24}}</ref>
<ref name="Microsoft_KB227704">{{cite web |url=http://support.microsoft.com/kb/227704 |publisher=[[Microsoft]] |author=<!--Staff writer(s); no by-line.--> |work=KnowledgeBase |title=Windows may use Signature() syntax in the BOOT.INI file}}</ref>
<ref name="Tech-Juice_2011_Geometry">{{cite web |title=An Introduction to Hard Disk Geometry |work=Tech Juice |author=<!--Staff writer(s); no by-line.--> |date=2012-12-06 |orig-yeardate=2011-08-08 |url=http://www.tech-juice.org/2011/08/08/an-introduction-to-hard-disk-geometry/ |url-status=dead |archive-url=https://web.archive.org/web/20130204205616/http://www.tech-juice.org/2011/08/08/an-introduction-to-hard-disk-geometry/ |archive-date=2013-02-04}}</ref>
<ref name="PC-Guide_BIOS">{{cite web |author-first=Charles M. |author-last=Kozierok |title=BIOS and the Hard Disk |work=The PC Guide |date=2001-04-17 |url=http://www.pcguide.com/ref/hdd/bios/bios.htm |access-date=2013-04-19 |url-status=live |archive-url=https://web.archive.org/web/20170617080653/http://www.pcguide.com/ref/hdd/bios/bios.htm |archive-date=2017-06-17}}</ref>
<ref name="Smith_2011_gdisk">{{cite web |author-first=Robert |author-last=Smith |title=Working Around MBR's Limitations |work=GPT fdisk Tutorial |date=2011-06-26 |url=http://www.rodsbooks.com/gdisk/workarounds.html |access-date=2013-04-20 |url-status=live |archive-url=https://web.archive.org/web/20170824114940/http://www.rodsbooks.com/gdisk/workarounds.html |archive-date=2017-08-24}}</ref>
Line 801:
<ref name="Elliott_2010_EDD4-Hybrid-MBR">{{cite web |author-first=Robert |author-last=Elliott |id=e09127r3 |title=EDD-4 Hybrid MBR boot code annex |publisher=[[Hewlett Packard]], T13 Technical Committee |date=2010-01-04 |url=http://www.t13.org/Documents/UploadedDocuments/docs2010/e09127r3-EDD-4_Hybrid_MBR_boot_code_annex.pdf |access-date=2013-04-20 |url-status=live |archive-url=https://web.archive.org/web/20170824121640/http://www.t13.org/Documents/UploadedDocuments/docs2010/e09127r3-EDD-4_Hybrid_MBR_boot_code_annex.pdf |archive-date=2017-08-24}}</ref>
<ref name="Microsoft_KB69013">{{cite web |title=FDISK /MBR rewrites the Master Boot Record |work=Support |publisher=[[Microsoft]] |author=<!--Staff writer(s); no by-line.--> |date=2011-09-23 |id=69013 |version=1 |url=http://support.microsoft.com/kb/69013 |access-date=2013-04-19 |url-status=live |archive-url=https://web.archive.org/web/20170208102308/https://support.microsoft.com/en-us/help/69013/fdisk-mbr-rewrites-the-master-boot-record |archive-date=2017-02-08}}</ref>
<ref name="Linux_MAN_sfdisk">{{cite web |title=sfdisk(8) – Linux man page |work=die.net |date=2013 |orig-yeardate=2007 |author=<!--Staff writer(s); no by-line.--> |url=http://linux.die.net/man/8/sfdisk |access-date=2013-04-20 |url-status=live |archive-url=https://web.archive.org/web/20170824121954/https://linux.die.net/man/8/sfdisk |archive-date=2017-08-24}}</ref>
<ref name="Elliott_2009_Darwin">{{cite web |author-first=David F. |author-last=Elliott |title=Why does the "standard" MBR set SI? |work=tgwbd.org |date=2009-10-12 |url=http://tgwbd.org/blog/2009/10/12/why-does-the-standard-mbr-set-SI/ |access-date=2013-04-20 |url-status=live |archive-url=https://web.archive.org/web/20170824122006/http://tgwbd.org/blog/2009/10/12/why-does-the-standard-mbr-set-SI/ |archive-date=2017-08-24}}</ref>
<ref name="Microsoft_2013_2581408">{{cite web |title=Windows support for hard disks that are larger than 2 TB |publisher=[[Microsoft]] |date=2013-06-26 |id=2581408 |version=1 |url=http://support.microsoft.com/kb/2581408 |access-date=2013-08-28 |url-status=live |archive-url=https://web.archive.org/web/20170427084734/https://support.microsoft.com/en-us/help/2581408/windows-support-for-hard-disks-that-are-larger-than-2-tb |archive-date=2017-04-27}}</ref>
<ref name="Superuser_2013">{{cite web |title=More than 2 TiB on a MBR disk |date=2013-03-07 |publisher=superuser.com |url=http://superuser.com/questions/562331/mbr-partition-with-more-than-2-tb |access-date=2013-10-22 |url-status=live |archive-url=https://web.archive.org/web/20170824122749/https://superuser.com/questions/562331/mbr-partition-with-more-than-2-tb |archive-date=2017-08-24}}</ref>
 
<ref name="FOLDOC">{{cite web |author-first=Denis |author-last=Howe |title=master boot record |website=[[FOLDOC]] |date=2009-05-19 |orig-year=1985 |url=http://foldoc.org/master+boot+record |access-date=2015-05-02 |url-status=dead |archive-url=https://web.archive.org/web/20170824002628/https://foldoc.org/master%20boot%20record |archive-date=24 August 2017 }}</ref>
<!-- <ref name="osdevFOLDOC">{{cite web |author-first=Denis |author-last=Howe |title=Partitionmaster Tableboot record |publisherwebsite=osdev.org[[FOLDOC]] |date=20172009-0305-1819 |orig-yeardate=2007-03-061985 |url=http://wiki.osdevfoldoc.org/Partition_Tablemaster+boot+record |access-date=20172015-0805-2402 |url-status=livedead |archive-url=https://web.archive.org/web/2017082412323520170824002628/httphttps://wiki.osdevfoldoc.org/Partition_Tablemaster%20boot%20record |archive-date=2017-08-24 August 2017 }}</ref>-->
 
<ref name="FOLDOCosdev">{{cite web |author-first=Denis |author-last=Howe |title=masterPartition boot recordTable |websitepublisher=[[FOLDOC]]osdev.org |date=20092017-0503-1918 |orig-yeardate=19852007-03-06 |url=http://foldocwiki.osdev.org/master+boot+recordPartition_Table |access-date=20152017-0508-0224 |url-status=deadlive |archive-url=https://web.archive.org/web/2017082400262820170824123235/httpshttp://foldocwiki.osdev.org/master%20boot%20recordPartition_Table |archive-date=2017-08-24 August 2017 }}</ref>
<ref name="Paul_1997">{{cite web |author-first=Matthias R. |author-last=Paul |title=Caldera OpenDOS 7.01/7.02 Update Alpha 3 IBMBIO.COM - README.TXT and BOOT.TXT - A short description of how OpenDOS is booted |url=http://www.uni-bonn.de/~uzs180/download/ibmbioa3.zip |date=1997-10-02 |orig-date=1997-09-29 |access-date=2009-03-29 |url-status=dead |archive-url=https://web.archive.org/web/20031004074600/http://www-student.informatik.uni-bonn.de/~frinke/ibmbioa3.zip |archive-date=2003-10-04}} [https://web.archive.org/web/20181225154705/http://mirror.macintosharchive.org/max1zzz.co.uk/+Windows%20&%20DOS/DOS/System/Novell/Support/Bins/Op702src.zip<!-- Op702src.zip is an unofficial renamed distribution of the ibmbioa3.zip file -->]</ref>
<ref name="Paul_2017">{{cite web |title=The continuing saga of Windows 3.1 in enhanced mode on OmniBook 300 |author-first=Matthias R. |author-last=Paul |orig-date=2017-08-07 |date=2017-08-14 |work=MoHPC - the Museum of HP Calculators |url=http://hpmuseum.org/forum/thread-8774-post-77196.html#pid77196 |access-date=2018-05-01 |url-status=live |archive-url=https://web.archive.org/web/20180501185933/http://hpmuseum.org/forum/thread-8774-post-77196.html |archive-date=2018-05-01 |quote=[…] SYS […] /O[:nnn] Override IPL reported boot drive unit (n=0..126, 128..254). […] Preparing target disk... Choosing FAT12 CHS Boot Sector (requires IPL to report boot unit). Treating target as diskette or superfloppy medium (boot drive unit 0). Writing new Boot Sector... […]}} (NB. SYS writes [[volume boot record]]s rather than master boot records, but their incoming register interface is similar (with extensions) since they could both be loaded initially by the underlying system.)</ref>
}}
 
== Further reading ==
* {{cite web |title=Partitions and Volumes |work=PC Lube & Tune |author-first=Howard |author-last=Gilbert |date=1996-01-01 |orig-yeardate=1995 |url=http://www.yale.edu/pclt/BOOT/PARTITIO.HTM |url-status=dead |archive-url=https://web.archive.org/web/20160303210749/http://www.yale.edu/pclt/BOOT/PARTITIO.HTM |archive-date=2016-03-03}}
* {{cite web |title=Ray's Place |work=MBR and Windows Boot Sectors (includes code disassembly and explanations of boot process) |author-first=Ray |author-last=Knights |date=2004-12-22 |orig-yeardate=2000-12-16 |url=http://www.rayknights.org/pc_boot/pc_boot.htm |access-date=2017-08-24 |url-status=live |archive-url=https://web.archive.org/web/20170824133034/http://www.rayknights.org/pc_boot/pc_boot.htm |archive-date=2017-08-24}}
* {{cite web |title=Master Boot Record |work=How It Works |author-first=Hale |author-last=Landis |date=2002-05-06 |url=http://www.ata-atapi.com/hiwmbr.html |url-status=dead |archive-url=https://web.archive.org/web/20140701052540/http://www.ata-atapi.com/hiwmbr.html |archive-date=2014-07-01}}
* {{cite web |title=MBRs (Master Boot Records) |work=Boot Records Revealed |author-first=Daniel B. |author-last=Sedory |date=2015-06-25 |orig-yeardate=2007 |url=http://thestarman.pcministry.com/asm/mbr/index.html |access-date=2017-08-24 |url-status=live |archive-url=https://web.archive.org/web/20170824133321/http://thestarman.pcministry.com/asm/mbr/index.html |archive-date=2017-08-24}} [https://web.archive.org/web/20070510140812/http://mirror.href.com/thestarman/asm/mbr/index.html] [http://thestarman.narod.ru/asm/mbr/index.html]
 
== External links ==
* [http://wiki.osdev.org/MBR_(x86) Article on master boot record]
* [https://neosmart.net/wiki/mbr-boot-process/ The MBR and how it fits into the BIOS boot process]
 
{{Firmware and booting}}
 
[[Category:BIOS]]