Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 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
1
Facebook Twitter Google + Pinterest
previous post
Windows 10: WSUS Error 0x8024401c
next post
How to Create Scheduled Task Using PowerShell

Related Reading

Preparing Windows for Adobe Flash End of Life...

January 22, 2021

How to Disable/Remove Thumbs.db File on Network Folders...

January 21, 2021

USB Device Passthrough (Redirect) to Hyper-V Virtual Machine

January 15, 2021

Windows 10: No Internet Connection After Connecting to...

January 13, 2021

Updating the PowerShell Version on Windows

December 24, 2020

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
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • Preparing Windows for Adobe Flash End of Life on December 31, 2020

    January 22, 2021
  • Checking User Logon History in Active Directory Domain with PowerShell

    January 22, 2021
  • How to Disable/Remove Thumbs.db File on Network Folders in Windows?

    January 21, 2021
  • MS SQL Server 2019 Installation Guide: Basic Settings and Recommendations

    January 19, 2021
  • USB Device Passthrough (Redirect) to Hyper-V Virtual Machine

    January 15, 2021
  • Windows 10: No Internet Connection After Connecting to VPN Server

    January 13, 2021
  • Updating the PowerShell Version on Windows

    December 24, 2020
  • How to Enable and Configure User Disk Quotas in Windows?

    December 23, 2020
  • Restoring Deleted Active Directory Objects/Users

    December 21, 2020
  • Fix: Search Feature in Outlook is Not Working

    December 18, 2020

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 Create a Wi-Fi Hotspot on your Windows 10 PC
  • How to increase KMS current count (count is insufficient)
  • How to Download APPX Installation File from Microsoft Store in Windows 10 / 8.1
  • How to Sign an Unsigned Driver for x64 Windows 10, 8.1 or 7 with a Self-signed Certificate
  • How to Hide Installed Programs from Programs and Features in Windows?
Footer Logo

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


Back To Top