none
How to undo 'create partition primary' command of diskpart

    Question

  • Hello !

    i was trying to recover my pendrive as it was showing 0 byte allocated space and i came across about using diskpart option in command prompt to format it,

    for the worse i have selected a wrong volume and started the process, and i selected my hard drive and typed in create partition primary. And now i cannot see my drives except local disk: C, in which my os is installed in..  :( Please help me , i have no prior knowledge about this, yet iv toiled my hands and now i am stuck .. the data is very important ...

    I sincerely thank your help before hand !

    i could use personal guidance if any : prasanth.korada2@gmail.com ***URGENT**

    • Moved by Bill_Stewart Saturday, July 13, 2013 11:33 PM Moving to more appropriate forum
    Saturday, July 13, 2013 7:33 PM

Answers

  • Let's see, you started diskpart followed by select disk 0.  At that point you forgot to check where you are with list partition and tried create partition primary.  This would create a 4th partition on a disk with three partitions, and your old partitions should be all alive and well.  

    You have not yet formatted the unwanted 4th partition, you could simply delete it:  Check out help list partition, help select partition, and help delete partition.  Example, to get rid of an unwanted 4th partition on the boot disk you can use select disk 0, list partition, select partition 4, delete partition.  After list partition you should see that partition 4 is rather small, because your disk was already filled by three partitions.  Maybe add detail partition after select partition 4 to make very sure that this is an unused and small partition, before you go to delete partition.

    Sadly diskpart has this useless diskpart> prompt instead of telling us exactly where its focus is (disk and partition, or volume.)

    Saturday, July 13, 2013 7:56 PM

All replies

  • Let's see, you started diskpart followed by select disk 0.  At that point you forgot to check where you are with list partition and tried create partition primary.  This would create a 4th partition on a disk with three partitions, and your old partitions should be all alive and well.  

    You have not yet formatted the unwanted 4th partition, you could simply delete it:  Check out help list partition, help select partition, and help delete partition.  Example, to get rid of an unwanted 4th partition on the boot disk you can use select disk 0, list partition, select partition 4, delete partition.  After list partition you should see that partition 4 is rather small, because your disk was already filled by three partitions.  Maybe add detail partition after select partition 4 to make very sure that this is an unused and small partition, before you go to delete partition.

    Sadly diskpart has this useless diskpart> prompt instead of telling us exactly where its focus is (disk and partition, or volume.)

    Saturday, July 13, 2013 7:56 PM
  • Sorry but you are posting in the wrong forum.  This is an admin scripting forum.


    ¯\_(ツ)_/¯

    Saturday, July 13, 2013 8:01 PM
  • This is an admin scripting forum.

    Sorry, here's a fun script as apology:

    HELP LIST VOLUME > NUL & diskpart /s "%~f0" & goto :EOF
    LIST VOLUME
    • Proposed as answer by pb_bzh Saturday, March 22, 2014 6:41 AM
    Saturday, July 13, 2013 8:35 PM
  • No thanks.  Now I am going to recommend that someone delete this thread.


    ¯\_(ツ)_/¯

    Saturday, July 13, 2013 9:17 PM