Windows upgrades may fail if the Recovery partition is too small. This guide explains how to resize or recreate it to ensure WinRE functions correctly.
Follow these steps carefully to avoid installation errors and maintain a working recovery environment.
Background
During installation, Windows automatically creates a Recovery partition. This partition contains the Windows Recovery Environment (WinRE), troubleshooting tools, reset/refresh files, and sometimes OEM recovery utilities. If the partition is undersized, upgrades may fail with errors such as 0x8007001F or 0xc1900104 because WinRE files cannot be updated.
Step 1: Disable WinRE
reagentc /disable
Run this command in an elevated Command Prompt to disable WinRE before making changes.
Step 2: Shrink C Drive
- Press Windows Key + X and select Disk Management.
- Right-click the C drive and select Shrink Volume.
- Shrink to create at least 1 GB of unallocated space (recommended).
Step 3: Create Recovery Partition
diskpart list disk select disk 0 list partition select partition 4 delete partition override create partition primary size=1026 format fs=ntfs quick label="Recovery"
Remove the size specification if you want the partition to use all remaining unallocated space.
NOTE: Replace 0 with your Windows disk number.
Replace 4 with your Recovery partition number, if needed.
For GPT Disks (UEFI systems):
set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac gpt attributes=0x8000000000000001
For MBR Disks (Legacy BIOS):
set id=27
assign letter=R exit
Step 4: Configure Recovery Partition
del /f /q C:\Windows\System32\Recovery\ReAgent.xml attrib -h -s -r C:\Windows\System32\Recovery\Winre.wim mkdir R:\Recovery\WindowsRE copy C:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\ attrib +h +s R:\Recovery\WindowsRE\Winre.wim reagentc /setreimage /path R:\Recovery\WindowsRE reagentc /enable
These commands delete the old configuration, copy the WinRE image to the new partition, protect it with hidden/system attributes, and register the recovery environment.
Step 5: Verify
reagentc /info
This confirms WinRE is enabled and points to the correct partition.
Step 6: Finalize
diskpart list volume select volume R remove letter R
Remove the temporary drive letter from the Recovery partition, then reboot the system.
Conclusion
By resizing or recreating the Recovery partition, you ensure that Windows can update WinRE files properly and maintain a reliable recovery environment.
This process helps future-proof your system and prevents upgrade errors caused by insufficient partition size.
