BootLoader - Charles-Charmless/Charles-Charmless.github.io GitHub Wiki
boot protocol specifies the requirements for a bootloader to implement Linux support.
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.
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_entry
execute grub boot cmd and boot the selected operation sytem.