Summary of NetBSD/i386 bootstrap
amd64 and i386 common
- BIOS executes first sector, containing the mbr(8) code.
mbr(8) finds the MBR partition marked active and chainloads the bootxx_filesys code in the PBR (partion boot record) and subsequent sectors.
bootxx_filesys, with understanding of the file system, looks for /boot and loads it into memory, switches to protected mode, and begins execution of /boot.
/boot loads the kernel and begins executing it
amd64
the kernel, in locore.S switches to 64-bit mode.
MBR-partition-less variation
BIOS executes first sector, which in this case contains the bootxx_filesys code
bootxx_filesys, with understanding of the file system, looks for /boot and loads it into memory, switches to protected mode, and begins execution of /boot.
/boot loads the kernel and begins executing it
theoretical EFI procedure
- EFI loads and executes efiboot.efi (for sake of discussion)
efiboot.efi (with functions similar to /boot) reads a NetBSD kernel from \efi\NetBSD\ on the EFI system partition, calls ExitBootServices(), and jumps to the kernel entry point