6

When trying to delete D: partition (C: containing system, select volume 1 + delete volume override) I get error from diskpart:

Delete is not allowed on the current boot, system, pagefile,crashdump or hibernation volume.

While the partition is represented as Healthy (no system, active, page file, etc. indicators in disk management console) I don't care too much for the reason. Is there any way to delete this partition from command line while windows is running (using diskpart or any other tool)? I don't care for the change to be visible immediately as next command in my script is shutdown. The only thing I am trying to accomplish here is to prevent the need to boot in Linux to do a simple operation of removing a partition.

3
  • The complete output of diskpart would be useful. Feb 14, 2018 at 13:22
  • try to use PowerShell instead of diskpart. Run: Remove-Partition -DriveLetter D
    – Strepsils
    Feb 14, 2018 at 14:41
  • @Strepsils since I don't have a drive letter assigned to the partition I want to delete, I tried running Remove-Partition -DiskNumber 0 -PartitionNumber 2 on PowerShell, but I got the following error: The operation is not allowed on a system or critical partition. (and no, the partition is not a system nor a critical partition) May 27, 2018 at 17:23

4 Answers 4

1

I had the same issue. In my case, it was caused by a paging file being manually configured on the D: partition. After removing the paging file and rebooting, Remove-Partition ran without issue in PowerShell.

1

Turn off your computer then put it into recovery mode I have an hp note book which means I push f10 on boot then go to advanced then command prompt then type diskpart then type select disk 0 then type clean success done😁

0

None of these 2 answers work for me. I spent hours on this and the best and one-shot solution for this is to:

Install a Windows PE on your USB and boot from USB. Then launch a terminal/prompt there and use diskpart as the OP mentioned to delete anything you want.

-1

I had the same problem and neither diskpart nor Power Shell Remove-Partition worked.

I was able to remove the partition using MiniTool Partition Wizard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.