Setting WinRE (Windows Recovery Environment) Flag On Partitions

6

3

In AOMEI Partition Assistant I have cloned multiple partitions of one hard drive to another, however, the WRE flags have not been carried over, even when MSR and EFI have.

Is there any way to set WRE flags or is this even something that would have any effect on using WRE on the laptop the cloned HD will later be connected to?

Thanks in advance!

Davyd

Posted 2016-08-03T11:18:21.797

Reputation: 63

Answers

9

  • Run diskpart
  • Make sure of the correct disk number by running list disk command.
  • Run select disk X where X is the number of cloned disk.
  • Make sure of the correct WinRE partition(s) number by running list partition command.
  • select partition Y where Y is the number of WinRE partition.
  • Run set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac" to set Recovery Flag on the partition.

    (Optional): to provide more protection on partition Run gpt attributes=0x8000000000000001. This attribute is cumulative and the sum of 0x0000000000000001 (set as required partition by system) and 0x8000000000000000 (prevent assigning drive letter automatically on new machines).

  • Repeat last 2 steps for each of the additional WinRE partitions.

Note: Just for your consideration, you can also do this on MBR disks by running set id=27.

Update:

If you've accidentally set Recovery Partition ID (or any other ID) on a partition by mistake, to convert it to a normal partition again:

On an MBR Disk:

select disk X
select partition Y
set id=7

On a GPT Disk:

select disk X
select partition Y
set id="ebd0a0a2-b9e5-4433-87c0-68b6b72699c7"

Where 0x07 and ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 are partition type IDs for normal partitions respectively on MBR and GPT disks. (You can find it as the first item in the last link called PARTITION_BASIC_DATA_GUID. also for MBR see 3rd link).

Sources:

MBR Disks (BIOS installation):

GPT Disks (UEFI installation):

NetwOrchestration

Posted 2016-08-03T11:18:21.797

Reputation: 2 385

2Absolutely legendary. It was partition 7 rather than 6, but never mind, your instruction did exactly what I needed. In case I mistakenly assign the flag to the wrong partition, is there a way to reverse it? – Davyd – 2016-08-05T21:49:52.530

Sorry my bad, diskpart has it's own way of sorting disks and partitions. updated my answer with the instruction to revert to normal partition. Good Luck! – NetwOrchestration – 2016-08-05T22:47:28.523

So this flagged that partition properly, but it doesn't seem to allow me to boot into recovery on that partition still... also still can't create recovery media from that partition. I did the same thing as OP, cloning from one drive to another (I used EaseUS cloner), and this is the one thing that doesn't seem to work quite right. – PhoenixCodes – 2019-12-29T00:29:21.987