PXE Booting WinPE using Grub2: Failing to Load bootmgfw.efi
PXE (Preboot Execution Environment) booting is a standard method for deploying operating systems. WinPE (Windows Preinstallation Environment) is a lightweight version of Windows used for deployment and recovery tasks. Grub2 is a popular bootloader that can be used to PXE boot WinPE.
Introduction
When attempting to PXE boot WinPE using Grub2, some users may encounter an issue where the bootmgfw.efi file fails to load, resulting in a "BlInitializeLibraryFailed 0xc0000017" error. This article will cover the key concepts related to this issue and provide a solution for successfully PXE booting WinPE using Grub2.
Understanding the Problem
The "BlInitializeLibraryFailed 0xc0000017" error is caused by a failure to initialize the Bootloader Library. This can occur when the bootmgfw.efi file is not loaded correctly during the PXE booting process. The bootmgfw.efi file is a critical component of the Windows boot process, and this error can prevent the system from booting into WinPE.
Downloading bootmgfw.efi
One solution to this issue is to download the bootmgfw.efi file from a trusted source and place it in the correct location on the PXE server. This can be done using the following steps:
- Download the bootmgfw.efi file from a trusted source, such as the Microsoft Download Center.
- Place the bootmgfw.efi file in the
/tftpboot/efidirectory on the PXE server. - Update the Grub2 configuration file to include the new location of the bootmgfw.efi file.
Updating the Grub2 Configuration File
To update the Grub2 configuration file, the following steps can be used:
- Edit the
/etc/grub.d/40_customfile using a text editor. - Add the following lines to the file:
menuentry "WinPE" { set root=(tftp,192.168.1.100) linuxefi /efi/bootmgfw.efi initrdefi /efi/bootmgfw.efi }Note: Replace
192.168.1.100with the IP address of the PXE server. - Save and close the file.
- Run the following command to update the Grub2 configuration:
sudo grub-mkconfig -o /boot/grub/grub.cfg
By downloading the bootmgfw.efi file and updating the Grub2 configuration file, users can successfully PXE boot WinPE using Grub2. This solution can help to resolve the "BlInitializeLibraryFailed 0xc0000017" error and enable users to perform deployment and recovery tasks using WinPE.
References
--endarticle--