Windows 8.1 Deployment Alert: Resolving WinRE Build Failures After Imaging
This document addresses a critical issue encountered when deploying Windows 8.1 images to UEFI computers. Specifically, it outlines a solution for situations where the Windows Recovery Environment (WinRE) fails to build after deploying an image that was initially captured from a non-UEFI machine. This problem can significantly impact system recovery and BitLocker functionality.
Symptoms¶
Consider a scenario where a Windows 8.1 image, originally captured from a computer not utilizing UEFI, is deployed onto a UEFI-based system. Following deployment, the Windows Recovery Environment (WinRE) will not be successfully constructed on the target UEFI computer. This absence of WinRE can lead to difficulties in system recovery and other related functionalities.
When this issue arises, specific error messages are typically recorded within the setupact.log file. These log entries provide crucial insights, indicating that the system setup process is unable to locate the staged WinRE image, and consequently, the WinRE build process fails. The error messages logged are similar to the following examples:
<DateTime>, Info [setup.exe] WinReInstallOnTargetOS Beginning WinRE installation.
<DateTime>, Info [setup.exe] winreCheckRegKeyTest hook (S) present or enabled
<DateTime>, Info [setup.exe] WinReInstallOnTargetOS System setup is in progress.
<DateTime>, Info [setup.exe] WinReInstallOnTargetOS Checking for downlevel WinRE installation.
<DateTime>, Info [setup.exe] ReAgentXMLParser::ParseConfigFile (xml file: \\Recovery\\ReAgentOld.xml) returning 0X3
<DateTime>, Info [setup.exe] ReAgentConfig::ParseConfigFile returned with 0x3
<DateTime>, Info [setup.exe] WinReInstallOnTargetOS Getting current WinRE configuration.
<DateTime>, Info [setup.exe] WinReInstallOnTargetOS Disabling extra ReAgentConfig BCD checks for legacy setup.
<DateTime>, Info [setup.exe] WinReInstallOnTargetOS No source winre.wim was specified. Checking for a staged winre.wim.
<DateTime>, Info [setup.exe] WinReInstallOnTargetOS Searching for OEM Winre.wim
<DateTime>, Info [setup.exe] WinReInstallOnTargetOS Error 0X2 while searching for OEM winre.wim
<DateTime>, Warning [setup.exe] WinReInstallOnTargetOS (WinRE)WinREInstall() returning FALSE, gle = 0x64E
These log entries are critical for diagnosing the issue and confirming that the WinRE build process is indeed failing due to the inability to locate the necessary WinRE image files.
Cause¶
The root cause of this issue lies within the configuration of the Reagent.xml file. This file, crucial for WinRE setup, contains specific tags that dictate the location and staging of the WinRE image. In scenarios where the image is captured from a non-UEFI computer, the ImageLocation path tag in Reagent.xml is often set to \\Recovery\\WindowsRE, and the WinREStaged state tag is set to 1.
This configuration is optimized for deployments on non-UEFI systems. However, when the same image is deployed to a UEFI computer, these settings become problematic. The UEFI environment requires a different WinRE configuration, and the pre-configured paths and staging states from the non-UEFI capture are no longer valid or accessible in the UEFI context. This mismatch leads to the system’s inability to locate and build the WinRE environment correctly on the UEFI target machine. For a deeper understanding of the Reagent.xml file and its configuration parameters, refer to the “More Information” section provided later in this document.
Resolution¶
To effectively resolve the WinRE build failure issue, consider implementing one of the following recommended methods. Each method addresses the root cause in a distinct way, providing flexibility based on your deployment environment and resources.
Method 1: Utilize a UEFI-Native Windows 8.1 Image¶
The most straightforward and recommended approach is to utilize a Windows 8.1 image that was initially captured from a UEFI-based computer. By using a UEFI-native image, you ensure that the captured image already contains the correct WinRE configurations and paths suitable for UEFI deployments.
Deploying this UEFI-native image to another UEFI computer eliminates the configuration mismatch that causes WinRE build failures. This method is generally the most efficient and reliable solution, as it avoids the need for manual modifications to configuration files. It ensures that the WinRE environment is correctly set up from the outset, leading to a smoother and more stable deployment process.
Method 2: Modify the Reagent.xml File¶
Alternatively, if using a non-UEFI captured image is necessary, you can modify the Reagent.xml file within the captured .wim image. This involves adjusting specific tags within the XML file to align with the requirements of a UEFI deployment. The Reagent.xml file is located in the \\Windows\\System32\\Recovery\\ path inside the captured .wim file.
The necessary modifications are as follows:
- Remove the
ImageLocation pathvalue: Locate the<ImageLocation path>tag and change its value to""(empty string). This effectively removes the pre-configured path that is causing issues in the UEFI environment. - Set the
WinREStaged statevalue to0: Find the<WinREStaged state>tag and change its value to0. This disables the staging state that is inappropriate for UEFI deployments in this scenario.
By making these changes directly to the Reagent.xml file within the image, you reconfigure the WinRE setup process to correctly build the environment on UEFI computers. This method allows you to continue using your existing non-UEFI captured image while ensuring WinRE functions as expected on UEFI systems.
Example of Modified Reagent.xml:
The following code block illustrates the changes required in the Reagent.xml file. Compare this with the original file example in the “More Information” section to clearly see the modifications.
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<WindowsRE version="2.0">
<WinreBCD id=""></WinreBCD>
<WinreLocation path="" id="0" offset="0"></WinreLocation>
<ImageLocation path="" id="0" offset="0"></ImageLocation>
<PBRImageLocation path="" id="0" offset="0" index="0"></PBRImageLocation>
<PBRCustomImageLocation path="" id="0" offset="0" index="0"></PBRCustomImageLocation>
<InstallState state="0"></InstallState>
<OsInstallAvailable state="0"></OsInstallAvailable>
<CustomImageAvailable state="0"></CustomImageAvailable>
<WinREStaged state="0"></WinREStaged>
<ScheduledOperation state="4"></ScheduledOperation>
<OperationParam path=""></OperationParam>
<OsBuildVersion path=""></OsBuildVersion>
<OemTool state="0"></OemTool>
</WindowsRE>
This modified XML configuration ensures that when the Windows 8.1 image is deployed to a UEFI computer, the WinRE environment is built correctly, resolving the initial build failure issue.
More Information¶
For a deeper understanding of the issue and the underlying configurations, the following sections provide further details and examples.
An Example of the Reagent.xml File¶
After capturing a Windows 8.1 image from a non-UEFI computer using tools like Microsoft Deployment Toolkit (MDT) 2013, the Reagent.xml file located at \\Windows\\System32\\Recovery\\ within the WIM image may resemble the following example. This example highlights the default configuration that causes issues when deploying to UEFI systems.
<?xml version='1.0' encoding='utf-8'?>
<WindowsRE version="2.0">
<WinreBCD id="{00000000-0000-0000-0000-000000000000}"/>
<WinreLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/>
<ImageLocation path="\\Recovery\\WindowsRE" id="4238117423" offset="1048576" guid="{00000000-0000-0000-0000-000000000000}"/>
<PBRImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}" index="0"/>
<PBRCustomImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}" index="0"/>
<InstallState state="0"/>
<OsInstallAvailable state="0"/>
<CustomImageAvailable state="0"/>
<IsAutoRepairOn state="1"/>
<WinREStaged state="1"/>
<OperationParam path=""/>
<OsBuildVersion path="9600.16384.amd64fre.winblue_rtm.130821-1623"/>
<OemTool state="0"/>
<IsServer state="0"/>
<DownlevelWinreLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/>
<ScheduledOperation state="4"/>
</WindowsRE>
In this original Reagent.xml file, observe that the <ImageLocation path> is set to \\Recovery\\WindowsRE, and <WinREStaged> is set to 1. These settings are specifically designed for non-UEFI computer deployments. When this configuration is used to deploy an operating system to a UEFI computer, such as a Surface Pro or Surface Pro 2, the WinRE environment construction will fail. This failure subsequently prevents the enabling of BitLocker, as WinRE is a prerequisite for BitLocker functionality.
BitLocker Does Not Work When WinRE is Disabled¶
A significant consequence of a disabled WinRE environment is the inability to enable BitLocker drive encryption. When WinRE is not functioning, attempting to enable BitLocker will result in an error message similar to the following:
This PC doesn’t support entering a BitLocker recovery password during startup. Ask your administrator to configure Windows Recovery Environment so that you can use BitLocker.
This error message clearly indicates the dependency of BitLocker on a properly configured and enabled WinRE environment. Without WinRE, the necessary recovery mechanisms for BitLocker are not available, preventing its activation.
To verify the WinRE status and confirm whether it is enabled or disabled, you can utilize the command-line tool Reagentc.exe. Executing the command Reagentc.exe /info in an elevated command prompt will display the current WinRE configuration and status.
Example of Reagentc.exe /info Output:
C:\WINDOWS\system32>Reagentc.exe /info
Windows Recovery Environment (Windows RE) and system reset configuration
Information:
Windows RE status: Enabled
Windows RE location: \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE
Boot Configuration Data (BCD) identifier: ########-####-####-####-############
Recovery image location:
Recovery image index: 0
Custom image location:
Custom image index: 0
REAGENTC.EXE: Operation Successful.
In this example output, “Windows RE status: Enabled” confirms that WinRE is functioning correctly. If WinRE were disabled, the status would indicate “Disabled,” highlighting the issue and the need for resolution. This command is a valuable tool for quickly assessing the WinRE status on any Windows system.
Data Collection¶
For further troubleshooting and analysis, collecting relevant data can be beneficial. This may include gathering the setupact.log files, the original and modified Reagent.xml files, and the output of the Reagentc.exe /info command. This information can provide deeper insights into the specific configuration and error conditions, aiding in more complex troubleshooting scenarios. By systematically collecting and analyzing this data, administrators can effectively diagnose and resolve WinRE build failures in Windows 8.1 deployments.
If you have encountered this issue or have further questions regarding WinRE and Windows 8.1 deployment, feel free to leave a comment below and share your experiences! Your insights and questions can help others facing similar challenges.
Post a Comment