Contents
How does a legacy BIOS boot loader work?
For legacy BIOS systems, the philosophy is that the NOS owns the boot loader and the NOS must install its own GRUB (or some other boot loader) itself. The ONIE kernel and initramfs reside in a single, self-contained partition. The installed NOS controls how it manages the MBR and GRUB. Disk Partition Layout ¶
Why does the boot loader run in real mode?
On the x86, the boot loader runs in Real Mode. Consequently it has easy access to BIOS resources and functions. Therefore it’s a good place to perform memory map detection, detection of available video modes, loading of additional files, etc.
How big is the bootloader on an x86?
In the first part of the series, the bootloader leaves you in the x86’s real mode, with 16-bit instructions and access to one megabyte of memory — think pre-80286 days, or 1982 for those of us who were computing back then. To prove it works, he uses BIOS calls to display “Hello world!”.
What are the two stages of a bootloader?
A two-stage bootloader actually consists of two bootloaders after each other. The first being small with the sole purpose of loading the second one. The second one can then contain all the code needed for loading the kernel. GRUB uses two (or arguably, three) stages.
How to install Grub on a legacy BIOS?
The ONIE-BOOT partition is created in either case. Installs ONIE kernel+initramfs into the ONIE-BOOT partition. Installs GRUB into /dev/sda, using /dev/sda2 as the GRUB –boot-directory. This allows the system to boot initially with no NOS installed.
What should boot loader take up in low memory?
The boot loader should therefore be designed to take up as little space in low memory as it reasonably can. For zImage or old bzImage kernels, which need data written into the 0x90000 segment, the boot loader should make sure not to use memory above the 0x9A000 point; too many BIOSes will break above that point.
What do I need to run a boot loader?
The booter now has the ability to load additional kernel extensions from a ramdisk supplied by a multiboot loader. The ramdisks are supplied in the form of Multiboot modules. The ramdisks must be in flat format with a partition table (APM, GPT, or MBR) and an HFS or HFS+ partition.