Open Command Prompt as an Administrator
Press Win + X and choose “Command Prompt (Admin)” from the menu.
Alternatively, search for “cmd” in the Start menu, right-click on “Command Prompt,” and select “Run as administrator.”
Check WinRE Status
Run the following command to check if Windows Recovery Environment (WinRE) is installed:
reagentc /info
Look for the path to the WinRE directory. If it’s already installed, you’ll see the path.
Disable WinRE
If WinRE is enabled, disable it using the following command:
reagentc /disable
Shrink the OS Partition (Usually C: Drive):
Run diskpart to open the DiskPart command line utility.
Type the following commands one by one:
list disk
select disk X # Replace X with the disk number of your OS drive (usually 0) list partition
Example 1 - Windows RE partition as First Partition
DISKPART> list partition Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Recovery 450 MB 1024 KB <<< Windows RE Partition Partition 2 System 99 MB 451 MB Partition 3 Reserved 16 MB 550 MB Partition 4 Primary 199 GB 566 MB <<< Windows OS Partition
Example 2 - Windows RE partition as Last Partition
DISKPART> list partition Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 System 103 MB 1024 KB Partition 2 Reserved 16 MB 104 MB Partition 3 Primary 237 GB 120 MB <<< Windows OS Partition Partition 4 Recovery 684 MB 237 GB <<< Windows RE Partition
Shrink the Windows OS Partition
You need to shrink the Windows OS Partition to make room for a larger WinRE partition.
If the Windows RE partition is the first partition, you need to shrink the OS partition the total amount required for the Windows RE partition (recommended 810 MB)
If the Windows RE partition is the last partition, you only need to shrink the OS partition by the amount you want to increase the WinRE partition (recommended 360 MB)
Type the following commands one by one:
select partition Y # Replace Y with the partition number of your Windows OS partition shrink desired=360 # Shrink the partition by 360 MB (adjust as needed)
Delete the Existing WinRE Partition
Still in diskpart, select the WinRE partition (usually a small one) and delete it:
select partition Z # Replace Z with the WinRE partition number delete partition override
Create a New Recovery Partition
Still in diskpart, check the partition table format:
The disk partition style will be either GUID Partition Table (GPT) or a Master Boot Record (MBR). To check run list disk. If there is an asterisk character (*) in the "GPT" column, then the drive is GPT. Otherwise, the drive is MBR.
GPT
If your disk is GPT, run:
create partition primary id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
gpt attributes =0x8000000000000001
format quick fs=ntfs label="Windows RE tools"
MBR
If your disk is MBR, run:
create partition primary id=27
format quick fs=ntfs label="Windows RE tools"
set id=27
Re-enable WinRE
Exit out of diskpart by running the command exit.
Run the following command to re-enable WinRE:
reagentc /enable
Confirm WinRE Installation
Verify that WinRE is installed by running:
reagentc /info
You should see the updated path to the WinRE directory.
References:
Comments
0 comments
Please sign in to leave a comment.