How to delete OEM recovery partition in Windows? , Ranjan.info

Branded computers/laptops that come with Windows pre-installed usually have a hidden hardware manufacturer OEM recovery partition. This partition usually contains a manufacturer’s Windows reference image, which can be used to restore the system to factory settings (rollback/refresh), as well as several manufacturer’s system and diagnostic tools. The size of such an OEM recovery partition can be in the tens of GB. To free up more space on the drive, advanced Windows users can delete this partition.

How to safely remove OEM partition on Windows using Diskpart?

Open the Disk Management console (diskmgmt.msc, In our example, the drive contains a 15GB recovery partition with the volume label recovery and type healthy oem partition, If you right-click the OEM recovery partition in Disk Management, you’ll see that there is no menu item (and no option to delete the partition).

oem recovery partition in disk management console

In our example, the disk has an additional recovery partition containing WinRE (Windows Recovery Environment). winre.wim The image on this partition allows you to boot Windows in recovery mode.

Check which partition contains the Windows Recovery Environment image. Run command:

reagentc /info

Reagent: find winner recovery partition number

In our example, this is the division 4 on the drive 0, (\\?\GLOBALROOT\device\harddisk0\ Division4\Recovery\WindowsRE).

Use the built-in PowerShell Disk Management module to list the partitions on the system drive:

Get-Disk | Where-Object IsSystem -eq $True|Get-Partition

PowerShell: list partition labels and sizes on system drive

In this instance, you do not need to move the recovery WIM image as it is on a separate smaller 500MB recovery partition.

If the winre.wim image is on an OEM partition, we recommend that you move WinRE to the OS (Windows) partition.

Now list the Windows bootloader configuration:

bcdedit

bcdedit: use Windows bootloader configuration and partition

Make sure that there is no reference to your OEM partition in the configuration of Windows Boot Manager and Windows Bootloader.

If you accidentally delete the Windows bootloader partition, you’ll see an Operating System Not Found error when you boot your computer. I’ll leave here links to instructions for reinstalling the Windows bootloader, just in case:

Microsoft intentionally restricted the functionality of the Disk Management graphical snap-in to work with system, protected, hidden, and OEM recovery partitions. To manage such partitions, you must use third-party tools or built-in diskpart Permission. In this example, we will show you how to remove the manufacturer’s OEM recovery partition from the drive diskpart,

Important! If you delete the OEM/EISA recovery partition, you will not be able to restore the operating system to the factory state. But that doesn’t stop you from doing a clean install of Windows if you need to. Some hardware manufacturers provide official instructions that explain how to move or delete the OEM partition (I’ve seen such a guide for a Lenovo Thinkpad, which involves reconfiguring the BIOS/UEFI). On computers with UEFI firmware, you should not delete the EFI System Partition (ESP) that contains the Windows bootloader (How to Recover a Deleted EFI Partition).

Open Command Prompt as administrator, and then run the following command:

diskpart

List the hard drives on the computer:

DISKPART> list disk
Disk ###  Status         Size     Free     Dyn  Gpt
--------  -------------  -------  -------  ---  ---
Disk 0    Online          59 GB      5120 KB

tip, If you don’t see the disk you need, scan the storage device again rescan Permission.

Select the disk that contains the OEM partition:

DISKPART> select disk 0

Disk 0 is now the selected disk.

tip, You must specify the correct disk number here. On a computer with a single HDD/SSD, you usually need to select the drive with the index 0,

List of partitions on the selected disk:

DISKPART> list partition

Partition ###  Type              Size     Offset
-------------  ----------------  -------  -------
Partition 1    Recovery          400 MB  1024 KB
Partition 2    System (EFI)      260 MB   401 MB
Partition 3    Reserved          128 MB   661 MB
Partition 4    Primary            43 GB   789 MB
Partition 5    Recovery          495 MB    43 GB
Partition 6    Primary            15 GB    44 GB

Then select the partition you want to delete:

DISKPART> select partition 6

Partition 6 is now the selected partition.

tip, Enter the number of the partition you want to delete. You must be careful while selecting the partition to avoid accidentally deleting the data or system partition.

Try deleting the partition:

DISKPART> delete partition

The following error appears:

Virtual Disk Service error:
Cannot delete a protected partition without the force protection parameter set.

diskpart error: protected partition cannot be erased

Diskpart cannot delete this partition. List detailed information about the selected partition and its attributes:

DISKPART> detail partition

Partition 6
Type : 27
Hidden: Yes
Active: Yes

As you can see, the partition type is 27, while a typical Windows NTFS partition with a standard MBR partition table uses type 07 (a hidden partition has code 17).

You can try changing the partition type as follows:

DISKPART>setid id=07

However, the easiest way to quickly delete a partition is to use the special defy flag. It allows you to delete any type of partition:

DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

tip, You won’t be able to delete a system or boot partition, or any other partition containing an active swap file or memory crash dump.

Now you can close the diskpart session using the command:

exit

In this way, any OEM partition can be removed. After deleting a partition, you can use the free Unallocated space to expand other partitions or create a new partition with the Disk Management snap-in.

Remove Drive Letter for OEM Recovery Partition on Windows

a separate additional recovery partition (HHealthy, OEM Partition) may appear on the disk with an assigned drive letter when upgrading to a Windows 10 build. Only recovery And System Volume Information The folders are on the new OEM partition.

However, there is insufficient free space in this volume, less than 9%. As a result, Windows 10 will start showing frequent Storage Sense notifications that this disk is full and needs to be cleaned up.

Run command:

reagentc /info

It is not recommended to delete this partition if it contains a WinRE environment image. You can move the WinRE image from partition and delete it if the partition is large and you want to delete it to free up space. If smaller, you can easily remove the drive letter from the partition using diskpart:

diskpart
list volume
select volume <volume_number>
remove letter=<drive_letter>
exit

It is even easier to remove a mount point using the command:
mountvol E: /D
It hides the recovery partition from the user.

Or you can move WinRE image to C drive:
reagentc /disable
reagentc /setreimage /path C:\Windows\System32\Recovery
reagentc /enable

This will move your WInRE image to the C:\Recovery folder, and the hidden partition can be deleted.

Leave a Comment

© 2023 Ranjan Chatterjee. All Rights Reserved