REAGENTC.EXE: Unable to update Boot Configuration Data.

Anonymous
2023-04-19T12:50:25+00:00

I am unable to enable WindowsRE?

Windows for home | Windows 11 | Recovery and backup

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2023-04-21T04:29:52+00:00

(1) You've got two System partitions each with its own BCD. C partition is doubling as a System partition, & EFI is a System partition...

Image

That is likely what is confusing ReagentC. It needs to find the BCD in order to enable the Recovery partition. We need to tell Windows that EFI is to be used -- not C. Let's try this...

DiskPart<<<Enter DiskPart

List  Vol<<<List the volumes & letters

Select  Vol  7           <<<Select EFI -- I guess it's still Volume 7

Assign  Letter=S     <<<Give it letter S -- unless List Vol shows it's already there

Exit<<<Exit Diskpart

BCDBoot  C:\Windows  /s  S:  /f  UEFI <<< **** Rebuild the BCD in EFI & all other boot files.

A reboot will be necessary to inform the rest of Windows of the change.

(a) I'm unsure that actually tells Windows to use EFI.

(b) I'm unsure whether that will also remove the System attribute from C.

(c) I'm unsure exactly what would remove it.

(d) So, maybe try this before the reboot...

REN C:\EFI EFI_unwanted <<<Rename the folder

..........................................................................

Then -- if it turns out it can't reboot -- you'll have to rename it back in the recovery environment, thus...

(a) At the Choose an Option screen, click "Troubleshoot > Advanced Options > Command Prompt".

(b) Enter the following commands...

DiskPart

List Vol

Exit

The Windows partition may have a different letter here. Use it instead of C in the following command...

REN C:\EFI_unwanted EFI <<<Rename it back

......................................................................

(2) After the reboot (presuming it did)...

Does BCDEdit /Enum {fwbootmgr} now show {bootmgr} on top?

Does BCDEdit /Enum {Bootmgr} name either HarddiskVolume9 or S: as the Device?

If so, try again...

ReagentC /Disable <<<Moves WinRE.wim to staging area

ReagentC /Enable <<<Moves it to the Recovery partition

ReagentC /Info <<<Show whether it is enabled

If it isn't enabled, let's see C:\Windows\Logs\ReAgent\Reagent.log. Just copy/paste the output of those three commands from the bottom of the log.

(3) A volume is a partition that has a file system on it. The Volume numbers enumerated by DiskPart are not the same as the HarddiskVolume numbers enumerated in the BCD. The BCD counts all partitions (with or without a file system) starting from Disk 0. Disk Management won't show them all. DiskPart will show them, this way...

DiskPart <<<Enter DiskPart

List Disk <<<List your 8 disks

Select Disk 0 <<<Focus on Disk 0

List Part <<<List its partitions

Select Disk 1

List Part

=== Continue with Disks 2 through 7 ===

Exit <<<Leave DiskPart

Looking at your prior listings, I now think the 8th partition down will be C. And EFI will be partition 9. Disks 0-5 will have 1 partition each, then Disk 6 shows...

Image

So -- HarddiskVolume8 is the Windows partition. (EFI is HarddiskVolume9). Yep, the BCD that is on C (shown with /Store) shows the letter...

Image

The one that is on EFI (S:) shows...

Image

We want the one on EFI (S:) to be the only one. Windows gets confused when there is more than one System partition.

Was this answer helpful?

10+ people found this answer helpful.
0 comments No comments

72 additional answers

Sort by: Oldest
  1. Anonymous
    2023-04-24T05:02:43+00:00

    Uh-oh. I think I see what you are saying now. Hmm. Your BCD shows...

    Image

    ...the location of the EFI partition in use is on HarddiskVolume1. That's what I want to say is the 1st partition on Disk 0. That's what it is in my case (with just one HDD). But yours is actually the 1st partition on Disk 1.

    Let's see "BCDEdit /Enum {FWBootMGR}". Does yours boot directly to Disk 1 or to {BootMGR}? I've long suspected a direct boot would cause the HarddiskVolume numbers to begin enumerating from the booted Disk. But it didn't seem to be happening in Lumince's case. How does his get to ...8, if the counting begins with the partitions on Disk 6? I would expect it to be ...3...

    Image

    Anyway, this is why I want to see his BCD that is on EFI. After the BCDBoot he presumably did (he hasn't acknowledged it) -- if the BCD looks good -- I think we can rename/delete C:\EFI (which he presumably has not already done). That hopefully will force BIOS to choose EFI -- whatever its HaddiskVolume number is.

    Edit: But definitely I'd want him to be able to rename it back in case of mishap. That means getting to a recovery environment. It likely would be wise to have a Recovery USB drive or a Win 10 Installation USB (which also has a recovery environment) handy just in case the Recovery partition will not work.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-04-24T05:53:45+00:00

    (a) Have you got output of a /SetREImage in C:\Windows\Logs\ReAgent\Reagent.log? Mine seems to have disappeared & I'm loath to run one. The last few I've seen seemed to do nothing -- even with a WinRE.wim already in the Recovery partition & a reboot. But the command would be just as Ramesh wrote, presuming R is the letter of the partition...

    ReagentC /Disable <<<Maybe I'd disable it first

    ReagentC /SetREImage /Path R:\Recovery\WindowsRE /Target C:\Windows

    ReagentC /Enable <<<Then enable it after.

    Then reboot I guess. Or should the reboot be done before the /Enable?

    (b) But just /Disable followed by /Enable did eventually work -- when the Recovery partition was made to fit the requirements. In the case I last saw, it was too small & had to be made larger. But Lumince's of 771 MB I would think is large enough (though mine is 848 MB). Anyway, the tale should be told if we can see his latest /Enable.

    Was this answer helpful?

    0 comments No comments
  3. Ramesh 181.6K Reputation points Volunteer Moderator
    2023-04-24T06:24:44+00:00

    Here's an interesting portion from the OP's reagent log. Again it's from the 18th log (before the thread was created).

    ****************

    2023-04-18 17:16:30, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:30, Info [ReAgentc.exe] -----Executing command line: reagentc /disable-----

    2023-04-18 17:16:30, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:30, Info [ReAgentc.exe] Enter WinReUnInstall

    2023-04-18 17:16:30, Info [ReAgentc.exe] Update enhanced config info is enabled.

    2023-04-18 17:16:30, Warning [ReAgentc.exe] winreGetWinReGuid open store failed: 0xc000000f

    2023-04-18 17:16:30, Info [ReAgentc.exe] winreGetWinReGuid returning 0X2

    2023-04-18 17:16:30, Info [ReAgentc.exe] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined (0x2)

    2023-04-18 17:16:30, Error [ReAgentc.exe] IOCTL_STORAGE_QUERY_PROPERTY failed: 0x1

    2023-04-18 17:16:30, Info [ReAgentc.exe] Winre is already disabled, nothing to do here

    2023-04-18 17:16:30, Warning [ReAgentc.exe] WinReUnInstall failed to uninstall (0x2) in file base\diagnosis\srt\reagent2\reagent\reagent.cpp line 1750

    2023-04-18 17:16:30, Info [ReAgentc.exe] Exit WinReUnInstall returns 0 with last error: 0x2

    2023-04-18 17:16:30, Error [ReAgentc.exe] WinReUnInstall failed: : 0x2

    2023-04-18 17:16:30, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:30, Info [ReAgentc.exe] -----Exiting command line: reagentc /disable, Error: 2-----

    2023-04-18 17:16:30, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:30, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:30, Info [ReAgentc.exe] -----Exiting command line: reagentc /disable, Error: 2-----

    2023-04-18 17:16:30, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:33, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:33, Info [ReAgentc.exe] -----Executing command line: reagentc /enable-----

    2023-04-18 17:16:33, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:33, Info [ReAgentc.exe] Enter WinRECheckGuid

    2023-04-18 17:16:33, Info [ReAgentc.exe] Parameter: TargetOsGuid: : NULL

    2023-04-18 17:16:33, Warning [ReAgentc.exe] winreGetOSGuidOrDefault GetCurrentOsGuid returned 0x2

    2023-04-18 17:16:33, Warning [ReAgentc.exe] (WinRE)WinRECheckGuid() winreGetOSGuidOrDefault failed

    2023-04-18 17:16:33, Info [ReAgentc.exe] Exit WinRECheckGuid return error code: 0x0

    2023-04-18 17:16:33, Info [ReAgentc.exe] Enter WinReInstall

    2023-04-18 17:16:33, Info [ReAgentc.exe] Parameter: ReInstallBecauseOfBitlocker: 0

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Install on target OS step 1: collect info like partition list, loading reagent.xml, source winre.wim and partition

    2023-04-18 17:16:33, Error [ReAgentc.exe] IOCTL_STORAGE_QUERY_PROPERTY failed: 0x1

    2023-04-18 17:16:33, Info [ReAgentc.exe] Enumerate and log all fixed partitions:

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{6b1db9e0-e0cd-4b3c-bda7-7209191abc88}, PartitionName:

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 0, offset: 135266304, free space: 0, total space: 0

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:3, DiskSignature:0, NTFS:0, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {00000000-0000-0000-0000-000000000000}

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {00000000-0000-0000-0000-000000000000}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{c641074b-297a-4f9e-9a7d-46b142cd4b3c}, PartitionName: \?\GLOBALROOT\device\harddisk6\partition3

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 3, offset: 998743474176, free space: 0, total space: 0

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:6, DiskSignature:0, NTFS:0, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {C12A7328-F81F-11D2-BA4B-00A0C93EC93B}

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {866B2729-4C6F-48B5-A501-61B04E6D6D23}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{60e8794a-9b00-918f-c9b3-e53fdd507489}, PartitionName: \?\GLOBALROOT\device\harddisk8\partition1

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 1, offset: 16384, free space: 0, total space: 6311936

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:8, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {6AE96F95-20AA-DC74-422C-ADBDE915273B}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{10e2292e-545c-461d-b757-29e6d301a847}, PartitionName: \?\GLOBALROOT\device\harddisk7\partition2

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 2, offset: 16777216, free space: 4032884584448, total space: 5000928423936

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:7, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {11D92676-230A-47A0-A355-2F81A86F3ECF}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{98742bc3-3a5f-4ad5-bba7-88c203eef8dd}, PartitionName: \?\GLOBALROOT\device\harddisk6\partition4

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 4, offset: 999393591296, free space: 89763840, total space: 808448000

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:6, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {866B2729-4C6F-48B5-A501-61B04E6D6D23}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{2f72fe48-bd38-418e-b5ac-4af859a680b6}, PartitionName: \?\GLOBALROOT\device\harddisk6\partition2

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 2, offset: 17825792, free space: 282017185792, total space: 998724931584

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:6, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:1, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {866B2729-4C6F-48B5-A501-61B04E6D6D23}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{1dddd0b0-0000-0000-0000-100000000000}, PartitionName: \?\GLOBALROOT\device\harddisk5\partition1

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 1, offset: 1048576, free space: 967488057344, total space: 2000396742656

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:5, DiskSignature:501076144, NTFS:1, Mbr:1, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] MBR partition id: 0x7

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {00000000-0000-0000-0000-000000000000}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{28f5cdd4-4bd5-4265-b7fb-028f521e9def}, PartitionName: \?\GLOBALROOT\device\harddisk4\partition1

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 1, offset: 1048576, free space: 155485822976, total space: 1000203087872

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:4, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {832502A8-60A0-11E7-AA13-F8461C8CD045}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{75fe20c6-0000-0000-0000-100000000000}, PartitionName: \?\GLOBALROOT\device\harddisk2\partition1

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 1, offset: 1048576, free space: 325269426176, total space: 500105736192

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:2, DiskSignature:1979588806, NTFS:1, Mbr:1, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] MBR partition id: 0x7

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {00000000-0000-0000-0000-000000000000}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{c09000af-a309-49ad-9c39-61a67c9da321}, PartitionName: \?\GLOBALROOT\device\harddisk1\partition2

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 2, offset: 16777216, free space: 131335675904, total space: 2000381014016

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:1, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {79F7FFF8-BDA4-46FD-BD6D-87EE1B31C115}

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Partition info--

    2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{d891bdd1-0000-0000-0000-100000000000}, PartitionName: \?\GLOBALROOT\device\harddisk0\partition1

    2023-04-18 17:16:33, Info [ReAgentc.exe] Partition number: 1, offset: 1048576, free space: 367921135616, total space: 500105736192

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskNumber:0, DiskSignature:-661537327, NTFS:1, Mbr:1, Active:0, Boot:0, BitlockerEnabled:0

    2023-04-18 17:16:33, Info [ReAgentc.exe] MBR partition id: 0x7

    2023-04-18 17:16:33, Info [ReAgentc.exe] DiskId: {00000000-0000-0000-0000-000000000000}

    2023-04-18 17:16:33, Info [ReAgentc.exe] Get downlevel ReAgent config

    2023-04-18 17:16:33, Info [ReAgentc.exe] Downlevel config file path: \Recovery\ReAgentOld.xml

    2023-04-18 17:16:33, Info [ReAgentc.exe] Checking for downlevel WinRE installation.

    2023-04-18 17:16:33, Info [ReAgentc.exe] DisableUpdateEnhancedConfigInfo

    2023-04-18 17:16:33, Info [ReAgentc.exe] First round search

    2023-04-18 17:16:33, Info [ReAgentc.exe] Get ReAgent config

    2023-04-18 17:16:33, Info [ReAgentc.exe] GetReAgentConfig Config file path: C:\windows\system32\Recovery\ReAgent.xml

    2023-04-18 17:16:33, Info [ReAgentc.exe] CheckRegKey test hook (SystemSetupInProgress) present and disabled

    2023-04-18 17:16:33, Info [ReAgentc.exe] Update enhanced config info is enabled.

    2023-04-18 17:16:33, Warning [ReAgentc.exe] winreGetWinReGuid open store failed: 0xc000000f

    2023-04-18 17:16:33, Info [ReAgentc.exe] winreGetWinReGuid returning 0X2

    2023-04-18 17:16:33, Info [ReAgentc.exe] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined (0x2)

    2023-04-18 17:16:33, Info [ReAgentc.exe] --Install on target OS step 2: detect and fix if there is any issue for winre settings

    2023-04-18 17:16:33, Info [ReAgentc.exe] DetectAndFixWinReIssues (WinRE)WinRE is already installed, setting BCD entry (winre location \?\GLOBALROOT\device\harddisk6\partition4\Recovery\WindowsRE)

    2023-04-18 17:16:33, Warning [ReAgentc.exe] winreGetWinReGuid open store failed: 0xc000000f

    2023-04-18 17:16:33, Info [ReAgentc.exe] winreGetWinReGuid returning 0X2

    2023-04-18 17:16:33, Info [ReAgentc.exe] DetectAndFixWinReIssues Failed to get WinRE GUID.

    2023-04-18 17:16:33, Info [ReAgentc.exe] DetectAndFixWinReIssues Will fix the BCD entry.

    2023-04-18 17:16:33, Warning [ReAgentc.exe] winreSetRecoverySequence open store failed: c000000f

    2023-04-18 17:16:33, Warning [ReAgentc.exe] winreSetRecoverySequencewinreSetRecoverySequence failed: 0xc000000f

    2023-04-18 17:16:33, Error [ReAgentc.exe] failed to detect and fix winre issues, error:0x2

    2023-04-18 17:16:33, Info [ReAgentc.exe] Exit WinReInstall return value: 0, last error: 0x2

    2023-04-18 17:16:33, Error [ReAgentc.exe] failed to install winre: : 0x2

    2023-04-18 17:16:33, Info [ReAgentc.exe] ------------------------------------------------------

    2023-04-18 17:16:33, Info [ReAgentc.exe] -----Exiting command line: reagentc /enable, Error: 2-----

    2023-04-18 17:16:33, Info [ReAgentc.exe] ------------------------------------------------------

    **************

    Sorry for the lengthy paste. I've bolded the exit codes to make it easy.

    The reagentc /disable command failed with Error 2. And the subsequent reagentc /enable failed, too. WinRE couldn't be enabled.

    I believe it's not just the /disable and /enable commands that did the trick. Something else suggested in between may have played its role, I think.

    Some commands executed during 19-23rd made the Recovery partition fit the requirements?

    Was this answer helpful?

    0 comments No comments
  4. Ramesh 181.6K Reputation points Volunteer Moderator
    2023-04-24T06:47:56+00:00

    Coming back to the BCD part, Let me summarize things for Lumince about what to do next.

    1. Pls upload the ReAgent.log as requested by PCR.
    2. Boot into WinRE, rename C:\EFI to C:\EFIBackup, or something else. Run BCDEDIT to find the OS partition's drive letter. Replace C:\EFI with the OS partition drive letter -- e.g., It could be E:\EFI. Keep the USB setup disk ready, just in case. If the system doesn't boot, you can revert the folder name to "EFI".
    3. Disconnect all HDDs except the OS drive either physically or via UEFI settings. Although this may not be required after PCR narrowed down the potential root cause. But this is the 3rd option you can try.

    Was this answer helpful?

    0 comments No comments