UEFI(8)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1, nixpkgs unstable

✨ UEFI(8) β€” the System Manager's Manual glow-up, bestie edition πŸ’…

okay so this is UEFI(8) from the System Manager's Manual and honestly? it's kind of the moment. sit down, grab a strawberry drink πŸ“, and let's talk about how your computer actually wakes up and becomes a whole operating system.


πŸŽ€ NAME πŸŽ€

UEFI β€” Unified Extensible Firmware Interface bootstrapping procedures πŸ¦‹


🌸 DESCRIPTION 🌸

so. The UEFI Unified Extensible Firmware Interface is literally the thing that hands your OS its boot- and run-time services 🫢. It's the replacement for the legacy BIOS on the i386 and amd64 CPU architectures, and it's also out here slaying on arm, arm64 and riscv architectures. no cap.

The UEFI specification is the successor to the Extensible Firmware Interface (EFI) specification. and the girls who write docs are always like β€” "the terms UEFI and EFI are often used interchangeably" β€” so yeah, don't @ me if you see both, they're the same vibe 😭.

The UEFI boot process loads system bootstrap code that lives in an EFI System Partition (ESP). The ESP is a GPT or MBR partition with a specific identifier that contains an msdosfs(4) FAT file system with a specified file hierarchy. so iconic of it.

  • GPT β†’ ESP identifier C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  • MBR β†’ ESP identifier 0xEF

The UEFI boot process proceeds as follows, and yes I'm numbering them because they deserve it:

  1. UEFI firmware runs at power up and searches for an OS loader in the EFI system partition. The path to the loader may be set by an EFI environment variable managed by efibootmgr(8). If it's not set, an architecture-specific default is used β€” like a fallback fit, and the fallback ate πŸ”₯:
    • amd64 β†’ /EFI/BOOT/BOOTX64.EFI
    • arm β†’ /EFI/BOOT/BOOTARM.EFI
    • arm64 β†’ /EFI/BOOT/BOOTAA64.EFI
    • i386 β†’ /EFI/BOOT/BOOTIA32.EFI
    • riscv β†’ /EFI/BOOT/BOOTRISCV64.EFI

The default UEFI boot configuration for FreeBSD installs loader.efi in the default path. periodt. πŸ‘‘

  1. loader.efi reads boot configuration from /boot.config or /boot/config. yes bestie, two different spellings, both real, i don't make the rules πŸ’€.
  2. loader.efi loads and boots the kernel, as described in loader.efi(8). that's the actual main character energy right there.

The vt(4) system console is automatically selected when booting via UEFI. she just shows up. no effort. glowing ✨.


πŸ¦‹ FILES πŸ¦‹

UEFI bootstrap β€” the whole fam:

  • /boot/loader.efi β€” Final stage bootstrap
  • /boot/kernel/kernel β€” Default kernel
  • /boot/kernel.old/kernel β€” Typical non-default kernel (optional)

πŸ’œ SEE ALSO πŸ’œ

go read these next, i'm obsessed with all of them fr fr:

msdosfs(4), vt(4), boot.config(5), boot(8), efibootmgr(8), efidp(8), efivar(8), gpart(8), loader.efi(8), uefisign(8)


🌈 HISTORY 🌈

storytime 🧚:

EFI boot support for the ia64 architecture first appeared in FreeBSD 5.0. UEFI boot support for amd64 first appeared in FreeBSD 10.1; for arm64 in FreeBSD 11.0; for armv7 in FreeBSD 12.0; and for riscv in FreeBSD 13.0. she's been growing up and evolving this whole time, literally a coming-of-age arc πŸ’–.


πŸ’€ BUGS πŸ’€

There is no support for 32-bit i386 booting via UEFI. nope. not a thing. don't try to make it a thing, it will not slay, it will just not work πŸ™ˆ.

aaaaand that's the page!! lowkey a perfect read, highkey useful πŸŽ€

signed, sealed, and shipped from Debian, dated August 31, 2023 β€” this is the UEFI(8) page, and she ate πŸ’…βœ¨

πŸ“¦ where this page comes from