The Grub2Win Boot Process
Notes on how it works
EFI Mode
For All Windows Versions Running On EFI Firmware Systems
At boot time, the EFI firmware in your PC loads the customized GNU Grub EFI Boot Manager module.
For 64 bit systems, the module is /EFI/grub2win/gnugrub.kernel64.efi
For 32 bit systems, the module is /EFI/grub2win/gnugrub.kernel32.efi
The GNU Grub EFI Boot Manager then takes control and performs the following actions:
Searches all disk drives for file /grub2/grub.cfg to find the partition where the Grub2Win base directory is installed. This is usually the Windows boot partition C: drive.
Sets variable $grub2part to the address of the partition where Grub2Win is installed.
Sets variable $prefix to the Grub2Win partition address followed by /grub2.
The $prefix variable is required by grub2 to locate its base directory and files.
If $prefix is not set properly, grub2 initializes in rescue mode (limited command line).
Loads several other GNU Grub modules to support various partition and filesystem types as well as USB drives and keyboards.
Reads file $prefix/grub.cfg and builds the grub2 boot menu display.
This is usually file C:\grub2\grub.cfg
***************************************************************************************************************************
BCD Mode
For All Windows Versions Running On BIOS Firmware Systems (except XP)
The Windows BCD MBR loads the Windows BCD Boot Manager module C:\bootmgr.
The Windows BCD Boot Manager reads the BCD and displays the Windows Boot Manager menu.
You can now choose to boot either Windows or Grub2Win.
If you select Grub2Win, the customized GNU Grub Boot Manager module is loaded.
The module name is C:\grub2\g2bootmgr\gnugrub.kernel.bios.
The GNU Grub Boot Manager module then takes control and performs the following actions:
Searches all disk drives for file /grub2/g2bootmgr/gnugrub.kernel.bios to find the partition where the Grub2Win base directory is installed. This is usually the Windows boot partition C: drive.
Sets variable $grub2part to the address of the partition where Grub2Win is installed. Usually (hd0, msdos1).
Sets variable $prefix which usually has a value of (hd0, msdos1)/grub2
The $prefix variable is required by grub2 to locate its base directory and files.
If $prefix is not set properly, grub2 initializes in rescue mode (limited command line).
Loads several other GNU Grub modules to support various partition and filesystem types as well as USB drives and keyboards.
Reads file $prefix/grub.cfg and builds the grub2 boot menu display.
This is usually file C:\grub2\grub.cfg
***************************************************************************************************************************
XP Mode
For Windows XP
The Windows XP MBR loads the Windows XP Boot Manager module C:\ntldr.
The Windows XP Boot Manager reads C:\boot.ini and displays the Windows Boot Manager menu.
You can now choose to boot either Windows or Grub2Win.
If you select Grub2Win, module C:\g2xpstub is loaded.
g2xpstub is a tiny program. It has only one job. Loading the much larger C:\g2ldr module.
Module C:\g2ldr is a copy of the customized GNU Grub BIOS Boot Manager.
The GNU Grub BIOS Boot Manager module then takes control and performs the following actions:
Searches all disk drives for file /grub2/g2bootmgr/gnugrub.kernel.bios to find the partition where the Grub2Win base directory is installed. This is usually the Windows boot partition C: drive.
Sets variable $grub2part to the address of the partition where Grub2Win is installed. Usually (hd0, msdos1).
Sets variable $prefix which usually has a value of (hd0, msdos1)/grub2
The $prefix variable is required by grub2 to locate its base directory and files.
If $prefix is not set properly, grub2 initializes in rescue mode (limited command line).
Loads several other GNU Grub modules to support various partition and filesystem types as well as USB drives and keyboards.
Reads file $prefix/grub.cfg and builds the grub2 boot menu display.
This is usually file C:\grub2\grub.cfg
Note: The aging Windows XP Boot Manager will not reliably load g2ldr directly. This is why g2xpstub is used instead.
g2xpstub has very limited capabilities and can only find C:\g2ldr in the root of a partition, not a subdirectory.
Created with the Personal Edition of HelpNDoc: Generate Kindle eBooks with ease