Bootloader
- Any program that is loaded by the hardware’s core system (i.e. the BIOS or UEFI loader) to, in turn, load a much larger operating system
- Tends to be quite constrained in its environment:
It has to contend with very specific hardware access, without being confident in the existing state of the system, e.g.
- if it wants to work with disks, it needs to come with its own file system code
- if it wants to work over a network it’ll need to have its own netcode
Bootloaders may consist of one or more stages
Common Examples
- GRUB is the common bootloader for Linux systems
- Take a look at my (non-EFI) x86 Bootloader gist
Writing Your Own
- If you really want to give it a try, start here: https://wiki.osdev.org/Rolling_Your_Own_Bootloader
- https://arjunsreedharan.org/post/82710718100/kernel-101-lets-write-a-kernel