How to fix missing Recovery Partition on Windows 11 using new WinRE.wim

Configurare noua (How To)

Situatie

If the “winre.wim” file is missing from the system’s “Recovery” folder, you can recreate the Recovery Partition using the “winre.wim” file available inside the “install.wim” file from the Windows 11 ISO file.

To create a new Recovery Partition by extracting the winre.wim from the install.wim file, follow these steps:

Solutie

1. Open Settings

2. Click on Storage

3. Click on Advanced storage settings under the “Storage management” section

4. Click on Disks & volumes

5. Select the Windows 11 volume and click the Properties option

6. Click the Change size button.( Quick note: If the drive has some available unallocated space, you don’t have to shrink the Windows 11 installation, and you can skip to step 9)

7. Confirm the “Max” value in the New (MB) setting to indicate the total size of the partition (C:) where Windows 11 is installed, but leave at least 1024MB (1GB) to create a new Recovery Partition. For example, if the maximum size of the partition that can be used is 307082, then subtract 1024, and use that as the new number (306058).

8. Click the OK button

9. Open Start

10. Search for Command Prompt, right-click the top result, and select the Run as administrator option

11. Type the following command to run the DiskPart tool and press Enter: diskpart

12. (Option 1) Type the following command to create a new partition with the renaming unallocated space and press Enter: create partition primary

13. (Option 2) Type the following command to recreate the missing Recovery Partition of exactly 1GB and press Enter: create partition primary size=1024

14. Type the following command to format the new partition as NTFS and press Enter: format fs=ntfs quick

15. Type the following command to register the new partition as the Recovery Partition in the system and press Enter: set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac override

16. Type the following command to lock and prevent users from modifying this partition and press Enter: gpt attributes=0x8000000000000001

17. Type the following command to exit the DiskPart tool and press Enter: exit

18. Connect the USB bootable flash drive (or mount the Windows 11 ISO to File Explorer).(Quick tip: You can always mount the Windows 11 ISO file by right-clicking the file and choosing the “Mount” option. Also, make sure to note the drive letter of the mount point or the USB bootable media, as you’ll need this information in step 20.)

19. Type the following command to create two custom folders and press Enter: mkdir “%USERPROFILE%\Downloads\Images” “%USERPROFILE%\Downloads\Mount”

20. Type the following command to copy the “Install.wim” image to the “Images” folder (this command may take a while to complete) and press Enter: xcopy “D:\Sources\install.wim” “%USERPROFILE%\Downloads\Images\” /H /E /C /I /Y

21. Type the following command to mount the Install.wim image and press Enter: dism /Mount-Image /ImageFile:”%USERPROFILE%\Downloads\Images\install.wim” /Index:6 /MountDir:”%USERPROFILE%\Downloads\Mount”

Important: In this step, I’m using the number “6” for index, which means that I’ll interact with the Pro edition of Windows 11. If you have another version, you will have to specify the index number within the image. You can use the dism /Get-WimInfo /WimFile:D:\sources\install.wim command to determine the index number for your edition of the operating system. (Remember to change “D” for the drive letter for the drive with the installation files.)

22. Type the following command to rename the existing ReAgent file in the “Recovery” folder and press Enter: ren C:\Windows\System32\Recovery\reagent.xml Reagent.xml.bak

23. Type the following commands to copy the “Winre.wim” and “ReAgent.xml” files to the “Recovery” folder and press Enter:

xcopy “%USERPROFILE%\Downloads\Mount\Windows\System32\Recovery\winre.wim” “C:\Windows\System32\Recovery\” /H /E /C /I /Y
xcopy “%USERPROFILE%\Downloads\Mount\Windows\System32\Recovery\reagent.xml” “C:\Windows\System32\Recovery\” /H /E /C /I /Y

24. Type the following command to re-enable the recovery environment in the new partition and press Enter: reagentc /enable

25. Type the following command to confirm the Windows Recovery Environment state and press Enter: reagentc /info

26. Type the following commands (one at a time) to dismount the “Install.wim” image and press Enter:

dism /Unmount-Image /MountDir:”%USERPROFILE%\Downloads\Mount” /discard
dism /Cleanup-Wim

Once you complete the steps, the missing Recovery Partition will be recreated on the computer.

Tip solutie

Permanent

Voteaza

(7 din 19 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?