Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / How to Delete OEM Recovery Partition Using Diskpart

October 24, 2017 Windows 10Windows 7

How to Delete OEM Recovery Partition Using Diskpart

Most desktop or laptop manufacturers create a separate recovery partition on hard drives of their branded OEM systems to store a reference system image (you can roll back to it, when doing factory reset) and a number of system and diagnostic tools provided by the manufacturer. The size of the partition can be up to several tens of gigabytes. In some cases, it is worth to remove such an OEM/EISA partition and increase the system partition .

It is convenient to create/delete partitions using Disk Management (diskmgmt.msc) snap-in. In this example, the 15 GB recovery partition has volume label Recovery and type OEM Partition. If you right-click the OEM Recovery partition in Disk Management, you can see that there is no disk menu (and the option to remove the partition as well).

oem recovery partition in disk managment console

Microsoft has deliberately restricted Disk Management functionality to work with  system, protected, hidden or OEM recovery partitions. To deal with these types of partitions, you have to use third-party tools or the integrated utility diskpart. In this example we’ll show how to delete an OEM recovery partition from your hard drive using diskpart.

Important! Prior to deleting an OEM/EISA recovery partitions, you must clearly understand that you won’t be able to roll back your system to factory state. Also, there may be drivers, manufacturer system tools, configuration files used by your firmware during the boot, etc. In some cases, it’s better to look for the official guidelines or utilities to create a recovery CD/DVD on the manufacturer website to safely delete or move an OEM partition. (I’ve come across this kind of guideline for Lenovo ThinkPad that allowed to change BIOS/UEFI settings.) And don’t forget that in UEFI systems, you must not delete the EFI System Partition (ESP) containing the loader (how to recover deleted EFI partitions).

Start the command prompt with the administrator privileges and run the following command:

diskpart

Display the list of the disks in the system:

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 system again using rescan command.

Select the disk containing the partition you need:

DISKPART> select disk 0

Disk 0 is now the selected disk.

Tip. You must specify the correct disk number here. As a rule, on a computer with one hard drive you have to select the disk with 0 index.

Display the list of available 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. Here, you have to specify the number of the partition you are going to delete. You must be very attentive when selecting the partition not to delete the data or system partition.

Let’s try to delete this 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 : Cannot delete a protected partition

I. e., diskpart cannot delete this partition.

Display the detailed information about the selected partition:

DISKPART> detail partition

Partition 6
Type : 27
Hidden: Yes
Active: Yes

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

You may try to change the partition type as follows:

DISKPART>setid id=07

However, it’s easier to delete the partition using override flag, that enables any partition type to be deleted:

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 the active swap file or memory crash dump.

Now you may close the diskpart session using commandexit

Using this method, you can delete any OEM or EFI partition. After it is deleted, the free space may be used to enlarge the existing partition or create a new one in Disk Management.

1 comment
2
Facebook Twitter Google + Pinterest
previous post
Windows 10: WSUS Error 0x8024401c
next post
The Requested Resource Is in Use: Cluster Disk Error in Windows Server 2012 R2

Related Reading

Configure User’s Folder Redirection with Group Policy

February 3, 2023

Disable Built-in PDF Viewer in Microsoft Edge

February 3, 2023

Join a Windows Computer to an Active Directory...

February 2, 2023

Using Previous Command History in PowerShell Console

January 31, 2023

How to Install the PowerShell Active Directory Module...

January 31, 2023

1 comment

George December 12, 2017 - 2:28 pm

Isn’t this dangerous though?

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configure User’s Folder Redirection with Group Policy

    February 3, 2023
  • Using Previous Command History in PowerShell Console

    January 31, 2023
  • How to Install the PowerShell Active Directory Module and Manage AD?

    January 31, 2023
  • Finding Duplicate E-mail (SMTP) Addresses in Exchange

    January 27, 2023
  • How to Delete Old User Profiles in Windows?

    January 25, 2023
  • How to Install Free VMware Hypervisor (ESXi)?

    January 24, 2023
  • How to Enable TLS 1.2 on Windows?

    January 18, 2023
  • Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    January 17, 2023
  • Fix: Can’t Extend Volume in Windows

    January 12, 2023
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11

    January 11, 2023

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Booting Windows 7 / 10 from GPT Disk on BIOS (non-UEFI) systems
  • Removable USB Flash Drive as Local HDD in Windows 10 / 7
  • How to increase KMS current count (count is insufficient)
  • Unable to Connect Windows 10 Shared Printer to Windows XP
  • Using the BitLocker Repair Tool to Recover Data on Encrypted Drive
  • Auto-Mount a VHD/VHDX File at Startup in Windows 10, 8.1
  • Error 0x80073CFA: Can’t Uninstall Apps using Remove-AppxPackage in Windows 10
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top