FBinst+GRLDR: Unlocking the Infinite Possibilities of PE Boot Disks
FBinst+GRLDR: Unlocking the Infinite Potential of PE Boot Drives
In a previous article, I provided an extremely detailed explanation of FBinst’s boot principles, configuration, and installation methods.
Today, we continue by exploring how to chain-load FBinst + GRLDR + BOOTMGR.
Picking Up Where We Left Off
In the last section, we created a “fully functional three-partition” PE boot drive. Let’s recap:
First, the BIOS loads FBinst’s boot MBR (the first 446 bytes of code). Then, the CPU finds GRLDR located in the UD partition, and GRLDR begins execution.
Once GRLDR takes the stage, the computer becomes its playground.
Last time, we mentioned that GRLDR can directly boot ISO disc images of PE systems. So we used GRLDR to boot the WEPE.iso file located in the UD extended partition.
This time, we’ll discuss how to use GRLDR to chain-load Microsoft’s BOOTMGR, and then use BOOTMGR to boot the PE system.
Chain-Loading BOOTMGR with GRLDR
To make GRLDR boot BOOTMGR, GRLDR must know where BOOTMGR is located. The following code tells GRLDR the location of the BOOTMGR bootloader. Let’s look at the code:
1 | |
With so many partitions on a disk, how does GRLDR know which partition contains BOOTMGR?
The line find --set-root /a-special-file is the guide that points GRLDR to BOOTMGR.
In the code above, find is the function for locating files. If a partition contains a file like this:
1 | |
Then our code would be:
1 | |
This means: let GRLDR search across all partitions to find which one contains the file \install\pe\boot\unique.abc.
Once GRLDR finds this file path, it executes --set-root, directly setting the partition containing this file as the root partition.
Then, chainloader /bootmgr chain-loads bootmgr. (Note: /bootmgr means bootmgr is located in the root directory of this partition.)
After that, bootmgr takes over the computer and displays the Windows Boot Manager interface on the screen.
So where should the code above be written? Open FBinstTool, click the Grldr menu, start a new line, enter all the code above, then right-click and save.
Thus, we can see that the “special file” is extremely important. This file determines whether GRLDR can find BOOTMGR.
This file is entirely up to us. We simply create a new text document, give it a name we consider unique (using only English letters or numbers), and place its path after find --set-root.
Note!
In GRLDR syntax, paths use forward slashes! Do not use backslashes!
If We Can Chain-Load BOOTMGR, Why Bother with the UD Partition?
Since GRLDR can chain-load BOOTMGR, and subsequent booting of PE system WIM files and the like can be handled by BOOTMGR, why do we still need to create a large UD extended partition with a PE system ISO file inside?
The answer is still compatibility.
For older motherboards, they may not even recognize that a disk has multiple partitions. In that case, GRLDR might fail to find the “special file” we set, and thus cannot boot BOOTMGR. So, it’s best to let GRLDR handle everything on its own, completing all tasks within the UD partition.
Of course, for modern motherboards, there’s really no need to use the FBinst + GRLDR combination anymore. Today’s BIOS is already very standardized and can directly boot BOOTMGR. Moreover, the latest generation of UEFI firmware will eventually become the mainstream replacement for legacy BIOS.