[SOLVED] How to delete partitions in a HDD storage?

brotherwhoneedshelp

Commendable
Nov 2, 2018
80
10
1,545
Years ago I bought a PC with a pre-installed Windows on a 1 TB hard drive. Now that I have build my own PC I salvaged the old hard drive and formatted it, but there doesn't seem a way to delete the two recovery partitions and EFI system partition.

I have tried multiple third party software and even tried to delete them from the command prompt, but nothing helped so far.

I just want to use it as storage and that's all.
 
Solution
If you want to delete EFI system partition from 1TB drive, then you must first
create new bootloader partition on 500GB drive,​
create bootloader files on it,​
boot from 500Gb drive.​

Only after you have done this, you will be able to delete old EFI system partition.
Can you show screenshot from Disk Management?

Any partition can be deleted with diskpart. But it will not allow deleting active OS partition and active bootloader partition (and that makes sense, because deleting those will make your system unbootable).
 
Last edited:

brotherwhoneedshelp

Commendable
Nov 2, 2018
80
10
1,545
Can you show screenshot from Disk Management?

Any partition can be deleted with diskpart. But it will not allow deleting active OS partition and active bootloader partition (and that makes sense, because deleting those will make your system unbootable).

One thing I forgot to mention is that I have migrated windows from the hard drive to my SSD.

The error diskpart gives me is:
"Virtual Disk Service error:
The operation is not supported by the object.

The specified command or parameters are not supported on this system."

And here is a picture of Disk Management
477620bd67b8253bcb9076307a9f8f3a.png
 
Your pc is booting from 300MB EFI System Partition on 1TB drive.
If you delete this partition, your system becomes unbootable.

Rest of partitions you can delete.

diskpart
list disk
select disk 1
list partition
select partition X

(select number of partition to delete)
delete partition override


You can delete 400MB and 17GB recovery partitions this way.
 
If you want to delete EFI system partition from 1TB drive, then you must first
create new bootloader partition on 500GB drive,​
create bootloader files on it,​
boot from 500Gb drive.​

Only after you have done this, you will be able to delete old EFI system partition.
 
Solution

brotherwhoneedshelp

Commendable
Nov 2, 2018
80
10
1,545
Your pc is booting from 300MB EFI System Partition on 1TB drive.
If you delete this partition, your system becomes unbootable.

Rest of partitions you can delete.

diskpart
list disk
select disk 1
list partition
select partition X

(select number of partition to delete)
delete partition override


You can delete 400MB and 17GB recovery partitions this way.

Interesting because that seems to be the case. If I remove my hdd my pc won't boot into Windows. That's odd because I thought I migrated Windows successfully to my ssd. Although I can't even delete the rest of partitions.

I will try and migrate Windows again and then try and delete them. Thanks for the replies and advise!
 
I will try and migrate Windows again and then try and delete them. Thanks for the replies and advise!
No need to repeat migration.
Simply delete 461MB partition on 500GB drive;
create new EFI system partition there (or primary active partition, if 500GB drive is partitioned in MBR);
format newly created partition to fat32 (or ntfs, if MBR );
use bcdboot command to create bootloader files;
reboot and change boot order in BIOS to boot from 500GB drive.

After this is done and you have sucessfully booted without 1TB drive connected, clean 1TB drive and repartition it.

BTW - I highly doubt any OS migration tools will be able to automatically migrate such config, when bootloader is on one drive and OS on a different drive.
 

brotherwhoneedshelp

Commendable
Nov 2, 2018
80
10
1,545
No need to repeat migration.
Simply delete 461MB partition on 500GB drive;
create new EFI system partition there (or primary active partition, if 500GB drive is partitioned in MBR);
format newly created partition to fat32 (or ntfs, if MBR );
use bcdboot command to create bootloader files;
reboot and change boot order in BIOS to boot from 500GB drive.

After this is done and you have sucessfully booted without 1TB drive connected, clean 1TB drive and repartition it.

BTW - I highly doubt any OS migration tools will be able to automatically migrate such config, when bootloader is on one drive and OS on a different drive.

When I try and use bcdboot command it tells me "Failure when attempting to copy boot files."
7b2e3e1a68078ca96fe5610f9e0dba6e.png
 

brotherwhoneedshelp

Commendable
Nov 2, 2018
80
10
1,545
Wrong syntax.
Assign drive letter to bootloader partition first - for example letter H:
Then execute:

bcdboot C:\windows /s H:

C: - OS partition
H: - bootloader partition.

It worked!! Now i can boot without the hard drive, but i still can't delete the partitions (recovery partition 400MB, EFI System partition 300MB, and recovery partition 17.19GB). It still gives me "The operation is not supported by the object. The specified command or parameters are not supported on this system" error.
 

TRENDING THREADS