Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
GNU GRUB
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Startup on systems using [[BIOS]] firmware ==== * See illustration in last image on the right.<ref>{{Cite web|title=GNU GRUB Manual 2.04|url=https://www.gnu.org/software/grub/manual/grub/grub.html#Images|access-date=2020-11-10|website=www.gnu.org|archive-date=April 3, 2018|archive-url=https://web.archive.org/web/20180403023208/http://www.gnu.org/software/grub/manual/grub/grub.html#Images|url-status=live}}</ref> * <code>boot.img</code> ('''stage 1''') is written to the first 440 bytes of the [[Master boot record|Master Boot Record]] (MBR boot code in sector 0), or optionally in a [[partition boot sector]] (PBR). It addresses <code>diskboot.img</code> by a 64-bit [[Logical block addressing | LBA]] address. The actual sector number is written by <code>grub-install</code>. <code>diskboot.img</code> is the first sector of <code>core.img</code> with the sole purpose to load the rest of <code>core.img</code> identified by LBA sector numbers also written by <code>grub-install</code>. ** On MBR partitioned disks, <code>core.img</code> ('''stage 1.5''') is stored in the empty sectors (if available) between the MBR and the first partition. Recent operating systems suggest a 1 MiB gap here for alignment (2047 512-byte, or 255 4KiB, sectors). This gap used to be 62 sectors (31 KiB) as a reminder of the sector number limit of [[Cylinder-Head-Sector]] (C/H/S) addressing used by [[BIOS]] before 1996, therefore <code>core.img</code> is designed to be smaller than 32 KiB. **On GPT partitioned disks <code>core.img</code> is written to its own partition. It must be flagged "BIOS_grub", must not be [[file system|formatted]] and can be as tiny as 1 MiB. * '''stage 2:''' <code>core.img</code> loads <code>/boot/grub/i386-pc/normal.mod</code> from the partition configured by <code>grub-install</code>. If the partition index has changed, GRUB will be unable to find the <code>normal.mod</code>, and presents the user with the GRUB Rescue prompt. * Depending on how GRUB2 was installed, the <code>/boot/grub/</code> is either in the ''root'' partition of the Linux distribution, or in the separate ''/boot'' partition. * '''after normal.mod loaded:''' <code>normal.mod</code> parses <code>/boot/grub/grub.cfg</code>, optionally loads modules (eg. for graphical UI and file system support) and shows the menu.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)