Create A Windows Recovery Environment (Windows RE) Partition

Discussion in 'backup, imaging & disk mgmt' started by Hadron, Aug 24, 2021.

  1. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    I sometimes see people asking how to repair their Windows Recovery Environment (Windows RE) partition.
    I have even seen people saying that they don't even have one, or they accidentally deleted it.

    If only they could simply create a new one.

    So, my question is:
    Is it possible to create (and enable) a working Windows Recovery Environment (Windows RE) partition?

    Reagentc - Info Enabled.png
     
  2. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    Hadron,

    This works. I had fun working it out. From BootIt UEFI the RE partition was deleted. Booted into Win10 and confirmed the RE wasn't functional.
    In BootIt UEFI a 600 MiB NTFS partition was created and the GUID Partition Type was changed from Normal Data to Microsoft Recovery. The partition was named RE.
    I had copied WinRE.wim from another computer to a UFD.
    Still in BIU, TeraByte Explorer was used to copy WinRE.wim from the UFD to System32\Recovery in the Win10 partition.
    Booted into Win10.
    reagentc /enable

    The RE is now functional. The RE partition was checked and the correct files were in the Recovery folder.
     
  3. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    Thanks, Brian.

    I'll have to boot back into BootIt UEFI and look for GUID Partition Type and TeraByte Explorer.
    I found winre.wim in a hidden and locked partition. I mounted an image and got it.
     
  4. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    After you create the NTFS partition, select it and click Properties. In the Type field, choose Microsoft Recovery.

    Click Run on the BIU desktop, tbexplo.tbs
    It's all keyboard from here.
    You have to Mount a partition (drive path identifier)
    To see Hidden files, press CTRL+ o (that's not a zero). Tick (use Spacebar) View hidden files, View system files. Press Enter.

    Press F1 for Help
     
  5. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    Thanks for all that, Brian.
     
  6. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    A quick summary of using TeraByte Explorer from BIU. Have UFD (containing Winre.wim) plugged in.

    Run, tbexplo.tbs
    File Explorer
    Scroll down with down arrow to Mount/Unmount a drive path identifier
    Enter
    Arrow down to your UFD partition
    Enter
    Press Ctrl o
    Select (use down arrow and Spacebar) View hidden files, View system files. The items should have an X in the box. Press Enter.
    now you should see Winre.wim
    select it
    spacebar to put an X in the box
    Ctrl c
    to copy (sometimes you have to press this several times)
    You now see Select target for Copy (1 file) and press Ctrl+<V>
    arrow down to Mount/Unmount a drive path identifier
    Enter
    1: will be selected. Press Enter
    Arrow down to the Win10 partition
    Enter
    Arrow down to the Windows folder
    Enter
    press s and arrow down to System32 folder
    Enter
    press r and arrow down to the Recovery folder
    Enter
    The .. partition will be highlighted. Press Ctrl+<V> (Ctrl v)
    to paste (sometimes you have to press this several times)
    You will soon see Press <Enter> to continue...
    Enter
    You should see Winre.wim in the folder
    Press Esc
    Exit explorer
     
  7. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    Thanks, Brian.

    I've saved all that. :thumb:
     
  8. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    Or you can use a script which creates the RE partition and copies Winre.wim from the UFD to the Windows folder. It does this in a few seconds.

    Code:
    add partition 1 0x80 600 7 RE 0 /a=2048
    set part type 1 0x04 {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}
    open fs 0: 0 0x01
    open fs 1: 4 0x03
    copy file 0:\Winre.wim 1:\Windows\System32\Recovery /y
    close fs 0:
    close fs 1: 
     
  9. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    That looks good, Brian.
    I don't have a Winre.wim in C:\Windows\System32\Recovery on my computers. Should I?
    I have seen some tutorials referring to it being there.

    I know in previous Windows installation it was there.
    But my Windows 10 and 11 installations don't have it there.

    It's in the Recovery partitions though.
     
  10. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    When you run...

    reagentc /enable

    ... Winre.wim is moved from C:\Windows\System32\Recovery to the Recovery partition.

    When you run...

    reagentc /disable

    ... Winre.wim is moved back to C:\Windows\System32\Recovery
     
  11. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    That explains it.
    I would have thought that it would just copy rather than move.
     
  12. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    This question is still related to the recovery partition.

    If I want to browse a restricted image folder like in the Recovery partition, Macrium Reflect has the option to "Enable access to restricted folders".
    Drive Snapshot also has this feature called: Assign access rights to explorer.

    But I cannot find it in any of the TeraByte mounting tools.
    I am sure one of the TeraByte mounting tools must have it, and I have probably used it in the past, but I cannot see it at present.
    I thought either TBIHD, TBIMount or TBIView had this functionality.
     
  13. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    If you use TBIView then hidden/system files are seen by default.

    When using TeraByte Explorer...

    Press Ctrl o
    Select (use down arrow and Spacebar) View hidden files, View system files. The items should have an X in the box. Press Enter.
     
  14. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    That's even easier, Brian.
    No mounting needed.

    I was looking for an option to select. That's why I missed it. There is no option as it's on by default.
     
  15. EASTER

    EASTER Registered Member

    Joined:
    Jul 28, 2007
    Posts:
    11,126
    Location:
    U.S.A. (South)
    r
    That script version is quite good. I certainly need to try that since I on occasion run into a issue where on 8.1 performing a Reset or even Refresh needs path to the Recovery WIM. DISM is my friend. Didn't know that about reagentc either until now.
     
    Last edited: Aug 25, 2021
  16. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    That script is for my test computer. Make sure you get the correct Drives and Partition IDs for your computer.

    In BIU, BCD Edit, check
    Device
    Windows Recovery
    Ram Disk DI Device

    The Value should be the correct HD and the RE partition. If not, click Edit.
    If the RE partition is present then the BCD Edit should be sufficient.
     
  17. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
  18. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    Just back on this again.
    This would be assuming that Winre.wim is still in Windows\System32\Recovery.
    As I said in an earlier post, I don't know why Windows doesn't copy Winre.wim instead of moving it.

    Edit: This is for copying Winre.wim in that folder from a UFD.
    I misunderstood.
     
  19. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    Partition GUID Types...

    Code:
    EFI System partition                {C12A7328-F81F-11D2-BA4B-00A0C93EC93B}
    
    Microsoft Reserved Partition (MSR)  {E3C9E316-0B5C-4DB8-817D-F92DF00215AE}
    
    Basic data partition [Normal Data]  {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}
    
    Windows Recovery Environment        {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}
    
    Linux filesystem data [Linux Data]  {0FC63DAF-8483-4772-8E79-3D69D8477DE4}
    
    Linux Swap partition                {0657FD6D-A4AB-43C4-84E5-0933C84B4F4F}
    
    BootIt Hidden                       {6F422ADF-746F-7449-2048-696464656E2A}
    
     
  20. EASTER

    EASTER Registered Member

    Joined:
    Jul 28, 2007
    Posts:
    11,126
    Location:
    U.S.A. (South)
    Useful. Thanks @Hadron opening this topic.
     
  21. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    Yeah, it is very hard to find an actual tutorial on creating a proper Windows Recovery Environment (Windows RE) Partition.
    Most of the sites I visited looking for information only showed how to make Windows recovery media, which of course is a different thing altogether.

    Thanks again, Brian.
     
  22. EASTER

    EASTER Registered Member

    Joined:
    Jul 28, 2007
    Posts:
    11,126
    Location:
    U.S.A. (South)
    Are either of you familiar with this command and it's purpose?

    Reagentc /Setosimage /Path c:\Recover /Target C:\Windows /Index 1
     
  23. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
  24. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    This Microsoft document explains it.
    And this Microsoft document explains push-button resets. Here's another Microsoft document explaining push-button resets and state that it is available for Windows 10. The other two documents say not.
     
  25. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    I probably don't use the Recovery Environment. I've never done a Reset this PC and probably never will. Restoring images is my preference. I assume Reset this PC takes an hour. Maybe. An image restore takes a minute.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.