I messed up with DISKPART CLEAN ALL and this is how I solved it


  1. Posts : 3
    Windows 7 x64 Pro
       #1

    I messed up with DISKPART CLEAN ALL and this is how I solved it


    So I bought new ssd for laptop and I "accidentally" (didn't know what I was doing) issued DISKPART CLEAN ALL so my HDD windows partitions except for the WINDOWS root were "clean", so they were not found!, I solved it with Windows built-in disk management utility (diskmgmt.msc) by reassigning the drive letter it had before, and now I have the system back, thanks be to God Almighty! (I don't care about the religion forbidden policy of the forum :) )


    What I was playing with:


    w7x64 pro. HDD bay 0, SSD bay 1; HDD: GPT partition table, 100 MB boot partition vfat, and a bunch of other partitions including NTFS Windows C, programs, and data partitions, and Linux Suse with grub OS loader so other ext3 partitions; SDD with nothing (irrelevant).

    So, this is How I messed up:


    - start windows button -> cmd-> CTRL+SHIFT+ENTER (so as to run it as Administrator)
    - DISKPART-> LIST DISK -> SELECT DISK 0 -> CLEAN ALL (disk 0:hdd, disk 1:ssd... So I erred with the disk selection too)

    (So that's the guide on how to mess up with your system real quick!)

    After that no Users folder, and most of my programs couldn't be accessed either! (I had placed Users and programData on other partitions from install Autounattended)

    What I tried first, and what I learned for DISKPART and partition recovery utilities

    To begin with, not panicking! I have previously lost data down to rushing to recovering software before understanding the consequences of the actions! (once (kind of long time ago) I lost some partitions, and tried a recovery tool that made me enter some cluster size info, and since it was not the correct one I lost plenty of data! it was years of university data what I was trying to recover back then! and I couldn't recover them all! now the recovery tools are more reliable)

    any way, what i did this time:

    - I booted into Linux so as to access Internet
    - I opened Gnome Disk utility (from KDE) and I could see my partitions, my data, I could mount the partitions and see my files! thanks be to God Almighty everything was still there!
    - I tried the same from a Gparted USB (I booted into it) and the partitions were there too

    so then:

    - Forums, Internet, etc
    - So I stumbled across several posts recommending partition wizard Mini tool so i downloaded it installed it in windows
    - Windows->Administrator user -> that minitool-> recovery wizzard
    - then it said it was going to recover the partitions but one partition was going to be deleted!, I did not want that! since I knew the partition was there.
    - I tried placing a letter in the partition (because the tool could see the partitions already before the wizard) but it asked me to buy the paid version.

    Lessons learnt:

    As soon as you install your system:
    - If you have a MBR partition table, back up the first kb of the HDD with the linux "dd" command (look on the internet on how to do it this is not the scope of the post) and when you really mess up with partitions restore it up with dd.
    - If you have GPT partition table, backup the partition table and the EFI (again, I won't post it here because that's not the scope of this post, nor do i have the info handy right now) and restore from that everytime you really delete partitions.
    - have a real backup plan, preferrably with online (continuous) and offline disks so you don't worry about data!

    when you run into problems and cannot find those backups/didn't do any partitions backup and just messed with DISKPART:
    - DISKPART CLEAN ALL does not delete partitions! It appears so but no!
    - Don't rush recovery software it may render your actual data unreadable
    - Don't rush into recovering your partition it may corrupt the index file table
    - Don't buy sw you don't need, try first with free tools.

    If you messed up with some real partition deletion/creation and don't have backups then:

    - Don't format partitions from anywhere to resemble how they were, save your data first, try to recover your system first. only when you have succeeded in recovering your data can you think on formating.
    - so that means using recovering data first and then recovering partitions later and then it'll mean to buy any of those (EaseUs, minitool, etc)

    This time that I didn't do a real partition deletion:

    Enter Windows Disk Management (diskmgmt.msc) to solve your DISKPART CLEAN ALL problems

    - So I recovered it with: CTLR+R-> diskmgmt.msc -> I selected the partitions (for they could be seen from that utility as they could from Gnome disk utility) -> right click -> change letter -> Assign the letter It had previously for all the partitions involved -> restart

    - At first boot after restauring the partitions I was presented with Administrator and “Other User” I had to type in correct name and password (for my personal user) and voila! I was in, thanks be to God! The system looks as it was previously! no data lost!, no buying anything! free.

    I hope this helps some one...
    Last edited by intport123; 06 Nov 2017 at 11:20. Reason: specs
      My Computer


  2. Posts : 7,055
    Windows 7 Home Premium 32 bit
       #2

    Unbelievable and defies logic. This applies to most of your statements, methodology and end result..

    To be helpful please do it again on that HDD and post the screenshots taken at each and every stage.

    1. Screenshot of that HDD in Windows Disk Management before running DISKPART > clean all

    How to post a proper screen capture image of your Disk Management Screen: Disk Management - Post a Screen Capture Image - Windows 7 Help Forums

    Screenshots and Files - Upload and Post in Seven Forums:
    Screenshots and Files - Upload and Post in Seven Forums - Windows 7 Help Forums

    2. Screenshot of DISKPART > clean all performed on that HDD and completed ( as in the screenshot in para 9 of this tutorial Disk - Clean and Clean All with Diskpart Command - Windows 7 Help Forums )

    3. Screenshot of Windows Disk Management showing the HDD after completion of DISKPART > clean all
    ( which you claim shows all partitions and you only needed to assign drive letters.)

    Thanks for being helpful that way. :)

    Note:

    1. Please do not perform any other unspecified operation/s like viewing it in Gnome Disk utility (from KDE)/ Gparted USB etc,.( Nothing Linux anywhere in the above process)

    2. I am not responsible, if after doing it as per the procedure you had outlined in your post, you are unable to recover the drive and partitions.

    3. To be safe rather than be sorry, backup all important data before you do it again to post the screenshots to prove your method..

    Seeing is believing. :)
    Last edited by jumanji; 08 Nov 2017 at 12:31.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:47.
Find Us