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).
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.
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
Select the disk containing the partition you need:
DISKPART> select disk 0
Disk 0 is now the selected disk.
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.
Let’s try to delete this partition:
DISKPART> delete partition
The following error appears:
Cannot delete a protected partition without the force protection parameter set.
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.
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
Isn’t this dangerous though?