Create a new Recovery Partition in Windows

windows-create-new-recovery-partition-01

If your Microsoft Windows installation doesn't have the Recovery Partition configured. you can create a new Recovery Partition by following a specific procedure.

When Windows is deployed, the installation wizard automatically creates a Recovery Partition placed as last partition on the OS disk.

windows-create-new-recovery-partition-02

 

Create a new Recovery Partition

In this example, a Microsoft Windows Server 2022 has been configured.

Open the Command Prompt as Administrator and run the diskpart command to list the available disks:

# diskpart
# list disk

windows-create-new-recovery-partition-03

Select the disk where the OS is installed (usually disk 0).

# select disk 0

windows-create-new-recovery-partition-04

List the installed partitions.

# list part

windows-create-new-recovery-partition-05

In the displayed list, the Recovery partition is missing. Select the last partition where usually is the OS partition.

# select part 3

windows-create-new-recovery-partition-06

Since the creation of the Recovery partition requires some space, we need to shrink the selected partition by some GB (in the example 8 GB). Make sure you have enough free space in the OS partition.

# shrink desired=8192

windows-create-new-recovery-partition-07

Create a new partition.

# create partition primary

windows-create-new-recovery-partition-08

Format the new partition as NTFS with label Recovery.

# format quick fs=ntfs label="Recovery"

windows-create-new-recovery-partition-09

Mark the created partition as GPT.

# set id = "de94bba4-06d1-4d40-a16a-bfd50179d6ac"

windows-create-new-recovery-partition-10

Assign a letter to the new partition to copy the required files later.

# assign letter=R

windows-create-new-recovery-partition-11

Exit from diskpart.

# exit

windows-create-new-recovery-partition-12

Make sure the recovery environment is disabled.

# reagentc /disable

windows-create-new-recovery-partition-13

Create a new directory in disk C:\ (DISM in the example).

# mkdir c:\DISM

windows-create-new-recovery-partition-14

Mount the Windows installation media and identify the install.wim file location.

windows-create-new-recovery-partition-15

Mount the install.wim.

# DISM /Mount-image /imagefile:D:\sources\install.wim /Index:1 /MountDir:C:\dism /readonly /optimize

windows-create-new-recovery-partition-16

Copy WinRe.wim and ReAgent.xml files to C:\Windows\System32\Recovery folder.

# robocopy /MIR /XJ C:\DISM \Windows\System32\Recovery\ C:\Windows\System32\Recovery

windows-create-new-recovery-partition-17

When the copy operation has been completed, unmount the image.

# dism /unmount-image /mountdir:C:\dism /discard

windows-create-new-recovery-partition-18

Now create a recovery directory in the created partition.

# mkdir R:\Recovery\WindowsRE

windows-create-new-recovery-partition-19

Copy the Winre.wim file to the created folder.

# xcopy /h C:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE

windows-create-new-recovery-partition-20

Enable the recovery image.

# reagentc /setreimage /path R:\Recovery\WindowsRE /target C:\Windows

windows-create-new-recovery-partition-21

Enable the recovery environment.

# reagentc /enable

windows-create-new-recovery-partition-22

Check if the recovery environment is configured to the correct partition.

# reagentc /info

windows-create-new-recovery-partition-23

Open diskpart and remove the letter previously assigned to the recovery partition.

# diskpart
# list disk

# select disk 0
# list part

# select part 4
# remove letter=R
# exit

windows-create-new-recovery-partition-24

The procedure is now complete and the Recovery Partition has been created successfully.

signature

One Response

  1. Brian Grigory 10/04/2024

Leave a Reply