/
/

How to Create a Custom Bootable Recovery Partition to Restore Windows

How to Create a Custom Bootable Recovery Partition to Restore Windows blog banner image

Key Points

  • Why Use a Custom Recovery Partition? Avoid factory reset limitations like outdated Windows versions, bloatware, and erased user settings by creating a custom bootable recovery image tailored to your system.
  • Capture a Full System Image with DISM: Use the DISM /capture-image command to create a .wim image of your Windows installation, preserving installed applications, system drivers, and user configurations.
  • Prepare the System First: Update Windows, run Disk Cleanup, and create a full system backup before capturing the recovery image to minimize issues and image size.
  • Create a New Recovery Partition with DiskPart: Use diskpart to shrink existing space, create a primary partition, format it with NTFS, and assign a custom partition ID and GPT attributes to mark it as a recovery partition.
  • Register the Recovery Partition with Windows: Use reagentc /enable or reagentc /setreimage to link your custom image with the Windows Recovery Environment (WinRE).
  • Boot and Test the Recovery Option: Restart into WinRE by holding Shift + Restart to confirm the custom recovery partition appears and functions correctly.

Most Windows computers come with a factory partition to restore a system to its original state. However, reverting to factory settings means dealing with outdated Windows versions, unwanted bloatware, and the risk of losing user settings.

An easier way would be to create a custom recovery partition by capturing a system’s disk image, enabling users to restore a device without having to start from scratch. Learn how to create a custom bootable recovery partition through this guide, saving you time and ensuring your Windows computer is always up and running.

How to create a custom recovery partition in Windows 10

Part 1: Prepare Windows for recovery image creation

1. Ensure Windows is updated to the latest version. Below are quick instructions on how to manually check for Windows Updates:

  1. Press Start > Settings > Update & Security Windows Update.
  2. Click Check for Updates to download and install pending updates.

2. Remove unnecessary files to reduce the recovery image size. The Disk Cleanup tool can be used to remove unwanted files.

  1. Type disk cleanup using the Search Bar, and then open the Disk Cleanup app.
  2. Select a drive when prompted. Then click OK.
  3. Tick the box next to the type of files you want cleaned.
  4. Once all desired files are selected, press OK.

3. Create a full system backup before making a recovery image. Note that this safeguards users against possible boot issues after modifying a partition. Here are Instructions on creating a backup in Windows 10:

  1. Log in with a Microsoft Account.
  2. Press Start and then type backup.
  3. Select Windows Backup.
  4. Choose which files and settings to back up.
  5. Click Back up. Wait for the process to finish.

Part 2: Create a custom recovery image

1. Open the Command Prompt as Administrator.

  1. Click Start and type cmd.
  2. Right-click Command Prompt and then press Run as Administrator.

2. Use the DISM tool to capture a system image. Before doing this, ensure the target partition has at least twice the used space of C:\ to avoid insufficient disk space errors.

Enter the following command:

dism /capture-image /imagefile:D:\install.wim /capturedir:C:\ /name:”Recovery” /description:”My Custom Recovery Image” /compress:maximum

  1. The switch /imagefile:D: indicates where the captured Windows image will be saved. In this case, D: is the target drive.
  2. /capturedir:C: contains the drive letter where the Windows image to be captured is located. In this example, C: is the drive we’ll capture.
  3. /description:”My Custom Recovery Image” is an essential switch as it ensures the .wim file can be used for system recovery.

4. Save the image (.wim) to a separate partition or external storage.

Part 3: Create a recovery partition

Note: If you’re working on a drive with available space, you can shrink its unallocated space to make space for another partition.

1. Use DISKPART to create a new partition.

  1. Open Command Prompt as Administrator.
  2. Type diskpart and press Enter.
  3. Afterward, type list disk and hit Enter. All detected disks will be shown, each with a corresponding number.
  4. Type select disk X and press enter. X is the number that corresponds to your chosen drive.
  5. Enter the command create partition primary size=X.
  1. X denotes the size in MB you want your partition to have.
  2. It’s advisable to have your partition size the same as your .wim file size + 1GB rounded up to the next full GB.

For example, your .wim file size is 10.4GB, add 1 GB for a total of 11.4GB, and round off to the next GB, which would now be 12GB (12,000MB).

2. Format the partition and assign a letter for easy access.

a. Start formatting the partition by typing format fs=ntfs quick.

b. Once the partition is finished formatting, users can assign drive letters by typing assign letter=X and pressing enter.

  1. X is the letter you want to assign the partition.
  2. To remove an assigned letter, type remove letter=X.

c. With the partition still selected, enter the following command: set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac.

This command sets the partition type as recovery.

d. Next, type gpt attributes=0x8000000000000001. This GPT attribute indictates the partition as an EFI System Partition and marks it as active.

f.  Type exit. Then hit Enter.

3. Move the custom recovery image (.wim file) to the partition.

Part 4: Configure Windows to recognize the recovery partition

1. Use Reagentc.exe to register the recovery image with Windows.

  1. Open Command Prompt as an Administrator.
  2. Enter reagent-c/enable to detect the recovery partition automatically. If automatic detection fails, you may need to specific the location manualy.

2. Verify the recovery partition status using system commands. Using an elevated Command Prompt, type reagentc /info.nThe device’s Windows RE status should say Enabled, and the location should reflect the drive where the recovery image is stored.

Part 5: Test the recovery process

  1. Boot into Windows Recovery Environment (WinRE).
    1. Open the Windows Start button.
    2. Hold down Shift while selecting Power > Restart to boot into WinRE.
  2. Confirm that the custom recovery partition is detected. A Recovery option should be present in the boot menu.

What does a recovery partition do in Windows 10

A recovery partition dedicates space on the hard drive for system recovery files, allowing users to capture a Windows image and restore it to that point without requiring external media.

Comparing custom and factory recovery in Windows 10

Why use a factory recovery partition

The built-in factory recovery partition in Windows restores a device to its original state, fixing corrupted boot drives and other booting issues. However, a factory recovery means losing all system settings, key Windows updates, and applications.

Why create a custom recovery partition

A custom partition enables a complete Windows image capture to retain software, drivers, and settings. Bootable recovery partitions are ideal for users who frequently reset their PCs and IT professionals who manage multiple Windows systems.

Benefits:
  • Quick and easy recovery. This eliminates the need for external drives by centralizing system recovery via Windows Recovery.
  • Enables customized recovery. Bootable recovery partitions capture an image of Windows, allowing the system to revert to an image’s precise state.
Limitations:
  • Requires sufficient disk space. Users should allocate enough disk space for the custom recovery image, which will vary according to the size of software and system files in the image.
  • Dependent on drive health. Once a drive fails, the created recovery partition is lost unless backed up externally.

Troubleshooting common recovery partition issues

Issue: The recovery partition isn’t detected

There are two ways to ensure a system detects a recovery partition. One method is to ensure the partition is marked active using the correct GPT attributes.

For some, a correctly registered recovery image path can solve the problem. To verify this, open an elevated Command Prompt, type reagentc /info, and then hit Enter.

Issue: Reagentc.exe fails to enable recovery

If this happens, users can check if they are running UEFI or Legacy BIOS mode, as different setups affect recovery registration. Insufficient space can also affect how recovery methods behave, sometimes forcing an incomplete recovery or ultimately failing to restore the system.

Issue: The system won’t boot after modifying partitions

You can create Windows installation media on a separate drive and use it to boot your device. Choose Repair your computer or Troubleshoot and then enable Startup Repair. If this method fails, you can restore the system using a full system backup.

Frequently asked questions about bootable recovery partitions

What is a custom recovery partition in Windows 10?

A custom recovery partition is a dedicated section of your drive that stores a full Windows system image (.wim file), allowing you to restore your computer to a specific, customized state without needing external media.

How do I create a bootable recovery partition in Windows 10?

To create a bootable recovery partition, capture a system image using the DISM tool, create a new partition using DiskPart, and register the image with Windows using reagentc /enable.

Can I restore Windows without using a USB or recovery disk?

Yes. By creating a custom recovery partition, you can restore Windows directly from your hard drive through the Windows Recovery Environment (WinRE)—no USB or DVD required.

What’s the difference between a custom and factory recovery partition?

Factory recovery resets Windows to its original state with default settings and preinstalled apps. A custom recovery partition restores your system with your preferred configuration, apps, updates, and drivers.

How much space do I need for a recovery partition?

Your recovery partition should be the size of your .wim image plus at least 1 GB and then rounded to the next full GB. For example, a 12.5 GB image would need about 14 GB of space.

Restore Windows using a bootable recovery partition

A custom recovery partition allows users to restore a specific version of Windows without the need for external media. This process involves backing up necessary files, creating a recovery image, setting up a partition, and configuring Windows to recognize it.

Thorough testing must be done to ensure that the recovery partition functions correctly in case of a system failure. Moreover, following the troubleshooting steps in this guide can help resolve partition detection issues and provide a successful recovery partition setup.

You might also like

Ready to simplify the hardest parts of IT?