Jump to content

Windows 10+ Recovery Environment (RE) Notes

From Wikibooks, open books for an open world

Summary and Basics

[edit | edit source]
TODO
TODO

Editor's note

Take These Routine Actions to Give the Best Chance of Good Future Recovery:
  • Make a complete system image of your computer while things work well. Do this every few months at least, and certainly before any significant upgrades.
  • Back up your personal documents, spreadsheets and images. Do this every week, or more frequently if deemed necessary. Use a separate drive for added diversity.
  • Set a restore point before any significant changes. This includes before any version or feature upgrades, and after a new install. Remember, restore might need switched on.
  • Make a USB recovery drive for your version of Windows. If the version changes or the drivers change much, be sure to replace it with another.
  • Learn your computer's startup keys, especially for the boot menu and the Recovery Environment. Refer to the handbook or manufacturer's site for info.
  • Set your BIOS / UEFI boot order so that the USB drive is at the top. This will generally not affect normal working.
  • The Windows Recovery Environment (RE) is a computer's restoration platform. It is a collection of tools with a graphical interface that can repair a computer, or reinstall it from saved images. It can also use a USB recovery drive, so that work can be done externally to the Windows environment.
  • The Winre.wim file is its core, and It is an image file.
    • It is normally hidden from view, but can be seen in Windows Explorer when the folder options are adjusted, and the recovery partition is given a drive letter.
    • Winre.wim is initially located in folder \Windows\System32\Recovery, for staging or when disabled. When the RE is clean-installed or otherwise enabled, tt is moved to folder \Recovery\WindowsRE, in the recovery partition with two other files.
    • The file depends on finding the specified folder at its destination. For a clean installation, the empty folder tree at the working location must be prepared prior to initially enabling the RE.
  • The Reagent.xml file is also located in \Windows\System32\Recovery, and travels with the Winre.wim file. When it is missing in Windows 10 and beyond, a new one is made automatically for the current configuration. Before Windows 10, handling procedures can differ.
  • The Recovery Environment (RE) can be switched on and off. If it is off, (disabled), most facilities will be unavailable. it will not be possible to make a recovery drive, access advanced options, or install a system image. When the recovery environment is switched on, (enabled), a full set of advanced tools is available.
  • When the recovery partition is unsuitable for the RE, C:\Recovery\WindowsRE is used instead. However, when the problems with the partition are corrected, the RE can be redirected back to the partition, using an entry made at an elevated command prompt.
  • When the Recovery Environment is disabled, the Winre.wim file is moved back to its staging location in the \Windows\System32\Recovery folder. (See Figure D). It is then moved back to its working location when it is enabled.
  • A USB recovery drive can override RE settings. Booting with a recovery drive can access a full set of advanced options even when the computer's RE is disabled. (See later).
  • Reagentc.exe is used to switch the RE on and off. It is also used to check its status, and to tell the system where to install the RE files. It is accessed in an elevated command prompt, and a detailed log of its actions is always available at C:\Windows\Logs\Reagent.log.
  • Users sometimes need to work on the hidden recovery partition. Assigning a drive letter, viewing files, and extending the partition are the main tasks that users might encounter. All of these tasks can be carried out in Windows, but are more easily done with a third party partition tool. Even free tools, like MiniTool Partition Wizard Free Edition, are easier to use than Windows.
  • The RE does not normally need manual intervention. The configuration files are automatically updated by switching the RE from the disabled state to the enabled state, or by notifying a change in the location to send the RE. In Windows 10, a new xml file is made if one cannot be found. If necessary, when things still go wrong, there are commands that can be used to check and change the status of the RE, and to tell the system of the new location for its working files.
  • A good way to reinstate the integrity of the Recovery Environment is to allow the installation of a Windows Feature Update. Because the update needs the RE to do its work, it will be sure to reinstate it. Another, more timely method is to perform a clean installation of the RE. (see later).
  • A copy of the Winre.wim file should be kept as a backup. If a Winre.wim file is thought to be defective, the backup copy could then be used to reinstall the RE. Copies can also be imported from other computers, or from installation and system images, but having a backup is more convenient. There is no need to backup the reagent.xml file in Windows 10 as the system can make a new file every time the RE is enabled.
  • The Windows USB Recovery Drive can give full RE access, even when it is disabled, so a USB Recovery Drive is well worth the time in its making. Such a drive can be used to boot (load) a PC into Windows even if the PC cannot start on its own. It can also boot the PC into a full version of the Recovery Environment. Running the RE on a USB Recovery Drive can allow the installation of system images at times when other methods would fail. It cannot transfer a WindowsBackupImage onto a new, blank hard drive however, since some preparation of the disc's partitions must still be made. For a blank hard drive, cloning or the use of installation media are still the preferred methods.

Accessing the Recovery Options

[edit | edit source]
Figure A: Typical options in the Windows Recovery Environment. The "Use a device" route runs the RE independently of Windows. Note: Left-click the image for a larger view.

There are several ways to access the recovery options. (See Figure A.) Some use keys during startup, and some others a modified form of restart. These methods set flags that cause the relevant boot loaders to load the Recovery Environment instead of the Windows operating system. The most reliable methods are given here.

Starting the RE with Hot Keys

[edit | edit source]

When the PC is switched on or reset, there is an immediate startup phase, in which pressing certain keys on the keyboard can cause the computer to go into the Recovery Mode. For example, some HP computers use the f11 key for this. Other manufacturers will use other keys, but often there is brief message at the bottom of the screen that invites the user to press a certain key for this purpose. At times, recovery mode can be accessed from the Startup menu, accessed on HP computers by pressing the Esc key during startup. Along with the RE startup key, there is also a key to go to the UEFI/BIOS settings; on HP computers it is f10, though it too changes between manufacturers. Refer to documentation for your PC to learn correctly which keys to use. Notice also that the startup keys are still valid whether the PC boots on its own, or with the help of a USB Recovery Drive.

Starting the RE with Shift-Restart

[edit | edit source]

Provided that the PC can start, then the preferred method to enter the Recovery Environment is to restart the PC while pressing the shift key. Power switch restarts can be initiated anywhere that a restart button exists, including the Sign-On screen, the Start Menu, Advanced Startup in Settings> Recovery, and no doubt others.

Starting the RE with a USB Recovery Drive

[edit | edit source]
  • The Use a Device choice (see figure A), runs a version of the RE from the USB Recovery Drive. In this way the USB can perform recovery tasks independently of Windows, and can do so even if the RE in the PC is set to disabled. In order to make use of these features the user should of course, have a Windows Recovery Drive, made at a time when the PC was working well. Details on how to make such a drive can be found by searching in Windows for the term Create a Recovery Drive. The following method although of use generally, is made for a near-worst scenario, where the computer cannot start on its own, the user has forgotten the startup keys, and the computer's RE is presently in a disabled or inoperable state. The sequence of work used to enter the recovery environment, and gain external control of it, is as follows:
    • Set the boot order of the BIOS/UEFI to boot from the USB. That is to say, access the UEFI settings, then move the USB choice to the top of the boot order, then save and exit the UEFI settings. This should have already been done as a matter of routine, but in case of difficulty, refer to Boot Menu Option Keys for All Computers, for the boot access key on your computer.
    • Switch off the computer. A cold start is best; remove power from the power cord as well, since the mother board has power unless mains power is removed. Press the start switch a few times to discharge any residual power. After a few minutes reconnect the mains.
    • Remove all USB objects except the mouse and Recovery Drive and start the PC. Do not touch any keys at this stage. The Recovery Drive should boot the PC into Windows normally. It is assumed here that the PC reaches the sign-in screen, having run an automatic startup check and repair. Note: If you know the key to press to enter the RE during startup, and don't need start-up repairs, then press that key during startup, and skip to making the "Use a device" item below.
    • Perform a Shift-Restart from the sign-in screen. That is, hold down the shift key while selecting restart on the lower-right power button. A similar procedure could be performed at any other point on the PC where there is a power button. The computer restarts, booted by the Recovery Drive, and opens a reduced version of the Recovery Environment; this version has very little other than that available in a boot menu, but additionally includes the "Use a device" option.
    • Find and select the option Use a Device. From the three or so options then presented, choose the one for the removable USB drive. The PC will automatically restart, and the Recovery Drive will open a full set of options of its own, the first of which is a language selection.
    • The language screen is characteristic of USB control, there being no other notice as to which device is now running the RE. When making selections from these options, the Recovery Environment will make use of tools in the Recovery Drive, as opposed to those in the PC or Windows. This would even permit the formatting of Windows if deemed necessary.
    • Remove the Recovery Drive from the USB slot. Do this when it is no longer needed, and before proceeding normally to Windows again. This avoids another unnecessary USB boot into the RE.

RE Pre-Install Issues

[edit | edit source]
Figure B: Checking the status of the Recovery Environment. The display shows that it is enabled, and that the location of the file is hidden partition four, the usual recovery partition. That is to say, all is well.
Figure C: Shows a typical command prompt output while searching for RE files. Notice that the working file is not listed, the one currently in the recovery partition.

RE Management with Windows Explorer

[edit | edit source]

Although enabling and disabling the RE must be done at the Command Prompt, searching for files can always be done from within Windows Explorer. If work needs to be done directly in the recovery partition however, a drive letter will need to be assigned. (See later). For some actions that will not be necessary. In general, the user should consider logging on as an administrator, and in any case adjust the folder options as follows:

  • Go to Windows Explorer's View drop menu.
  • Select the Options tile, then Change folder and search options.
  • In the dialog that opens, select the View tab, then check Show hidden files, folders and drives. In addition, ensure that the Hide protected operating system files (Recommended) remains unchecked.
  • Click Apply then OK to quit the dialog.

Search for files

[edit | edit source]

Left-click the C: drive in the left panel then enter the file name and extension in the top-right Search This PC text field, (for example, winre.wim ). Hit Enter to start the search of C: drive. After a while the results list will be completed. Narrow or widen the search locations by choosing a different drive or folder in the left panel, then re-entering the file details.

File Restrictions

[edit | edit source]

Being able to see system and operating files does not necessarily mean that they can be moved or copied. That privilege depends on who the owner is. In the event of such difficulty, the intending user might have to take ownership of such a file or folder, or extend sharing to himself. Use the right-click menu item "Give access to", to give yourself access to some restricted files.

Hidden Partition Working

[edit | edit source]

Before installing the RE in a partition, the system checks to see if the partition is suitable. During the install run, it checks for size and type, and otherwise decides on suitability. If it decides that it is too small for the files and working space, or otherwise unsuitable, it will install the RE into the C:\Recovery folder instead. So, if at any time the RE is found in that folder, it would be best to consider any issues with the partition before attempting to install in it. Microsoft's page on this issue is best, at Disk partition requirement for using Windows RE tools on a UEFI-based computer.

If it is decided to extend the partition, or to work on it, the use of a partition tool is preferred. Even free utilities such as MiniTool Partition Wizard Free Edition permit the assignment of drive letters and the adjustment of a partition's size. They also allow the viewing of files in hidden partitions, using an explore option. These utilities are often simpler to use than those supplied by Windows, but on a cautious note, care is needed in any partition tool's use, since changes made in a casual way can have far reaching consequences.

In order to see and work with any files in a hidden partition, a drive letter must first be assigned. Then the files can be handled in Windows Explorer, in the same way as any others. After a session of work is done, the drive letter can be removed again to make it inaccessible. Before working on any system files, it is advised to set the folder options of Windows Explorer so that system files will be visible and so that operating system files are not hidden. Otherwise, they will be invisible for both viewing and command prompt listings. Similarly, any use of the command prompt should be done at an Admin level, the so-called elevated command prompt, or some commands will not work at all. It might also be as well to sign on to Windows as an administrator for any extended work. This will minimise the requests for permissions.

Making Clean Starting Folders

[edit | edit source]
Figure D: Shows the changes in file locations when the RE is enabled and disabled. When enabled, The Winre.wim file in the staging location is moved, with other files, to its working location in the recovery partition. It is moved back when disabled.

When attempting to make a clean installation of the RE, it is important to avoid any residual problems that exist in the surrounding files and folders. One way, when it is possible, is to install into empty folders made for the purpose, and to first rename any similar existing folders so that they are unavailable. For example, for a partition, the RE system will install into a specific folder in a specific folder tree, and no other. For a clean installation, the partition must have an empty outer folder in it called Recovery. Within the Recovery folder there must be another empty folder called WindowsRE. If any existing folder tree exists with the Recovery name it should be renamed so that it is unavailable.

Similarly, during the installation of the RE, a Winre.wim image file must initially be located in folder C:\Windows\System32\Recovery. There is no need for any WindowsRE folder at this location, since it is merely a staging location for the wim file, prior to the start of the installation. If there is doubt as to the integrity of the Winre.wim file, then it too should be renamed, and another file that is known to work, brought in to replace it. In Windows 10 and beyond, some files are made automatically when they are not found during an RE installation run. This is not the case for earlier Windows editions. For Windows 10 and 11, this makes it a useful way to exclude such files from adversely affecting the new installation. If there is an existing REAgent.xml file in the C:\Windows\System32\Recovery folder, it must be deleted before a clean install; the system will make a new one on-the-fly, with all of the new configurations in it. Note that a missing Winre.wim file will not be replaced during a run; it must be present at the staging point before enabling the RE.

TODO
TODO

Editor's note
Remarks regarding auto-replacement of the Reagent.xml file apply only to Windows 10 and above. Other versions are not considered here.

Checking System Files and Images

[edit | edit source]

At any time, the integrity of the system can be checked by running a file check. That does not mean that the recovery partition will be checked as well. When the RE is disabled, the Winre.wim file is brought back into the C:\Windows\System32\Recovery folder, regardless of where it was located while it was enabled. So prior to running a specific file check it would be best to make sure that the Winre.wim file is conveniently located in Windows, by first disabling the RE. Code for doing this, and other tests, is given in a later section, though recent tests have introduced doubt as to whether or not the Winre.wim file is ever included in a System File Check; no mention of it is ever found in the various logs.

An alternative to file checking is to make use of a Winre.wim file from a known, good Windows computer of the same edition. Another alternative is to allow the computer to do a features update, or an upgrade of Windows. Because the system needs the RE for its updates, it will make sure that there is a working RE by the time it is done. That is not to say that the system will install the RE where you want it; it will not install it into a partition if it was not notified (set) there before. Another way, more complex, to get a file is to mount an installation image so that there is access to its files. The wim file can then be copied, and dismounted after use.

Microsoft recommends running DISM before sfc in Windows 10, so this is the sequence displayed below. The following code can be used at an elevated command prompt to perform more searching tests and repairs on the computer, but should be used sparingly and with caution, in view of the damage that might result from careless use:

To check the Windows image for integrity

[edit | edit source]

The code lines shown here require an online internet connection. They check the Windows files against a reference set of files in a Microsoft server. The first line will check that files are OK without making changes, while the second line will check the integrity of the component store. The third and most useful will check and fix any bad files that are found. The process can take some time since many files need to be checked.

Press Enter after any one line of code, then await completion before any other:

Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth

To perform system file tests and repairs

[edit | edit source]

The first of these two code lines will verify the integrity of the system files but will not make any changes to them. The second line will check such files and also repair or replace them as necessary. A log file for the process is available at C:\Windows\Logs\CBS\CBS.log.

Press Enter after any one line of code, then await completion before any other:.

sfc /verifyonly
sfc /scannow

To perform hard drive sector tests and repairs

[edit | edit source]

The first of these two code lines will verify the integrity of C: drive's sectors, and will report but not make any changes to them. The second line will check the sectors and also make repairs as necessary.

Press Enter after any one line of code, then await completion before any other:

chkdsk /r c:
chkdsk /f c:

To obtain a hash for your working Winre.wim file

[edit | edit source]

There is no clear evidence that the wim file is ever checked during a sfc check, so the next best thing is to do a hash of your wim file while it is working well so that you can compare it when it is in doubt. The procedure below first disables the RE to move the wim file into Windows. Then the directory is changed to the folder that contains the wim file, then the hash line is run. Change the MD5 to SHA1, SHA256, or SHA512 for other hashes. The sequence of work is just:

Press Enter after each line of code, then await completion before any other:

reagentc /disable
cd c:\windows\system32\recovery
certutil -hashfile winre.wim MD5
reagentc /enable
reagentc /info

To Check, Enable or Disable the RE

[edit | edit source]

At various times we need to disable or enable the Windows Recovery Environment. When disabled, there is no access to the advanced options of the RE without a Recovery Drive, and it is not possible to make such a drive when the RE is disabled. However, at times when repairing the RE, we need to switch it off and on. These commands, as for many others, must be made at an administrator command prompt.

  • The RE status tells us whether it is currently enabled or disabled, (see Figure B), and if enabled, what its set location path is. It is found with:

reagentc /info

  • To enable the RE we use:

reagentc /enable

  • To disable it we use:

reagentc /disable

Clean Install the RE to a Partition

[edit | edit source]

This procedure is the most general, and as such is easily adapted to address a number of RE problem types. These include but are not limited to:

  • Cannot enable the RE
  • Recovery Environment not found.
  • Confused configuration issues.
  • First time install of RE.
  • RE installed in Windows instead of Recovery Partition.
  • No backup to staging location when disabled.

This description assumes that there is a Winre.wim file available on the computer from some suitable source. That is to say, from a backup copy or a computer of the same edition: Win10 needs a file from a Win10 computer, etc. It further assumes that there is already a recovery partition made, it is hidden, and that after installation of all files, it will still have free space roughly equal to the size of the Winre.wim file itself. A partition size of greater than 1GB would usually do fine. Ideally, the RE partition should be located immediately following the partition in which Windows is installed. For a detailed description of the most general method of RE installation, first refer to Microsoft; Deploy Windows RE.The summary of the procedure is as follows:

  • Prepare Windows Explorer; set the folder options to unhide and view system and operating system files.
  • Prepare the Recovery Partition; give the partition a drive letter. We use "R" for our example.
  • Disable the RE if there is already one installed.
  • Use Windows Explorer” to view the existing Recovery Partition files.
  • Rename any existing Recovery folder structure in the recovery partition; eg; make it bakRecovery.
  • Then make sure that the empty folder structure Recovery\WindowsRE exists as a top level folder tree in the RE partition. (See Figure D). If it does not, then make it.
  • Copy your Winre.wim file to the clipboard, then Paste it into the \Windows\System32\Recovery folder. This becomes the staging location of Winre.wim. Note that this method is simply considered the most convenient, and that with a little more effort the file could be found and copied into place at the command prompt instead.
  • While in \Windows\System32\Recovery rename any existing REAgent.xml file to make it unavailable. (Note: This advice is for Windows10 and beyond).
  • Set the location for the installation of RE files using reagentc /setreimage /path r:\recovery\windowsre at an elevated command prompt. The system will make a new reagent.xml file, then add it, the winre.wim file, and a boot.sdi file to the WindowsRE folder in the recovery partition,
  • Confirm the status of the RE with reagentc /info, noting that it is enabled, and that the RE has the installed path as intended.
  • If all is well, then remove the drive letter from the recovery partition.
  • A detailed log file for the process can be found at C:\Windows\Logs\ReAgent\reagent.log.
[edit | edit source]
  • To assign a drive letter to the Recovery Partition: It is best to use a third-party partition tool (recommended), but if the command prompt must be used, enter following code lines at an elevated prompt, one by one, pressing Enter after each. Note: For this purpose, we use the letter "R", and assume it is for partition four.

diskpart
list drive
select drive 0
list partition
select partition 4
assign letter=R
exit

  • To check the status of the RE:

reagentc /info

  • To disable the RE: Enter the following code at the elevated command prompt.

reagentc /enable

  • To enable the RE:

reagentc /disable

  • To find a list of Winre.wim files in C: drive: Enter the following code at the elevated command prompt. (See Figure C)

dir /a /s c:\winre.wim

  • To copy a Winre.wim file using Command Prompt: Note: The first line is just used for you to find the file's attributes; it is assumed here that, among others, system and hidden attributes (h and s) were found; these two found attributes are removed in the second line, the xcopy is applied in the third, then the attributes are reapplied at both the new and old addresses. It is easiest to rename and move files in Windows Explorer, but when the command prompt (elevated) must be used, the following code shows the sequence of work:

attrib [full path to the FILE whose attributes are to be checked]
attrib -h -s [full path to the source FILE to copy]
xcopy /h [full path to the source FILE to copy] [full path to destination FOLDER for the copy]
attrib h s [full path to the source FILE that was copied]
attrib h s [full path to the new destination FILE]

  • To tell the RE where to place the enabled Winre.wim file: In this case we assume that the correct place is the recovery partition, and that it has been labelled as "R" drive. As well as setting up the various configuration files and notifying the system as to where the RE is to be installed, this code line ends by enabling the RE, ready for use:

reagentc /setreimage /path r:\recovery\windowsre

  • To remove the drive letter from the recovery partition: Use the third-party partition software for speed and convenience, or repeat the earlier use of diskpart, replacing the lettering line with remove letter=R.

diskpart
list drive
select drive 0
list partition
select partition 4
remove letter=R
exit

  • To access the log file for any REAgentc process: In Windows Explorer, go to C:\Windows\Logs\ReAgent\reagent.log, and Open with Notepad or Wordpad.

"REAgent.exe Enable Log...press to view"
Reagent.log file for info, disable, and enable
  1. ------------------------------------------------------
  2. ------------------------------------------------------
  3. -----Executing command line: reagentc /info-----
  4. ------------------------------------------------------
  5. Enter WinReGetConfig
  6. Parameters: configWinDir: NULL
  7. WinRE config file path: C:\WINDOWS\system32\Recovery\ReAgent.xml
  8. Update enhanced config info is enabled.
  9. WinRE is installed
  10. WinRE is installed at: \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE
  11. System is WimBoot: FALSE
  12. WinRE image validated
  13. Exit WinReGetConfig return value: 1, last error: 0x0
  14. ------------------------------------------------------
  15. -----Exiting command line: reagentc /info, Error: 0-----
  16. ------------------------------------------------------
  17. ------------------------------------------------------
  18. -----Executing command line: reagentc /disable-----
  19. ------------------------------------------------------
  20. Enter WinReUnInstall
  21. Update enhanced config info is enabled.
  22. WinRE is installed
  23. winreCopyWIMBack moved WIM file from \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE\ to C:\WINDOWS\system32\Recovery\Winre.wim successfully!
  24. WinRE uninstall step 1 succeeded: copy WIM file back to its staging location
  25. WinRE uninstall step 2 succeeded: update agent config for BCD id, install state, schedule operation.
  26. The current Recovery BCD entry points to \Device\HarddiskVolume4[\Recovery\WindowsRE\Winre.wim]
  27. The WIM file being unregistered is \Device\HarddiskVolume4[\Recovery\WindowsRE\Winre.wim]
  28. Paths are the same, clearing Recovery BCD
  29. Cleared recovery BCD successfully
  30. WinRE uninstall step 3 succeeded: unregister winre.wim from recovery BCD.
  31. WinRE uninstall step 4 succeeded: remove recovery related sequence from BCD.
  32. WinRE uninstall step 5 completed with return value TRUE: remove validation task.
  33. Exit WinReUnInstall returns 1 with last error: 0x0
  34. ------------------------------------------------------
  35. -----Exiting command line: reagentc /disable, Error: 0-----
  36. ------------------------------------------------------
  37. ------------------------------------------------------
  38. -----Executing command line: reagentc /enable-----
  39. ------------------------------------------------------
  40. Enter WinRECheckGuid
  41. Parameter: TargetOsGuid: : NULL
  42. Exit WinRECheckGuid return error code: 0x0
  43. Enter WinReInstall
  44. Parameter: ReInstallBecauseOfBitlocker: 0
  45. --Install on target OS step 1: collect info like partition list, loading reagent.xml, source winre.wim and partition
  46. Enumerate and log all fixed partitions:
  47. --Partition info--
  48. VolumeName: \\?\Volume{4026de0d-3023-4508-840d-8d78ffec61a7}, PartitionName: \\?\GLOBALROOT\device\harddisk0\partition1
  49. Partition number: 1, offset: 1048576, free space: 198959104, total space: 268435456
  50. DiskNumber:0, DiskSignature:0, NTFS:0, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0
  51. GPT partition GUID:: {C12A7328-F81F-11D2-BA4B-00A0C93EC93B}
  52. DiskId: {E5D22CC6-A837-4577-8981-0D420643FB2E}
  53. --Partition info--
  54. VolumeName: \\?\Volume{d6050b3f-ecf8-40b1-b986-98d91fbfdaa9}, PartitionName: \\?\GLOBALROOT\device\harddisk0\partition4
  55. Partition number: 4, offset: 997993742336, free space: 2149855232, total space: 2204102656
  56. DiskNumber:0, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0
  57. GPT partition GUID:: {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}
  58. DiskId: {E5D22CC6-A837-4577-8981-0D420643FB2E}
  59. --Partition info--
  60. VolumeName: \\?\Volume{6813f97b-19e6-46d9-88a5-c8807e892e9c}, PartitionName: \\?\GLOBALROOT\device\harddisk0\partition3
  61. Partition number: 3, offset: 290455552, free space: 933497659392, total space: 997703282688
  62. DiskNumber:0, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:1, BitlockerEnabled:0
  63. GPT partition GUID:: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}
  64. DiskId: {E5D22CC6-A837-4577-8981-0D420643FB2E}
  65. Get downlevel ReAgent config
  66. Downlevel config file path: \Recovery\ReAgentOld.xml
  67. Checking for downlevel WinRE installation.
  68. First round search
  69. Get ReAgent config
  70. GetReAgentConfig Config file path: C:\WINDOWS\system32\Recovery\ReAgent.xml
  71. CheckRegKey test hook (SystemSetupInProgress) present and disabled
  72. Update enhanced config info is enabled.
  73. Failed to get recovery entries: 0xc0000225
  74. winreGetWinReGuid returning 0X490
  75. ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined (0x490)
  76. FindWinReSourceImageAndPartition No source winre.wim was specified. Checking for a staged winre.wim.
  77. FindWinReSourceImageAndPartition using winre.wim from C:\WINDOWS\system32\Recovery
  78. --Install on target OS step 2: detect and fix if there is any issue for winre settings
  79. DetectAndFixWinReIssues nothing to do because winre is not enabled.
  80. --Install on target OS step 3: check if we can keep winre.wim in the same partition if it is staged.
  81. --Install on target OS step 4: check if we can put winre.wim in other partitions or create one if needed.
  82. CanPutWinREOnOtherPartitions WinRE is not staged. Searching for a suitable partition for WinRE.
  83. Entering FindTargetPartition
  84. RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
  85. Not allowed to repartition the disk
  86. Start looping through each partition and initialize os partition, recovery partition and system partition for MBR
  87. Checking partition at offset 1048576, partition number: 1
  88. skip GPT Partition which type is not PARTITION_MSFT_RECOVERY_GUID
  89. Checking partition at offset 997993742336, partition number: 4
  90. MeetPartitionRequirements Partition details: {Offset: 997993742336, Free space: 2149855232, Total space: 2204102656}
  91. MeetPartitionRequirements WinRE WIM size: 457941945
  92. MeetPartitionRequirements Required free space: 512467897
  93. partition meets requirements
  94. NOTE: select partition because it meets WinRE requirements
  95. Checking partition at offset 290455552, partition number: 3
  96. find OS partition
  97. Complete looping through each partition
  98. ----Search target partition option #1: try existing WinRE partition
  99. ----Search target partition option #2: try first recovery partition
  100. Found target partition: use the first recovery partition, offset: 997993742336
  101. Exit FindTargetPartition returns with status code: 0x0
  102. --Install on target OS step 5: set WinRE settings and restore system to a good state when hitting any errors
  103. Enter SetWinRESettings
  104. RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
  105. Copying WinRE from C:\WINDOWS\system32\Recovery to staging location on \\?\GLOBALROOT\device\harddisk0\partition4
  106. RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
  107. Copied WinRE to staging location
  108. Creating BCD entry
  109. WinRE created BCD entry: : {F74A5BFA-5F56-11ED-819B-80E82CE70328}
  110. Moving Winre and boot.sdi from staging location to target
  111. Moved Winre and boot.sdi from staging location to target
  112. Updating reagent.xml
  113. Set WinRE location path to: \Recovery\WindowsRE
  114. Set recovery guid
  115. Set scheduled operation: WinReNoOperation
  116. Set OS build version: 19041.1.amd64fre.vb_release.191206-1406
  117. Set Wimboot state: 0
  118. Set install state to: enabled
  119. Setting the recovery sequence for the target OS.
  120. Unable to get default BCD object (0xc0000225), checking display order instead
  121. Bootmgr has no default object set (0xc0000225), will use first display order entry instead
  122. Couldn't get top of display order: 0xc0000225
  123. We will report success and exit because recovery BCD is not used at all.
  124. Creating backup of reagent.xml
  125. Created backup of reagent.xml
  126. Configuring the WinRE validation task.
  127. Failed to clear WIM file trusted state: 0x2
  128. Failed to clear WIM file hash: 0x2
  129. Update enhanced config info is enabled.
  130. WinRE is installed
  131. Loading boot index 1
  132. winreValidateWimFile took 78 ms.
  133. WinReValidateRecoveryWimInternal took 2281 ms.
  134. Completed the WinRE validation task.
  135. Creating backup of customization file
  136. Recovery file not found at C:\WINDOWS\system32\Recovery\ReCustomization.xml
  137. winreBackupRecoveryFile (C:\WINDOWS\system32\Recovery\ReCustomization.xml, ReCustomization.xml) failed, Err: 2
  138. Created backup of customization file
  139. Storing disk info in NVRAM
  140. NVRAM update not necessary
  141. Stored disk info in NVRAM
  142. SetWinRESettings return with error code 0x0
  143. WinReInstallOnTargetOSInternal WinRE installation completed successfully.
  144. Exit WinReInstall return value: 1, last error: 0x0
  145. Enter WinReSetConfig
  146. Parameters: configWinDir: NULL
  147. Update enhanced config info is enabled.
  148. WinRE is installed
  149. Exit WinReSetConfig return value: 1, last error: 0x0
  150. Clear non critical error when enabling auto repair
  151. ------------------------------------------------------
  152. -----Exiting command line: reagentc /enable, Error: 0-----
  153. ------------------------------------------------------
  154. ------------------------------------------------------


[edit | edit source]
[edit | edit source]