How does the IPL know to load Stage1_5?
Iíve been searching high & low, but cannot find a definitive answer as to how GRUB Stage_1 (IPL of MBR) knows how to load Stage1_5.
Iíve read the GNU Grub manual and various other forums but since I donít know C, I canít reverse engineer or figure out the source code to determine whether Stage1_5 is loaded or not.
I understand that, as part of the OS install procedure, GRUB writes Stage_1 (as the IPL) into the MBR, and that this then calls either Stage1_5 or Stage_2, depending on whether Stage1_5 is installed.
I also believe that Stage1_5 is usually installed into the sectors following the MBR into the so-called DOS compatibility region (the next 62 sectors within the first cylinder before the first partition).
However, assuming Stage1_5 is installed, is there a routine within Stage_1 that checks to see if Stage1_5 is installed and if so jumps & runs to it?
Or, if Stage1_5 is not installed would the same routine then jump to & run Stage_2?
Or, does the GRUB installer intelligently install specific Stage_1 code dependent upon whether Stage1_5 was installed or not? i.e. If the GRUB installer was able to load Stage1_5 then the Stage_1 code it installs would have the routine to jump to & run Stage1_5. Or, if the GRUB installer did not install Stage1_5, it would install different Stage_1 code to jump to & run Stage_2
I appreciate this may be moot, what with GRUB 2 but Iíd like to have a better understanding of this process.
TIA Ė Derrick