BIOS boot partition: Difference between revisions

Content deleted Content added
- parent cat per WP:SUBCAT
Overview: full quote
 
(6 intermediate revisions by 6 users not shown)
Line 1:
{{Short description|Partition used by GNU GRUB on BIOS to boot an operating system with GUID Partition Table}}
{{Refimprove|date=June 2014}}
 
Line 15 ⟶ 16:
When used, the BIOS boot partition contains the second stage of the [[boot loader]] program, such as the GRUB&nbsp;2; the first stage is the code that is contained within the [[Master Boot Record]] (MBR). Use of this partition is not the only way BIOS-based boot can be performed while using GPT-partitioned hard drives; however, complex boot loaders such as GRUB 2 cannot fit entirely within the confines of the MBR's 398<!-- MBR with disk timestamp, disk signature, AAP and NEWLDR support --> to 446<!-- classic MBR without any extensions --> bytes of space, thus they need an ancillary storage space. On MBR disks, such boot loaders typically use the sectors immediately following the MBR for this storage; that space is usually known as the "MBR gap". No equivalent unused space exists on GPT disks, and the BIOS boot partition is a way to officially allocate such space for use by the boot loader.
 
The [[globally unique identifier]] (GUID) for the BIOS boot partition in the GPT scheme is {{samp|21686148-6449-6E6F-744E-656564454649<sub>16</sub>}}<ref>{{cite web
| url = https://www.gnu.org/software/grub/manual/html_node/BIOS-installation.html
| title = GNU GRUB Installation, Section 3.4: BIOS installation
| accessdate = 2014-06-26
| website = gnu.org
}}</ref>
}}</ref> (which, when written to a GPT in the required little endian fields, forms the ASCII string "<tt>Hah!IdontNeedEFI</tt>").<!-- See talk page for some notes on endianness confusion. --> In the context of GPT on a BIOS-based computer, a BIOS boot partition is similar in some respects to the [[EFI system partition]], which is used by systems based on [[Extensible Firmware Interface|EFI]]. The EFI System partition holds a filesystem and files used by the UEFI, while the BIOS boot partition is used in BIOS-based systems and accessed without a filesystem by holding raw binary code.
<ref>
{{cite web
| url = https://sourceforge.net/p/gptfdisk/code/ci/master/tree/parttypes.cc
| title = parttypes.cc in the gptfdisk source code
| accessdate = 2023-05-03
| website = gptfdisk project on sourceforge.net
}}</ref> (which, when written to a GPT in the required little endian fields, forms the ASCII string "<ttcode>Hah!IdontNeedEFI</ttcode>").<!-- See talk page for some notes on endianness confusion. --> In the context of GPT on a BIOS-based computer, a BIOS boot partition is similar in some respects to the [[EFI system partition]], which is used by systems based on [[Extensible Firmware Interface|EFI]]. The EFI System partition holds a filesystem and files used by the UEFI, while the BIOS boot partition is used in BIOS-based systems and accessed without a filesystem by holding raw binary code.
 
The size requirements for a BIOS boot partition are quite low so it can be as small as about 30&nbsp;KiB; however, as future boot loaders might require more space, 1&nbsp;MiB might be a reasonable BIOS boot partition size. Due to the [[1 MB partition alignment|1&nbsp;MiB partition alignment]] policies used by most modern disk partitioning tools to provide optimum performance with [[Advanced Format]] disks, [[Solid-state drive|SSD devices]] and certain [[RAID]] configurations, some room is left allowing the placement of a BIOS boot partition between the GPT and the first partition aligned that way (34&ndash;2047 for 512-byte sectors; 6&ndash;255 for 4096-byte sectors). If created by utilizing that free space, the BIOS boot partition would be out of the GPT alignment specification,<ref>See buthttps://uefi.org/specs/UEFI/2.10/05_GUID_Partition_Table_Format.html, that"GPT ispartitions notshould verybe important{{citationaligned needed|date=Juneto 2017|reason=Whothe sayslarger itof: isGPT unimportant?partitions Isshould thisbe justaligned opinionto orthe islarger itof: declareda in theThe partitioningphysical standardblock /boundary, bootloader'sif documentation?any; Evenb if itThe isoptimal *written*transfer tolength rarelygranularity, itif isany."</ref> *read*but everythat boot,is andnot anythingvery thatimportant clobberssince: it(a) willthe preventalignment therule systemis from"should" beingand ablenot to"must" boot.}}(b) sincethe itrule is writtenbased toon a performance consideration, which for a very infrequentlysmall partition used only at system boot bears no real consequence.
 
== Creation ==
Line 42 ⟶ 50:
== External links ==
* [https://www.gnu.org/software/grub/manual/html_node/BIOS-installation.html#BIOS-installation BIOS installation], part of the GRUB2 documentation
* [http://www.funtoo.org/wiki/GUID_Booting_Guide The Funtoo Linux GUID Booting Guide]
* [http://www.rodsbooks.com/gdisk/booting.html Booting from GPT], part of the GPT fdisk documentation
* [http://www.rodsbooks.com/gdisk/bios.html Legacy BIOS issues with GPT], February 22, 2014, by Rod Smith