[go: nahoru, domu]

Master boot record: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
removed weasel word, clarified
Tags: Mobile edit Mobile web edit
 
(7 intermediate revisions by 6 users not shown)
Line 2:
{{About|an 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}}
 
{{Use list-defined references|date=January 2022}}
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]].
 
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 MBR holds the information on how the disc's sectors (aka “blocks”) are divided into partitions, each partition notionally containing a 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, or in conjunction with each partition's volume boot record (VBR). This MBR code is usually referred to as a boot loader.
 
The MBR holds the information on how the disc's sectors (aka “blocks”"blocks") are divided into partitions, each partition notionally containing a 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, or in conjunction with each partition's volume boot record (VBR). This MBR code is usually referred to as a boot loader.
 
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 utilizing 32-bit arithmetic or 4096-byte sectors are not officially supported, as they fatally break compatibility with existing boot loaders, most MBR-compliant operating systems and associated system tools, and may 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.
Line 12 ⟶ 14:
 
== {{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}}]]. balls
 
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"/>
Line 625 ⟶ 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. The BIOS will switch the processor to 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]].