Windows 8 and 8.1 Forums


Recover Partitions from diskpart -> clean command

  1. #1


    Posts : 14
    Windows 8.1

    Recover Partitions from diskpart -> clean command


    Hi Guys,

    I was trying to install windows 7 on my windows 8.1 laptop (UEFI, samsung ATIV book 6) and when it didnt allow me to install Windows 7 on partitioned drive I followed some YouTube video foolishly from my phone and fired diskpart - clean command. everything gone after rebooted the system. Luckily I didnt do anything after that and referred one of the thread on sevenforums. followed some of the suggestions and was able to see all the partitions using partition wizard and it showed me correct list of partitions including recovery partitions. I used partition wizard to restore them. Then I tried to boot the laptop and it didnt boot into windows and gave me error

    Your PC needs to be repaired.

    File:\Windows\System32\winload.efi
    Error code: 0xc0000225

    I found following instructions by googling and I followed them, but it didnt seem to work

    -----------------------------------------------------
    Diskpart
    List Volume
    Select Volume=2 (change the "2" with a number that shows the ESP value.
    Assign letter=Z
    Exit
    Bcdboot C:\windows /s Z: /f UEFI (change the C: with the drive letler of your OS)
    4. Restart your computer.
    ------------------------------------------------------------------

    Then I followed the instructions at https://neosmart.net/wiki/0xc0000225/ and it still didnt do much.

    checked bcdedit and it was showing correct boot setting.

    meanwhile I was going through the BIOS setting and I noticed that there are two options in the boot order. and I changed the boot order from windows boot manager to the option that is showing HDD name and bingo the system booted into my previous state.

    Now I am not sure which one of MBR rebuild from above worked because obviously my boot order was wrong and thats why system was not booting into windows.

    Now here is my problem
    with Fast BIOS disabled , Secure boot disabled, OS mode is CSM and UEFI and HDD in boot order system perfectly boots into the windows 8.1

    But it does not with Fast BIOS enabled, Secure boot enabled, OS mode UEFI and default windows boot manager in boot order for UEFI.

    Because of this I am unable to go back to the state where I was before doing that stupid mistake of diskpart command.

    I also see that previous restore points also gone missing

    Any suggestions or help would appreciated.

    Thanks
    Girish

      My System SpecsSystem Spec

  2. #2


    Posts : 1,121
    Windows 8.1 x64


    If you can boot with the Hard Drive as the primary boot device, you are not booting into UEFI.

    Partition Wizard does not have a UEFI boot option. But if you use it to recovery from a Clean command, you would have needed to make sure it knew the Hard Drive was configured as GPT. I normally that using Diskpart and convert to GPT. Then Partition Wizard knows how to recover the partitions. If you did not take this step, the drive was probably recovered as a MBR configuration, and depending on how many partitions were on the drive, it may also have been converted to Dynamic.

    Maybe supplying a snipping tool picture of your Disk Management window will help explain your situation. Attach using the paperclip on the Advance Replies.
      My System SpecsSystem Spec

  3. #3


    Posts : 14
    Windows 8.1


    Thanks Saltgrass for the reply. here is the capture of disk management tool.

    Click image for larger version
      My System SpecsSystem Spec

  4. #4


    Posts : 1,121
    Windows 8.1 x64


    It does appear you have the situation I predicted. The drive has been converted to MBR and the Logical partitions were created to account for the number of partitions on the drive. Luckily it was not converted to a Dynamic drive.

    If this was me, I would do anything I could to safeguard the data on the drive, which might mean imaging the current configuration, or cloning the drive to another drive, or whatever would be possible.

    Anything I might suggest will lead to the possibility of your loosing your install, except living with what you have. Looks like it is decision time.

    Any Factory (OEM) process would probably result in your data being lost since it would reset the drive back to factory specs. You could try a Factory Reset to get the system back to the original configuration, but I don't believe that will work with a drive in the current situation. You might be able to get recovery media from the OEM which might allow you to wipe the entire drive and start over.

    You could have a new drive in an external enclosure already configured as GPT and then copy the partitions over. But not sure the logical partitions would copy to a GPT drive. If you had a backup drive and could clone to it, that would be a good option for safety

    What I would do, after having cloned the drive or backed up everything I could, would be to go back to where this started. Use the Diskpart command to clean the drive again, and then convert the drive to GPT. After doing that, you could then use Partition Wizard to recover the partitions.

    After recovering the partitions, you would still need to make some changes to the install which might involve recreating the MSR partition, and re-designating the Recovery partitions and System partition using the correct Partition Type ID. These things are not hard to do using Diskpart again. We can help with the Diskpart commands, but will need to use the list disk, select disk and select partition commands along with the create partition and setid command for GPT installs.

    I will look for some utility to convert a MBR drive to a GPT drive, but most of those will wipe the drive to do so. Maybe someone else would know of one which could do that safely and not remove the current install.
      My System SpecsSystem Spec

  5. #5


    Posts : 14
    Windows 8.1


    Thanks for the reply saltgrass, looks like a very complicated process. looks like system is also not going into recovery partition. If I do the factory reset will it change the disk into GPT? do you think I can follow these instructions and convert the disk into GPT? Convert MBR Disk to GPT Disk with MiniTool Partition Wizard.

    on the another note if I use diskpart or any other tool to convert the disk to GPT, I think I will lose the factory recovery partition right? the system did not come with installable windows disk.

    Also if I copy the windows recovery partition on external hard drive, will I be able to install windows from there?
      My System SpecsSystem Spec

  6. #6


    Posts : 1,121
    Windows 8.1 x64


    You are sort of unchartered territory. Since I have not used that procedure, if you think it will be safe, try it and see. But I cannot really predict how each type of partition will be handled.

    If you copy the Factory Image to another drive, and have the information concerning the path and index of the image you should be able to recover reset. The information you would need is usually kept in a Reagent.xml file in the Recovery Tools partition or on a Recovery Drive. Let's hope you will not need to do that. You may also need the Winre.wim file in the Recovery Tools partition.

    If you use Diskpart to convert a drive it may not actually remove the partition, but they would have to be recovered as you did before. Maybe the process used in Partition Wizard includes both tasks and automatically recovers the partitions.... we will know after you finish.
      My System SpecsSystem Spec

  7. #7


    Posts : 14
    Windows 8.1


    Thanks Saltgrass !!! It worked. So I used bootable minitool partition wizard and convert the disk partitions to GPT as shown in video. System failed to start but I fired following commands from recovery boot and now I am able to boot in fast bios and secure boot mode. Thanks a lot again.

    now that I noticed that my hard drive is failing after copying essential data ..next I m going to explore if I can restore factory image from external drive. That will be handy If I replaced this Hard Drive with SSD.

    ----------------------------------------------------
    Diskpart
    List Volume
    Select Volume=2 (change the "2" with a number that shows the ESP value.
    Assign letter=Z
    Exit
    Bcdboot C:\windows /s Z: /f UEFI (change the C: with the drive letter of your OS)
    ------------------------------------------------------------------
      My System SpecsSystem Spec

  8. #8


    Posts : 1,121
    Windows 8.1 x64


    OK, don't do anything yet. How about another Disk Management Window picture.

    Did you do the follow up I suggested as far as the EFI and Recovery Partitions? Partition Wizard does not recognize certain UEFI configuration requirements.
      My System SpecsSystem Spec

  9. #9


    Posts : 14
    Windows 8.1


    Okay, here it is. I think something is still wrong with the system because it doesn't boot into recovery or advanced boot options. If I boot using recovery USB boot created from other laptop and select option for reset to factory image it gives me error saying recovery drive is missing.

    Click image for larger version
      My System SpecsSystem Spec

  10. #10


    Posts : 1,121
    Windows 8.1 x64


    It looks like you need to set up the EFI system partition. It is Fat32, but not designated correctly. This is the most important partition and needs to be configured correctly.

    Below is what the EFI partition should look like. You will probably need to use the Diskpart commands as follows to set the partition correctly. You can copy and paste in an administrative command prompt. Make sure and select the correct disk and partition for your system, and the EFI partition should be partititon 2.

    set id=c12a7328-f81f-11d2-ba4b-00a0c93ec93b

    gpt attributes=0x8000000000000000

    C:\Windows\system32>diskpart
    Microsoft DiskPart version 6.3.9600
    Copyright (C) 1999-2013 Microsoft Corporation.
    On computer: AIO
    DISKPART> lis dis

    Disk ### Status Size Free Dyn Gpt
    -------- ------------- ------- ------- --- ---
    Disk 0 Online 931 GB 1024 KB *
    Disk 1 Online 232 GB 0 B *

    DISKPART> sel dis 1

    Disk 1 is now the selected disk.

    DISKPART> list par

    Partition ### Type Size Offset
    ------------- ---------------- ------- -------
    Partition 1 System 500 MB 1024 KB
    Partition 2 OEM 40 MB 501 MB
    Partition 3 Reserved 128 MB 541 MB
    Partition 4 Recovery 750 MB 669 MB
    Partition 5 Primary 221 GB 1419 MB
    Partition 6 Recovery 9 GB 223 GB

    DISKPART> sel par 1

    Partition 1 is now the selected partition.

    DISKPART> det par

    Partition 1
    Type : c12a7328-f81f-11d2-ba4b-00a0c93ec93b
    Hidden : Yes
    Required: No
    Attrib : 0X8000000000000000
    Offset in Bytes: 1048576
    Volume ### Ltr Label Fs Type Size Status Info
    ---------- --- ----------- ----- ---------- ------- --------- --------
    * Volume 5 ESP FAT32 Partition 500 MB Healthy System
    Last edited by Saltgrass; 06 Nov 2014 at 22:33.
      My System SpecsSystem Spec

Page 1 of 3 123 LastLast
Recover Partitions from diskpart -> clean command
Related Threads
How to Recover Deleted Partitions in Vista, Windows 7, and Windows 8 This tutorial will show you how to recover deleted or lost partitions on your hard disk in Vista, Windows 7, and Windows 8. You must be signed in as an administrator to be able to do the steps in this tutorial. If other...
I have a WD My Book Essential USB 3.0 3 TB external HDD that i bought just under 2 years ago (still under warranty for a few more months) and it doesnt work at all. -doesnt show up in My Computer at all -makes an unusual sound with varying beeps and clicks and definitely sounds like an "error...
Hi i have been having this problem for a week now until a friend told me about your form three of my partitions are missing from my computer and this what it shows me in the device manager 37100 i really need hep guys and it will be much appreciated
Hi guys, my first thread here :D. I recently decided to buy an ultrabook and I got me this one: LG Z360-7416, with a ssd and windows 8 (x64). As usual, it came with a lot of garbage installed which was using almost half of the ssd storage (128GB), so I decided to do a clean install. I got me a...
diskpart in Performance & Maintenance
I'm evaluating a windows 8 gateway. it is unable to boot. automatic repair doesn't work, no go on refresh, there is no media for re-install. no restore points. just to see, I am checking out what diskpart says. disk 0 online, size-0, free-o bytes. the pc had been dropped. I reseated the hard...
I am stuck and i am hoping someone here can help. i have a dell laptop with win 8 on it that it came win. the recovery partitions are intact etc. only thing not intact is the OS partition. the recovery of course fails because of the partition missing. is there a command i can type in diskpart...
Hi, have never attempted to upgrade / install new operating system......hence question i have not actually bought win8 yet but tempted for 25 upgrade download before end of the month...... I have an acer 8930 laptop running vista. It has 1 drive with 2 partitions ACER (C:) and DATA (D:)....
Eight Forums Android App Eight Forums IOS App Follow us on Facebook