Windows Recovery Environment

Page 1 of 2 12 LastLast
  1.    21 Apr 2018 #1

    Windows Recovery Environment


    I've made a clean install of Windows 10 Professional, my partiton layout
    Part1: Recovery
    Part2: EFI
    Part3: Microsoft Reserved
    Part4: Windows_C
    Unallocated
    Part1 is actually NTFS contains \Recovery\WindowsRE\WinRE.wim supposedly to be loaded as Recovery environment. After some modifications. Now I want to back to Original Microsoft Windows RE.
    I've successfully mounted Part1 as R:, now R:\Recovery\WndowsRE\WinRE.wim does exist and I WANT Recovery configuration point to this. I've also reset all ReAgentC.XML to 0 for the fileds id, guid, offset etc.
    But when I run reagentc /enable /setimage /parth R:\Recovery\WindowsRE, it does not perform my command. It always return:
    Windows RE location: \\?\GLOBALROOT\device\harddisk1\partition4\Recovery\WindowsRE
    I want it point to PARTITION1 not PARTITION4?
    Is there any way to use Notepad or in worst case hexedit to get it done?
    Thank you
      My ComputerSystem Spec

  2.    21 Apr 2018 #2

    Try disabling it first to unregister it from C:

    reagentc /disable
    reagentc /setreimage /path R:\Recovery\WindowsRE
    reagentc /enable
    reagentc /info

    You also have a typo "/parth"
      My ComputerSystem Spec

  3.    21 Apr 2018 #3

    No changes
    PS C:\Users\nguyenc> mountvol R: "\\?\Volume{cdddae3a-c085-4309-acda-0789503bdb45}"
    PS C:\Users\nguyenc> reagentc /disable
    REAGENTC.EXE: Operation Successful.

    PS C:\Users\nguyenc> reagentc /setreimage /path R:\Recovery\WindowsRE
    Directory set to: \\?\GLOBALROOT\device\harddisk1\partition1\Recovery\WindowsRE

    REAGENTC.EXE: Operation Successful.

    PS C:\Users\nguyenc> reagentc /enable
    REAGENTC.EXE: Operation Successful.

    PS C:\Users\nguyenc> reagentc /info
    Windows Recovery Environment (Windows RE) and system reset configuration
    Information:

    Windows RE status: Enabled
    Windows RE location: \\?\GLOBALROOT\device\harddisk1\partition4\Recovery\WindowsRE
    Boot Configuration Data (BCD) identifier: f554b0fa-4301-11e8-ae5d-80ac6b3e47c5
    Recovery image location:
    Recovery image index: 0
    Custom image location:
    Custom image index: 0

    REAGENTC.EXE: Operation Successful.
      My ComputerSystem Spec

  4.    21 Apr 2018 #4

    create a log file:

    reagentc /disable
    reagentc /setreimage /path R:\Recovery\WindowsRE
    reagentc /enable /logpath c:\WinRE.log

    I'm getting same issue as you:
    Code:
    PS C:\WINDOWS\system32> reagentc /disable
    REAGENTC.EXE: Operation Successful.
    
    PS C:\WINDOWS\system32> reagentc /setreimage /path R:\Recovery\WindowsRE\WinRE.wim
    Directory set to: \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE
    
    REAGENTC.EXE: Operation Successful.
    
    PS C:\WINDOWS\system32> reagentc /enable /logpath c:\WinRE.log
    REAGENTC.EXE: Operation Successful.
    
    PS C:\WINDOWS\system32> reagentc /info
    Windows Recovery Environment (Windows RE) and system reset configuration
    Information:
    
        Windows RE status:         Enabled
        Windows RE location:       \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE
        Boot Configuration Data (BCD) identifier: 8ddcf088-4251-11e8-a432-f20650aa86e6
        Recovery image location:
        Recovery image index:      0
        Custom image location:
        Custom image index:        0
    
    REAGENTC.EXE: Operation Successful.
    
    PS C:\WINDOWS\system32>

    It says my Recovery partition is too small - from c:\WinRE.log

    Code:
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements Partition details: {Offset: 1048576, Free space: 40579072, Total space: 471855104}
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements WinRE WIM size: 416713175
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements Required free space: 52428800
    2018-04-21 09:35:43, Warning                      [ReAgentc.exe] MeetPartitionRequirements Not enough free space req = 52428800 avail = 40579072 offset = 1048576 
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] --Install on target OS step 4: check if we can put winre.wim in other partitions or create one if needed.
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] CanPutWinREOnOtherPartitions WinRE is not staged. Searching for a suitable partition for WinRE.
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] Entering FindTargetPartition
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  Not allowed to repartition the disk
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] Start looping through each partition and initialize os partition, recovery partition and system partition for MBR
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  Checking partition at offset 472907776, partition number: 2
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  skip GPT Partition which type is not PARTITION_MSFT_RECOVERY_GUID
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  Checking partition at offset 114889326592, partition number: 5
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  skip GPT Partition which type is not PARTITION_MSFT_RECOVERY_GUID
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  Checking partition at offset 594542592, partition number: 4
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  find OS partition
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  Checking partition at offset 1048576, partition number: 1
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements Partition details: {Offset: 1048576, Free space: 40579072, Total space: 471855104}
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements WinRE WIM size: 416713175
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements Required free space: 52428800
    2018-04-21 09:35:43, Warning                      [ReAgentc.exe] MeetPartitionRequirements Not enough free space req = 52428800 avail = 40579072 offset = 1048576 
    2018-04-21 09:35:43, Info                         [ReAgentc.exe]  skip partition because it does not meet WinRE requirements
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] Complete looping through each partition
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] ----Search target partition option #1: try existing WinRE partition
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] ----Search target partition option #2: try first recovery partition
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] ----Search target partition option #3: try system partition for MBR
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] ----Search target partition option #4: try new recovery partition if allowed
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] ----Search target partition option #5: try target OS partition
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements Partition details: {Offset: 594542592, Free space: 18595831808, Total space: 114294779904}
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements WinRE WIM size: 416713175
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] MeetPartitionRequirements Required free space: 469141975
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] Found target partition: use target OS partition, offset: 594542592
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] Exit FindTargetPartition returns with status code: 0x0
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] --Install on target OS step 5: set WinRE settings and restore system to a good state when hitting any errors
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] Enter SetWinRESettings
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
    2018-04-21 09:35:43, Info                         [ReAgentc.exe] Copying WinRE from \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE to staging location on \\?\GLOBALROOT\device\harddisk0\partition4
    My WinRE partition is 500MB - looks like it decides there is not enough free space so as it can't repartition it copies WinRE.wim to C and registers it there.

    These are the rules:
    If the partition is less than 500 MB, it must have at least 50 MB of free space.
    If the partition is 500 MB or larger, it must have at least 320 MB of free space.
    UEFI/GPT-based hard drive partitions | Microsoft Docs

    I tried deleting my recovery partition and recreating it 499MB:
    Code:
    DISKPART> select disk 0
    
    Disk 0 is now the selected disk.
    
    DISKPART> list partition
    
      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    Recovery           449 MB  1024 KB
      Partition 2    System             100 MB   451 MB
      Partition 3    Reserved            16 MB   551 MB
      Partition 4    Primary            106 GB   567 MB
      Partition 5    Primary           6144 MB   106 GB
    
    DISKPART> list volume
    
      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  --------
      Volume 0     R   Recovery     NTFS   Partition    449 MB  Healthy
      Volume 1     C   MacBook      NTFS   Partition    106 GB  Healthy    Boot
      Volume 2     D                ReFS   Partition   6144 MB  Healthy
      Volume 3                      FAT32  Partition    100 MB  Healthy    System
    
    DISKPART>
    That didn't work either - same issue - so the free space check in reagentc seems to be bugged (I tried on both 16299 BIOS and 117134.1 UEFI). At least the way it works doesn't conform to documentation as my WinRE.wim is 397MB which leaves more than 50MB of free space it claims is required.

    If you have the same cause in your log file then it looks like we both need to shuffle our partitions around and make a bigger recovery.

    MS recommend putting recovery after C these days (see here).

    Personally I'm going to wait until Spring update and do clean install with recovery 1GB after C. It definitely didn't do this when I clean installed last year - it worked fine.
    Last edited by lx07; 21 Apr 2018 at 03:51.
      My ComputerSystem Spec

  5.    21 Apr 2018 #5

    Thanks for the hints,

    I just shrinked WinRE partition from 499M down to 449M before moving to SSD. I am upgrading to Windows Insider Preview 17650 RS5 now. Will expand it to 499M and report back.

    Thank you
      My ComputerSystem Spec

  6.    21 Apr 2018 #6

    Just upgraded to Windows 10 Pro Insider Preview 17650 RS5. The upgrade delete old recovery files in Part1, shrinked Part4 Windows_C and allocate a new Part5 as Recovery of 720MB
    Code:
    PS R:\Recovery\WindowsRE> cmd /c dir /a
     Volume in drive R has no label.
     Volume Serial Number is 28B7-860A
    
     Directory of R:\Recovery\WindowsRE
    
    04/21/2018  06:12 PM    <DIR>          .
    04/21/2018  06:12 PM    <DIR>          ..
    04/15/2018  07:17 PM         3,170,304 boot.sdi
    04/21/2018  06:12 PM             1,115 ReAgent.xml
    04/21/2018  05:03 PM       441,799,058 Winre.wim
                   3 File(s)    444,970,477 bytes
                   2 Dir(s)     369,410,048 bytes free
    .
    Now I am reorganizing partitions on my disk and move Recovery back to Part1 and experiment how big it needs for new recovery.
    Thanks
      My ComputerSystem Spec

  7. topgundcp's Avatar
    Posts : 2,438
    Ubuntu14.04x64 MintMate17x64 Win10Prox64
       21 Apr 2018 #7

    First set Folder option to show all hidden file.

    Here's how ReAgentc works:
    With ReAgentc /disable:
    1. WinRe.wim is moved to C:\Windows\System32\Recovery
    2. Also a copy of ReAgent.xml is created and the first few lines contains all 0's
    3. <?xml version='1.0' encoding='utf-8'?><WindowsRE version="2.0"> <WinreBCD id="{00000000-0000-0000-0000-000000000000}"/> <WinreLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/> <ImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/>
    4. WindowsRe folder is removed from the Recovery partition as shown:
      Click image for larger version. 

Name:	ReDisable.jpg 
Views:	74 
Size:	31.1 KB 
ID:	185431


    With Reagentc /Enable:
    1. WindowsRE folder is re-created and contains 3 files: WinRe.wim is moved back into this folder, boot.sdi and a new ReAgent.xml is created and the first few lines contains:
      <?xml version='1.0' encoding='utf-8'?><WindowsRE version="2.0"> <WinreBCD id="{2234e4d9-43fd-11e8-ae15-d43d7e93ddbf}"/> <WinreLocation path="\Recovery\WindowsRE" id="0" offset="1048576" guid="{50d1d77f-76ba-4d30-a47f-e8a6967616ab}"/> <ImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/> <PBRImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000000000000000}" index="0"/>
      NOTE: The new ReAgent.xml is also saved in: C:\Windows\System32\Recovery
      Click image for larger version. 

Name:	ReEnable.jpg 
Views:	74 
Size:	41.2 KB 
ID:	185434


    You need not to mount/assign any letter to the Recovery partition. If for some reason it's broken. Make sure you have WinRe.wim and Reagent.xml (containing all 0's) under: C:\Windows\System32\Recovery
    then type: reagentc /enable

    FYI, WinRE.wim is ~350MB so if the Recovery partition is 450MB, it's plenty of room. Starting with version 1709 and later the Recovery partition size is: 500MB.
      My ComputerSystem Spec

  8.    21 Apr 2018 #8

    Hi there,

    With MiniTool Partition Manager I was playing around with all partition on my SDD, which is relative small 128GB so all relocations finish in 10 mins include 3-4 reboot cycles. I made Partitions Copies with Macrium Reflect for just in case backups. I've put My REcovery Partition as part1 of 790MB Size as it initially set after upgrading to 17650.

    I've test recovery boot with reagentc /boottore and reboot. All recovery works.

    Actually I've never used Reset or Recovery windows before, I found clean install with properly backup restore tool is much faster than recovery a troubled OS.

    Thank you
      My ComputerSystem Spec

  9.    21 Apr 2018 #9

    HollowKnight said: View Post
    Actually I've never used Reset or Recovery windows before, I found clean install with properly backup restore tool is much faster than recovery a troubled OS.

    Thank you
    I don't keep recovery partitions on my computers. Everything available in the recovery partition is also available by booting from a Windows 10 installation USB flash drive. And...like you say...if my system gets messed up enough to actually require the recovery partition, I'm going to restore a backup image or do a clean install anyway.
      My ComputerSystem Spec

  10.    21 Apr 2018 #10

    topgundcp said: View Post
    FYI, WinRE.wim is ~350MB so if the Recovery partition is 450MB, it's plenty of room. Starting with version 1709 and later the Recovery partition size is: 500MB.
    WinRE of 17650 Insider Preview is 441M, and clean install set default recovery partition 500MB as part1 followed by 100M EFI, 16MB Microsoft Reserved then C_DRIVE system partitions.
    Code:
    PS C:\WINDOWS\system32> cmd /c dir /a R:\Recovery\WindowsRE\
     Volume in drive R is Windows RE
     Volume Serial Number is CED4-0B20
    
     Directory of R:\Recovery\WindowsRE
    
    04/22/2018  07:24 PM    <DIR>          .
    04/22/2018  07:24 PM    <DIR>          ..
    04/15/2018  07:17 PM         3,170,304 boot.sdi
    04/22/2018  07:24 PM             1,135 ReAgent.xml
    04/21/2018  05:03 PM       441,799,058 Winre.wim
                   3 File(s)    444,970,497 bytes
                   2 Dir(s)      63,209,472 bytes free
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
These questions may be plainly obvious to many. However before now I have never copied partitions to a new drive and am approaching all of this from a position of ignorance. I recently installed a 250gb mSata SSD into my laptop meant to boot...
When I create a WinRE flash drive from which to boot, the ADVANCED OPTIONS window contains 5 options to choose from. However, when I am already in Windows 10 and click the following: SETTINGS → UPDATE & SECURITY → RECOVERY→ ADVANCED STARTUP →...
How to Troubleshoot Windows 10 failure to boot using Recovery Environment Windows failing to boot can be a daunting experience, the Recovery environment built into Windows 10 is designed to overcome a variety of problems that cause Windows 10 to...
Hi guys, good day. I need your help regarding with reseting my laptop. I clone my OS from hdd to ssd using easeUS. after cloning I formatted my hdd since I'm confident that everything is ok. now I can't reset my laptop because of this error. I had...
Solved Can't enable Windows Recovery Environment in Performance & Maintenance
OS: Windows 10 Pro 64-bit Without WinRE I can't repair my system from the hard drive if something happens at boot, or if I need to reset my system. This is what happens when I type reagentc /info: 33647 It shows that WinRE is disabled. I...

Tags for this Thread

Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 14:36.
Find Us