0

Background

I am trying to upgrade to Windows 11. I am currently running Windows 10 Pro (22H2). My system is an upgrade, and as part of preparing for Windows 11, I had to convert from MBR to GPT, and switch the BIOS over from running in Compatibility Mode (CSM) to now having that disabled and fully running in UEFI.

As part of that process, I had to delete the recovery partition because it was blocking the mbr2gpt process (albeit I had a previous copy of that partition available on an older drive).

Current Issue

I am now trying to run the Windows 11 upgrade, but it is failing. It is also failing to run a recent Windows 10 system update, with error codes of 0x80070002, and 0x80070643 respectively. Both point to WinRE being disabled, which it is, because I had to disable it as per above, and I have not been able to enable since.

I have tried a number of things

  1. Copy the partition from by backup drive to the current Disk (separate partition with 750Mb free space).
  2. Use reagentc /setimage after temporarily giving the recovery partition a drive letter to set the path to the recovery partition.
  3. Copy the WinRE.wim to c:\windows\system32\recovery, and then try to set the recoverypath using reagentc /setimage

When I have done this, if I then run reagentc /info, the data has not been updated (even though the command says successful). Looking into the ReAgent.log file, it shows an error as follows

open store failed: 0xc000000f
Failed to create BCD recovery entry 2

This suggests the BCD can't be written to. If I run BCDEdit, I get the error in the title of this post.

bcdedit /enum
The boot configuration data store could not be opened.
The system cannot find the file specified.

However, if I specify the EFI folder bcdedit /store C:\EFI\Microsoft\Boot\BCD /enum, then it shows the Boot Manager and Boot Loader. Further to this, if I open System Configuration, there are no entries in the Boot tab.

I suspect I need to resolve whatever is causing the BCD not to be found, so that I can resolve the WinRE issue, and in turn allow me to get Windows Updates to work again.

Last resort will be a clean install, but I am obviously nervous about all the files, settings etc that I will potentially lose.

Codemwnci
  • 141

1 Answers1

0

For anyone following along afterwards, I finally resolved the issue.

I am not 100% sure if the BCD was corrupted, or whether the issue was as a result of EFI being on the same partition as Windows, but I managed to create a new partition using the following commands (note that the disk and partition numbers are specific to my setup, so make sure you are selecting the correct disk and partition for your config).

diskpart
sel dis 1
lis par
sel par 1
shrink desired=100
create partition efi size=100
format quick fs=fat32 label="EFI"
assign letter=V
list par
lis vol
exit

Once I had created the EFI partition, I could then use the bcdboot command to rebuild the EFI boot record.

bcdboot C:\windows /s V: /F all

I rebooted at this point to make sure my PC still booted!! Which I was very relieved when it did.

Finally, I assigned my Recovery partition a Drive letter using

diskpart
sel disk 1
list par
sel par 3
assign letter=Z
exit

And once I had a drive letter assigned, I was able to sort the WinRE agent.

reagentc /setreimage /path Z:\Recovery\WindowsRE
reagentc /enable
Codemwnci
  • 141