none
Recovering deleted partitions in Windows Server 2008 R2 Server Core

    Question

  • I was expanding one of my drive (Drive A) partitions to use space available on another drive (Drive B) and then I wanted to delete the extension so I clicked on the second drive (Drive B) and deleted that partition.  What I didn't realize is that would delete the entire partition on Drive A.  Now that I have screwed up I desperately need to recover the partition.  I ran the free tool TestDisk (http://www.cgsecurity.org/wiki/TestDisk) but it did not see the deleted partition.  Can someone point me in the right direction for recovering the partition and or data?
    Wednesday, October 06, 2010 4:58 PM

Answers

  • Well I was able to fully recover the deleted partion and restore the Hyper-V VM's and figured I would share the steps I took to recover.

    Deleted Partition Recovery

    1. Do not reboot the machine because the MBR will be commited permanately.
    2. Use a partition recover tool (I used Active@ partition recovery) to recover the deleted partion.
    3. Restore the MBR which should be the backup MBR at this point (not 100% sure on this).
    4. If you did reboot and you cannot restore the MBR then you may have to backup the files from the deleted partition and recreate the partition manually. This was the case for me.
    5. Use a file reovery tool (I used Active@ File Recovery)  to backup the deleted files.
    6. Recreate the Partition manually and restore from the backup.


    Hyper-V Virtual HardDisk Restore
    1. Restore the .VHD and .AVHD from the backups.
    2. Because you restored from backup the ACL (Access Control List) entries will be wiped and you will have to remove the hard drives from the virtual machine and reattach them.  Re-attaching the .VHD will recreate the appropriate ACL entries.  Worst case scenario you will have to recreate the VM and attach the hard drive.  
    3. Remove the Virtual Hard Drive from the Virtual machine via Hyper-V Manager.
    4. If there are Snapshot files you must first merge them back into the main .VHD
      1. Change the extension of the most recent .AVHD to .VHD.
      2. From Hyper-V Manager select Edit Disk and browse to the newly renamed Snapshot and use the Merge option to merge it with its parent disk.  The merge wizard will automatically select the appropriate parent to merge with.  Take a note of this name because you will have to repeat the process on this file.  In Hyper-V Versions prior to 2008 R2 you may have to manually select the parent, in this case you will need to figure it out yourself but fortuanately you can sort by date and go from latest to oldest in order.
      3. Repeat the above process with each successive Snapshot until you have merged with the main .VHD for the VM.
    5. Reattach the .VHD file which will restore the Hyper-V ACL entries.
    6. Start the VM.
    7. If you get the following error when logging in to the VM “The trust relationship between the primary domain and the trusted domain failed.”  You will need to remove the machine from the domain and readd it to the domain via the local administrator account. 
    • Marked as answer by XPress Dave Thursday, October 07, 2010 6:28 PM
    • Edited by XPress Dave Thursday, October 07, 2010 6:33 PM
    Thursday, October 07, 2010 6:28 PM

All replies

  • I hate to tell this to you, but I don't think you can recover from that.
    ******* Your IT Friend, Big Dog ********
    Wednesday, October 06, 2010 8:30 PM
  • A friend of mine pointed me at Active@ Partition Recover and File Recovery.  I can now see the files on the deleted partition but haven't been able to recover the partition itself.  I have been able to backup the files individually from the deleted partition to a backup external drive.  It's taking quite some time but I have about 60% of the partition backed up.  Thankfully this is just a drive of VM's and VHD's and not a bootable partition.  Once I have all the files backed up I can rebuild the partition from scratch and hopefully copy them back over and get everything back up and running.
    Wednesday, October 06, 2010 9:20 PM
  • Well I was able to fully recover the deleted partion and restore the Hyper-V VM's and figured I would share the steps I took to recover.

    Deleted Partition Recovery

    1. Do not reboot the machine because the MBR will be commited permanately.
    2. Use a partition recover tool (I used Active@ partition recovery) to recover the deleted partion.
    3. Restore the MBR which should be the backup MBR at this point (not 100% sure on this).
    4. If you did reboot and you cannot restore the MBR then you may have to backup the files from the deleted partition and recreate the partition manually. This was the case for me.
    5. Use a file reovery tool (I used Active@ File Recovery)  to backup the deleted files.
    6. Recreate the Partition manually and restore from the backup.


    Hyper-V Virtual HardDisk Restore
    1. Restore the .VHD and .AVHD from the backups.
    2. Because you restored from backup the ACL (Access Control List) entries will be wiped and you will have to remove the hard drives from the virtual machine and reattach them.  Re-attaching the .VHD will recreate the appropriate ACL entries.  Worst case scenario you will have to recreate the VM and attach the hard drive.  
    3. Remove the Virtual Hard Drive from the Virtual machine via Hyper-V Manager.
    4. If there are Snapshot files you must first merge them back into the main .VHD
      1. Change the extension of the most recent .AVHD to .VHD.
      2. From Hyper-V Manager select Edit Disk and browse to the newly renamed Snapshot and use the Merge option to merge it with its parent disk.  The merge wizard will automatically select the appropriate parent to merge with.  Take a note of this name because you will have to repeat the process on this file.  In Hyper-V Versions prior to 2008 R2 you may have to manually select the parent, in this case you will need to figure it out yourself but fortuanately you can sort by date and go from latest to oldest in order.
      3. Repeat the above process with each successive Snapshot until you have merged with the main .VHD for the VM.
    5. Reattach the .VHD file which will restore the Hyper-V ACL entries.
    6. Start the VM.
    7. If you get the following error when logging in to the VM “The trust relationship between the primary domain and the trusted domain failed.”  You will need to remove the machine from the domain and readd it to the domain via the local administrator account. 
    • Marked as answer by XPress Dave Thursday, October 07, 2010 6:28 PM
    • Edited by XPress Dave Thursday, October 07, 2010 6:33 PM
    Thursday, October 07, 2010 6:28 PM
  • awsome
    ******* Your IT Friend, Big Dog ********
    Thursday, October 07, 2010 6:31 PM
  • Yeah, as you think, a professional partition recovery tool can help you get back your wanted partition data back and allows you to restore these partitions latter.

    So, just search a reliable one over the internet.


    Tuesday, April 22, 2014 1:31 AM
  • OK! Two steps for you to go on:

    1). Stop using or writing anything new on this drive and try to restore all your lost data back with the help of some partition data recovery tool like Recuva, iCare Data Recovery Free, 4Card Recovery and more.

    2). Check whether you can find this partition in Disk Management and re-create this partition there.

    Note: Next time, you should never be so careless again and always back up all important data.

    Thursday, April 24, 2014 1:35 AM
  • In fact, I have ever had great success to recover some wanted important data back from my USB flash drive with the help of an article:

    http://freeware-fix.blogspot.com/2013/02/hard-drive-recovery.html

    It may also help you out.

    Never forget to save everything important on different drives or locations again.

    Monday, April 28, 2014 1:37 AM
  • In fact, I have ever had great success to recover some wanted important data back from my USB flash drive with the help of an article:

    http://freeware-fix.blogspot.com/2013/02/hard-drive-recovery.html

    It may also help you out.

    Never forget to save everything important on different drives or locations again.

    Monday, April 28, 2014 1:37 AM