x86: i386 typically uses a BIOS, x64 typically uses UEFI
ARM is not standardized
BIOS
Binary Input and Output System
Stored in ROM on the chip
Legacy circa 2017
Steps
Execute BIOS Init (drivers, etc.)
Run Power-On Self Test (POST)
Checks what peripherals are connected and working
Get boot device via NVRAM (no standard)
NVRAM (non-volatile RAM) stores the settings for the BIOS
Load boot sector into volatile RAM
Execute Boot Block program from the boot sector (one block)
Bootstrap OS with Bootloader routine
Bootloader
Storage
UEFI
Unified Extensible Firmware Interface
Main difference: boot settings are stored in a standardized way
Allows for editing settings when running the system (and then rebooting)
Steps
Execute architecture firmware
Execute EFI manager (init & drivers)
Get boot device via NVRAM (standardized)
On disks, get boot loader from EFI partition
Storage
Protective Master Boot Record: Tells a BIOS machine that the disk is not invalid so it would not try to reformat it if it is accidentally plugged into a BIOS machine
Secondary header copies the secondary partition entries back into the primary in the case that it is for the first gets corrupted