Ask HN: Where can I find a primer on how computers boot?
457 pointsAs a developer, I recently encountered challenges with GRUB and discovered I lacked knowledge about my computer's boot process. I realized terms like EFI partition, MBR, GRUB, and Bootloader were unfamiliar to me and many of my colleagues. I'm seeking introductory and easy-to-understand resources to learn about these concepts. Any recommendations would be appreciated!
Comments (94) 57 threads
Earlier commentsProblems with bootlaoders are generally specific to the system it's on and how the drive(s) is / are set up.
https://www.linux.org/threads/linux-bootloaders.8943/
https://www.tecmint.com/best-linux-boot-loaders/
I think even old versions of Scott Mueller's "Upgrading and Repairing Pcs" might be of use to you. Digital versions could be found at archive.org.
This post[1] has an animated image that's pretty helpful: https://embeddedinn.xyz/images/posts/rvLinuxQemuBoot/bootAni...
It's of course specific to one platform, but the visualization of building up a structures in memory with the right offsets/order and jumping in is pretty typical.
[1] https://embeddedinn.xyz/articles/tutorial/RISCV-Uncovering-t...
At each of those stages, the bootloader images, the kernel image, the device trees, and the disk / filesystem are verified ("measured") for integrity eventually anchored on a "hardware root-of-trust".
If you're a visual learner:
How TI Beagleboard boots (33m): https://www.youtube.com/watch?v=DV5S_ZSdK0s / https://ghostarchive.org/varchive/DV5S_ZSdK0s
How ARM Cortex M boots (9m): https://www.youtube.com/watch?v=3brOzLJmeek / https://ghostarchive.org/varchive/3brOzLJmeek
Bootloader 101 (embedded devices; 38m): https://www.youtube.com/watch?v=UvFG76qM6co / https://ghostarchive.org/varchive/UvFG76qM6co
Measured Boot (39m): https://www.youtube.com/watch?v=EzSkU3Oecuw / https://ghostarchive.org/varchive/EzSkU3Oecuw
Coreboot (38m): https://www.youtube.com/watch?v=iffTJ1vPCSo / https://ghostarchive.org/varchive/iffTJ1vPCSo
U-Boot (1h 25m): https://www.youtube.com/watch?v=INWghYZH3hI
UEFI for U-Boot (38m): https://www.youtube.com/watch?v=VnsF3uRZzNk / https://ghostarchive.org/varchive/VnsF3uRZzNk
Device Trees (43m): https://www.youtube.com/watch?v=Nz6aBffv-Ek / https://ghostarchive.org/varchive/Nz6aBffv-Ek
ARM Trust Zone (46m): https://www.youtube.com/watch?v=q32BEMMxmfw
PS: Your profile which seems to be a cheat-sheet of various HN handles categorized into their areas of expertise is very useful too :-)
I found it invaluable when debugging some issues a few years back. Try unpacking the initramfs and reading the scripts contained in there, too: https://wiki.archlinux.org/title/Arch_boot_process#initramfs
All comments shown.
Couldn't load more comments. Check your connection and try again.