BootLoader - Charles-Charmless/Charles-Charmless.github.io GitHub Wiki

Kernel boot protocol

boot protocol specifies the requirements for a bootloader to implement Linux support.

Memory Layout alt text

Grub

Execute a sector code from boot.img, then jump to location of Grub2's core image which start with diskboot.img, then boot.img and diskboot.img loads the rest of the core imae, include kernel and driver. Finally will execute grub_main function.

grub_main

Initializes the console, gets the base address for modules, sets the root device, loads/parses the grub configuration file, loads modules, etc
After that, will call grub_normal_execute to complete final preparation and show a menu to select an operation system.
Then grub_menu_execute_entryexecute grub boot cmd and boot the selected operation sytem.

Syslinux

⚠️ **GitHub.com Fallback** ⚠️