Summary of NetBSD/i386 bootstrap

amd64 and i386 common

  1. BIOS executes first sector, containing the mbr(8) code.
  2. mbr(8) finds the MBR partition marked active and chainloads the bootxx_filesys code in the PBR (partion boot record) and subsequent sectors.

  3. 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.

  4. /boot loads the kernel and begins executing it

amd64

  1. the kernel, in locore.S switches to 64-bit mode.

MBR-partition-less variation

  1. BIOS executes first sector, which in this case contains the bootxx_filesys code

  2. 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.

  3. /boot loads the kernel and begins executing it

theoretical EFI procedure

  1. EFI loads and executes efiboot.efi (for sake of discussion)
  2. 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

jakllsch's wiki: NetBSD/NetBSD-i386 bootstrap summary (last edited 2009-07-01 22:27:24 by JonathanKollasch)