We help IT Professionals succeed at work.

How to make work again Windows 10 that has been damaged by a bugged cloning tool that have removed the partition table of the disk

High Priority
267 Views
Last Modified: 2019-09-09
Hello.

Some time ago I tried to clone the main SSD disk and the only partition where I'd installed Windows 10 to another disk / partition using this tool :

https://www.miray-software.com/products/applications/hdclone/basic-edition.html

So,I chosen as target the disk and the only partition that was there (it is solid state disk) and as a target the only existing partition on the destination disk and I started the process. After some time Windows 10 started to working bad,I saw that the icons on the desktop gone away and nothing worked anymore,so taken by the fear,I stopped the operation. I must not do that,really. All the informations stored on every disk and partition (USB and SATA) attached on my PC was gone. I still don't understand why it deleted all the partition tables of every disk NOT involved in the operation. I lost everything in every disk. Maybe that tool has some kind of serious bug. I don't know. Fact is that I found another case like mine.

After some day I tried to recover the data lost with this tool :

https://www.ontrack.com/it/

and I have seen that all the files that have been deleted by that cloning tool are still there,saved on the disks,with the same organization structure. Now,I think that the Miray hdclone basic edition removed the first track of the disks and their partition tables. I would like to know if and how I can make work again the previous installation of Windows 10. I haven't formatted the disk yet,Windows 10 shows it as "unknown","unallocated". I'm only copying the files of that disk on another external disk with the ontrack tool.
Thanks.
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
https://www.runtime.org/data-recovery-software.htm is a fine tool for partition recovery. 79USD.
It was the only tool able to help me once I had to use such a tool. I tried 5 others to no avail before.
Mario ZioPsychologist

Author

Commented:
I tried your tool. It is very good to recover deleted files,but it is not able to make work windows 10 again ? is that right ?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
that is correct
when i image a disk - i Always iage the WHOLE disk - all partititons, because windows need s them in most cases
i supose that windows started reconstructing these -  and ran into problems
you can tr to run a repair or DISM, but i fear your best option is a fresh clone of the whole disk, or fresh install

http://www.tenforums.com/tutorials/7808-dism-repair-windows-10-image.html                               DISM
https://www.tenforums.com/tutorials/16397-repair-install-windows-10-place-upgrade.html       REPAIR
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
No, I am sorry, I didn't remember that it can only recover files, but not restore partition structures.
Mario ZioPsychologist

Author

Commented:
do u know a tool that can restore partition structures ?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
can you copy the Original partitions over?  that seems to be the easiest solution
Mario ZioPsychologist

Author

Commented:
Hello. I have recovered the whole disk with all the windows 10 files inside using the "rebuild mbr" option of the tool "ease us partition master 13" and I tried to boot it,but it does not. is there something that I can do ?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
why don't you follow my suggestion?
Mario ZioPsychologist

Author

Commented:
maybe if U explain better what should I do,I can do that !
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
make an image of the whole disk - instead of separate partitions
Mario ZioPsychologist

Author

Commented:
yeah,I did it with the GetDataBack Pro Data Recovery. it is an IMG. file. now ? what should I do ?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
If the boot problem is because of the missing efi partition, it should work to format the drive, install windows and then overwrite c: with your image.
Mario ZioPsychologist

Author

Commented:
Can u tell me which tool should I use to open the img files produced by the tool "getdataback" ? I tried several tools to open it,unsuccesfull. The last one says :

Extract NT - Extract file in wImage - V 2.10 (c) 1991-96 Gilles Vollant
Visit web page : http://ourworld.compuserve.com/homepages/gvollant/extract.htm

image file : G:\OLD\SSD-OLD\465.img  this file is not a disk image
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
GDB is NOT an image tool -it is used for data recovery ( one of the best)

if you want to us another image tool, there are many free ones  :
AOMEI https://www.backup-utility.com/free-backup-software.html
Paragon  http://www.paragon-software.com/home/br-free/download.html      PARAGON Free image soft

i suggest to restart from scratch
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
What is that .IMG file supposed to be? Getdataback can open it to restore single files an folders from it, but not all at once, right?

I would have to Google for a tool, no idea if it can be done from that file.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
So you already in know how to do it, but...?
Mario ZioPsychologist

Author

Commented:
No,I'm confused about the EFI partition. Windows 10 can run without it ?. When I have reinstalled windows 10 it hasn't been created,as u can see below : (the disk that I'm using now,the only one with Windows 10 that works is the number 1) but it works. I'm confused about the procedure to follow to eventually create the efi partition. I don't like to format the disk and to reinstall a fresh installation of windows 10 only because in this way I will have the EFI partition.

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          298 GB   298 GB
  Disk 1    Online          149 GB      0 B
  Disk 2    Online          931 GB      0 B
  Disk 3    Online            9 TB      0 B        *
  Disk 4    Online          298 GB      0 B
  Disk 5    Online          232 GB  2048 KB

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            149 GB  1024 KB

2019-08-25_14-37-47.png
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
If you install win 10 from usb, you may boot the usb setup stick in uefi mode. Only then will an efi partition be created. Doesn't matter. Overwrite c: now.
Mario ZioPsychologist

Author

Commented:
what do u mean with "overwrite c: now" ? it seems dangerous.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Let me summarize for a better understanding for both of us:
-you cloned a disk and the cloning tool destroyed the partition table.
-you have used getdataback to write the original folder structure and contents of your lost c: drive to an .img file
-my suggestion: install windows clean to have a working boot record on the disk and then restore the .img file to the new (empty) windows. That restored windows drive might boot alright, it's worth a test.

What seems dangerous? I have not asked you to overwrite data or partitions of drives with existing data, but to overwrite a new windows installation.
CERTIFIED EXPERT

Commented:
The efi partition can be recreated quite easily and does not really change from an install to the next. I guess bootrec /rebuildbcd can help you

Most likely you destroyed the partitions because your initial disk was part of a raid array and the destination was not. Or the contrary. Many controllers idiotically and voluntarily store raid metadata at the beginning of drives. This is essentially useful to prevent you from reusing the drive on a different or no controller at all
Mario ZioPsychologist

Author

Commented:
I've already tried to boot the PC with the Windows 10 cd and then I tried to fix the mbr and I gave the command : "bootrec /rebuildbcd". It gave the error "no access" or something like that.
CERTIFIED EXPERT

Commented:
If you have the cd and it can boot the older os, you should try the installer with "repair an existing installation ". If there is an option to only repair booting, use it. If not, you might need to reapply a bunch of updates.

Coming from a guy that has not used windows much if at all in years. This should be reasonably safe. But may not be feasible any more. And there should be other options.

If you are fluent with dd, i can help reparing the drive manually. Also consider running gparted from any unix like livecd. This tool should at least help debugging and might be able to rebuild the missing partition data depending how it was messed up in the first place
Mario ZioPsychologist

Author

Commented:
I've bought the tool "EasyRE" by  NeoSmart Technologies. It should be good for this kind of situations. I wanted to try it from long time. Actually the problem is that it does not work correctly. My mouse freezes and I can't give any command. I've asked to the customer support but no one replied yet.
CERTIFIED EXPERT

Commented:
i cannot help with a third party tool i do not work with. sorry.
Mario ZioPsychologist

Author

Commented:
I know,but I will not use only that tool. maybe I will try it with one disk only. Since I have every disk damaged,there is space to try a lot of things.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
i doubt the software is causing the mouse freeze - does the pc not have other problems?
did you run diags?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Mario, what is your feedback on my latest suggestion?
CERTIFIED EXPERT

Commented:
1/ there are quite a few ways to recreate a partition table. "testdisk" will be bundled with many recovery cds.

alternatively, if my hunch is correct and you can use "dd", you should find your partition table somewhere near the beginning of the drive.
read a 512 bytes block. skip 512 bytes, then 1024, and so on until the 512 bytes you read do look like a partition table. do not iterate more than 10 times : if the partition table is not in the 10 first blocks, then it is not there at all. if you do find it, you can simply copy it at the beginning of the drive and reboot.

again alternatively, if your controller allows to add the drive to a new raid1 array without wiping the disk, it is likely the partitions will magically reappear since the label will be the same size as previously.

2/ once the above is done, if windows still does not boot, repair the installation using the cd. normally, the efi partition should pop but the boot might be messed up by moving the drive around.
Mario ZioPsychologist

Author

Commented:
@skullnobrains : your methods are too much complicated for me. I think that I will format the disk and I will reinstall windows 10 from scratch. and then I will try to write the img file produced by getdatapro on the ntfs partition where usually windows is installed. I find this solution easier than dd. what do u think ?
Mario ZioPsychologist

Author

Commented:
I'm worried that when I will write the img file produced by getdatapro on the disk,it will overwrite the EFI partition,because when I created that image the EFI partition was not there.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
When you created that .img file as shown on https://www.runtime.org/gdbimage.htm
did you choose "entire drive" or could you select to create it from c: only?

I agree, we don't want to restore anything but c: itself.
Mario ZioPsychologist

Author

Commented:
This is what I did for now : I have resized,removed some space (675 mb) to the end of the disk because I want to make an efi partition. Now the problem is that the tool that I'm using does not offer the chance to make the EFI partition. So,this is what I tried :

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          149 GB      0 B
  Disk 1    Online            9 TB      0 B        *
  Disk 2    Online          931 GB      0 B
  Disk 3    Online         1863 GB  1863 GB
  Disk 4    Online          298 GB      0 B
  Disk 5    Online          465 GB   673 MB
  Disk 6    Online          232 GB  2048 KB

DISKPART> select disk 5

Disk 5 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            465 GB   674 MB

DISKPART> create partition efi

MSR and EFI partitions are only supported on GPT disks.
Convert the selected disk to GPT and try again.
2019-08-27_14-18-55.png
2019-08-27_14-24-28.png
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
It seems you are struggling to give feedback. If you don't understand the question, please indicate that..
Mario ZioPsychologist

Author

Commented:
Update : after having converted the disk to GPT and added the EFI partition,I have rebooted the PC,attaching the disk with Windows 10 that is not working and also the USB stick with the installation of Windows 10. I opened a command prompt and I have issued the following commands :

bootrec /fixmbr

OK

bootrec /fixboot

OK

bootrec /rebuildbcd

error : the requested system device can't be found

after that,I have rebooted the PC with the working windows 10 and I tried to add a new boot entry with EasyBCD and then I rebooted again the PC and I tried to boot the non working version of windows 10. This time the error message has been :

inaccessible boot device.
Mario ZioPsychologist

Author

Commented:
in the attached file u can see how the disk is partitioned.
2019-08-27_16-38-54.png
CERTIFIED EXPERT

Commented:
I would gather the partitionning is working again, somehow.

What happens at boot time ?

Have you tried to repair the installation ?

Easubcd probably got the drive id or partition id wrong. The install cd should detect it properly. If not you will need to dive into the boot records manually
Mario ZioPsychologist

Author

Commented:
diskpart
list disk
sel disk 0
list vol
select volume 1 (EFI partition)
assign letter K:

bcdboot c:\Windows /l en-US /s K: /f ALL

or

bcdboot c:\Windows /l it-IT /s K: /f ALL


BFSVC Error: Can not open the BCD template store. status – [c000000f] –
CERTIFIED EXPERT

Commented:
Hmm... was your working install booted using EFI ? if not, there is a security feature preventing to edit bcd entries.

if you cannot use the installer, you can boot your existing windows install with something like the grub2 universal boot disk ( using EFIs ) and run the same commands from within the windows broken install
Mario ZioPsychologist

Author

Commented:
What could happens if i format the disk and i make a fresh installation of windows 10 and after that i copy manually all the files of the not working installation of windows 10 on the fresh one ?
Mario ZioPsychologist

Author

Commented:
I'm not sure if my previous windows 10 installation worked with the EFI partition.
Mario ZioPsychologist

Author

Commented:
So,at this point I don't know what to do.
CERTIFIED EXPERT

Commented:
If the previous was not efi, /fixboot should already have worked. you can check your bios which is most likely set to boot from efis. Disabling efis would make the repair actually much simpler.

Have you tried booting with the super grub2 boot disk ?

Have you tried to repair the install with the install disk ?
Mario ZioPsychologist

Author

Commented:
Don't make me general questions like this. I'm not a pro. I don't know how to boot the disk with super grub 2. And I don't know what you mean with the question n. 2
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
i suggested some time ago "when i image a disk - i Always iage the WHOLE disk - all partititons, "
you never answered that
it's your best option
Mario ZioPsychologist

Author

Commented:
The tool that I'm using gets the whole drive as a source. The problem with this approach is that it created the image file AFTER that the cloning tool destroyed the partition tables. For this reason,this image maybe not good,because the cloning tool may have destroyed the EFI partition and also some other important boot configuration. That image could be already not useful anymore to boot again Windows 10.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
i never heard about a cloning tool destrying partitions - that's contradictory
maybe you made an errort somewhere?
xan't you backup your data, and install windows fresh ?
CERTIFIED EXPERT

Commented:
Q1 : the super whatever boot disk is straightforwards : it has an option to detect all existing installations. And then allows to boot them. It is easily done if it does detect the windows install which is likely. Burn the disk to a cd and boot the cd. A usb key should also work. I assume you know how to do that given you already used easybcd. Same-same

Q2 : launch the windows install cd. The first thing that is asked is whether you want to make a fresh install or repair an existing one.

It is also mandatory to know whether you use efi boot or not. The legacy and efi boot process are VERY different .

A description of what happens when you boot might give us hints regarding the above and also help figuring out what to fix.

There is little way to make it less technical. If running a simple soft coulf do the trick, you probably would have figured out how to repair by now.
CERTIFIED EXPERT

Commented:
@nobus : the author has asked another question previously. I am unsure what happened but from what i gather, either the partition table was destroyed by a different operation, or the drive was previously member of a mirror raid and is now standalone which would mess the partition table with raid controllers that idioticaly store the raid metadata at the beginning of the drive
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
ok - if he does not t tell us - we cannot know that
i'll leave it to you
Mario ZioPsychologist

Author

Commented:
my PC is broken. I can't work on the recovery process anymore. I will come back here when it will be fixed.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
i asked you a while ago if you ran diags - never got an answer
Mario ZioPsychologist

Author

Commented:
what is "diags" ?
Mario ZioPsychologist

Author

Commented:
Mario ZioPsychologist

Author

Commented:
I've asked some help to Microsoft support and they told me to do the following :

To rebuild the BOOT configuration data,you should do the following :

1) insert the Windows installation (USB o DVD) and change the boot order if you need it

2) Select the language and choose settings

3) Select "Repair your computer"

4) Select "Repair tool"

5) Select Advanced Options and then Command prompt

6) Type the command "bcdedit /export c:\bcdbackup" and click enter

7) Type "attrib c:\boot\bcd -h -r –s and press enter

8) Type "ren c:\boot\bcd bcd.old" and press enter

9) Type "bootrec /rebuildbcd" and press enter.

10) Command prompt will ask if u want to add the new installation to the boot entries. Type (Y for yes) and press enter

11) Press Exit

Now what's the situation ? the situation is that my main PC is broken. So,I'm trying to do what suggested using my mac mini 1.1 where I have installed vista service pack 2. I've rebooted the mac mini with the cd of Vista inside and I've gone to point 6. At this point I realized that the command "bcdedit /export c:\bcdbackup" should refers to the damaged sata disk that I want to repair,is that right ? The problem is that now,my main disk is the internal sata disk of the mac mini and not the sata damaged disk. So,I should find a way to change the disk order,right ? For sure I can't remove the internal sata disk of the mac mini (it's 80 GB large). Anyway,I attached some pics to show you...
IMG-20190831-WA0001.jpeg
IMG-20190831-WA0003.jpeg
IMG-20190831-WA0005.jpeg
IMG-20190831-WA0007.jpeg
CERTIFIED EXPERT

Commented:
You merely need fo figure out the proper drive letter. Likely not c indeed

Given the images f seems likely. Since you can browse the contents, it should be easy to figure out. Use the drive letter corresponding to the system drive.

If you use the boot cd i suggested, the same commands will be available within windows. either ways should work. the windows cd also should feature an automated repair process with less typing.
Mario ZioPsychologist

Author

Commented:
the damaged sata disk is F:

So,when I issue this command :

the command "bcdedit /export c:\bcdbackup"

does not it make the bcd backup of the wrong disk ? you didn't explain how to change the commands assuming that the correct disk drive is F: and not c:
Mario ZioPsychologist

Author

Commented:
Microsoft Windows [Versione 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. Tutti i diritti riservati.

C:\Windows\system32>e:

E:\>bcdedit /export c:\bcdbackup
Operation completed succesfully.

when I give this command,bcdedit will make the backup of the boot configuration data of which drive ? C or E ?
Mario ZioPsychologist

Author

Commented:
E:\Boot>attrib e:\boot\bcd -h -r -s
Formato del parametro non corretto
Mario ZioPsychologist

Author

Commented:
E:\Boot>dir bcd
 Il volume nell'unità E è Dati

 Directory di E:\Boot

28/08/2019  03.42            20.480 BCD
               1 File         20.480 byte
               0 Directory  177.423.306.752 byte disponibili

E:\Boot>attrib bcd -s -h -r

ok
Mario ZioPsychologist

Author

Commented:
Microsoft Windows [Versione 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. Tutti i diritti riservati.

E:\Boot>attrib bcd -s -h -r

E:\Boot>ren e:\boot\bcd bcd.old

E:\Boot>bootrec /rebuildbcd

I have reached the last command : before to press enter,I wanna know what happens next. I wanna make sure that it rebuilds the bcd of the drive E (the damaged disk) and not of the drive C. I suspect that it rebuilds the bcd of the drive C because this drive is active and running,since I'm using Vista. Instead,I should reboot the pc with the DVD of windows 10 inside and only with the damaged disk attached (in that case it will be drive C)...
CERTIFIED EXPERT

Commented:
As you figured out, you need to replace c: with f: with most commands.

Rebuildbcd is documented as interactive so it should let you choose

That said, not having the working vista plugged in seems indeed safer
CERTIFIED EXPERT

Commented:
Repairs always work better when you have extra parts (such as another computer.)  You should have used a disk cloner that cloned the entire disk, not just the partition.

If you've never done it before, you shouldn't be testing it on a system you're trying to recover.  You should test the recovery on a good system with a spare disk that you're ok with erasing.  Don't do it yourself if you don't really know how.  You should hire somebody or you'll just make it worse.
Mario ZioPsychologist

Author

Commented:
skullnobrains said : As you figured out, you need to replace c: with f: with most commands.

can u rewrite the commands as they should be issued ?
CERTIFIED EXPERT

Commented:
Pointless and risky. Use the target computer. And disk c. Additionally, rebuilding the boot process involves the computer itself when efi is involved. So it might not even work to do the repair on a separate one.

If you really want to go that way, you need to replace every instance of c: with f: except for the one after /export which is the location where the copy of the boot record will be exported. The location actually does not matter. And you can skip such steps altogether since backuping a broken boot sector is not very helpful. I am on a mobile phone so retyping every command is both error prone time consuming.

One course of action that seems reasonably easy would be to use /fixmbr which you already did. Then plug the drive in the old coputer or whatever other computer. Access the bios, disable efi booting. And just boot.

while you figure things out, the boot disk i mentionned above will allow you to work. once windows is started you can remove the disk and use your computer normally.