Repairing Recovery Partition


Joined
May 9, 2020
Messages
3
Reaction score
1
Hello, my recovery partition got messed up when I converted my OS disk to gpt (mbr2gpt.exe tool).

I have changed my recovery partition to a readable drive and I have assigned it a letter. (I will add my process in a reply to this post).
I have turned off recovery using reagentc /disable

now I am trying to use the command reagentc /setreimage /path f:\Recovery\WindowsRE to assign the recovery directory. (F is the drive that is my recovery partition)
I get the error:
REAGENTC.EXE: The specified path was not found.

In windows explorer, I can see that the f:\recovery folder is "Read Only" is (box filled mark). "Hidden" is greyed out. I have already tried turning off "Read Only" but that seemed to not have any effect, for when I close and reopen properties, the box is filled again. Access is denied.

I figure that I could try changing the Owner using the advanced security dialog, but I am wary of doing that since I don't know if I'll be able to set it up again.

Does anyone have any suggestions? Hopefully I'm missing an easier path.
 
Ad

Advertisements

Joined
May 9, 2020
Messages
3
Reaction score
1
Here is what I have found in my attempts to fix my recovery partition.
Recovery info is usually stored in c:\windows\system32\\Recovery

Note all commands are done through an Administrator Command Prompt.

Many of these steps stem from trying to find a way to feed a path to reagentc /setreimage /path:

The difficulty is in finding a way to point to the hidden partition. Other users have reported luck with changing the partition into a lettered partition, assigning the path, and then removing the letter.

When I run reagentc /disable the file winre.wim is placed in this folder (hopefully from some recovery location on my disk)

I ran the disable command
Then I used diskpart to make the recovery partition accessible.
You need to find the hidden partition by opening Disk Management and selecting the recovery partition in the graphical boxes.
This will highlight the corresponding partition number.
Select the partition in diskpart. if you type "detail part" you will see the "type" The type for a hidden windows recovery partition is de94bba4-06d1-4d40-a16a-bfd50179d6ac as documented here: https://docs.microsoft.com/en-us/wi...partition_information_gpt?redirectedfrom=MSDN

If you have a 2 digit type, then you are on an MBR partition.

I followed instructions to use SET ID= XXXX OVERRIDE
replace XXXX with the Basic Data partition type in the referenced document.

then you can ASSIGN LETTER=X where X is a free letter on your system (later on it looks like you remove the letter by selecting the partition and entering "REMOVE" but I haven't tested.)

The drive might not show up until you go to "Disk Management" -> Action -> Rescan Disk

Now, if you are like me, you have a drive letter that contains a "Recovery" folder that is locked down.

The next steps would be to use reagentc /setreimage /path X:\Recovery\WindowsRE
When this is run, reagent reports that it identifies the path using a notation like: \\?\GLOBALROOT\device\harddiskX\partitionx\Recovery\WindowsRE

I have worked out my partition and disk numbers, but entering those into the command line seems to not work. Another user has reported that this form did not work for them, but using a path like c:\apath did work for them.

Theory time:
Then hopefully when you run reagentc /enable, the .wim file will be placed in the location you specified.
Running reagentc /info would hopefully confirm your target path.
Use diskpart to remove the drive letter, then turn the partition type back to the original one.

disabling and enabling reagentc can't hurt.

To further check on your settings:
in c:\windows\system32\recovery I have a file called ReAgent.xml. Right now, after an ImageLocation entry, my path guid is all zeros instead of a real guid. I believe a correct "setreimage" command will fix that.

Then there is the BCD, you can check your bootloader settings to see where your loader points to, instructions are here:
Although I'm not sure what I should see if the target is a hidden partition.

Other Info:
ReAgent keeps a log in a directory like c:\windows\logs\reagent
you can automatically reboot into the recovery environment using reagentc /boottore

I can boot to an RE environment, but I do not know how to determine where I booted from (what image was used). It looks like the process creates a ram disk, and diskpart shows abnormalities.
 
Joined
Feb 22, 2014
Messages
1,485
Reaction score
297
Will the recovery partition boot, if you flagged it as the active partition?

Warning though, if you decide to try! Please make sure you can change the active partition without using Windows. That way you can return the Windows partition to active, if something doesn't work as intended. A third party partition manager on a USB stick will do the job.

The reason I ask is in the past, I have deleted all partitions except the recovery partition. Then I flagged the recovery partition as active. After a reboot the recovery partition would load and restore the machine. However I have no experience with GPT file system. I don't know how that effects the recovery partition, or boot process. Or if the recovery partition is even capable of recovering to a GPT partition.
 
Ad

Advertisements

Joined
May 9, 2020
Messages
3
Reaction score
1
Will the recovery partition boot, if you flagged it as the active partition?

Warning though, if you decide to try! Please make sure you can change the active partition without using Windows. That way you can return the Windows partition to active, if something doesn't work as intended. A third party partition manager on a USB stick will do the job.

The reason I ask is in the past, I have deleted all partitions except the recovery partition. Then I flagged the recovery partition as active. After a reboot the recovery partition would load and restore the machine. However I have no experience with GPT file system. I don't know how that effects the recovery partition, or boot process. Or if the recovery partition is even capable of recovering to a GPT partition.

Edit: my mistake, I didn't specify that I'm using UEFI and GPT. End Edit.

Just checking, with GPT and UEFI can you still just boot to a recovery image by turning a partition active? I think you have to load an image nowadays (where MBR you just pointed the boot partition to the recovery drive), but I could be wrong. I will check tomorrow.
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top