4

I have Windows10 backup set to do weekly full images (not files) of the C: drive. From the backup & restore center, everything looks fine. The images are held on an auxiliary hard drive independent from the primary SSD. No encryption or other unusual attributes.

The "WindowsImageBackup" directory on the aux drive has a "Backup 2018-04-28" directory with two .vhdx files, one 432MB and one 78GB, that must map to two of the three partitions Windows creates on the boot drive.

I started having some stability problems so decided to go back two weeks to when it was working fine.

I shut down and rebooted from the original install USB media. It showed me the latest image being two weeks ago (which was odd, but okay). I selected it and let it go. After about 1 minute, I got a dialog saying that the restore had been cancelled with a "close" button on the dialog. No other information was available.

I tried again. Now, a moment after the restore has started, I get the following:

The system image restore failed.

Error details: The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and
that the volume is not corrupted. (0x800703ED)

Now what? I can't boot the computer. The only option looks to be to reinstall completely which would be a major pain.

Perhaps I can unplug the auxiliary drive, do a full install, and then reconnect to restore the backup image?

Update 1

I opened the command-line and used diskpart to "clean" the C: disk. I rebooted and again tried to restore the image. This time I got a different error:

The system image restore failed.

Error details: The computer needs to be restarted to finish preparing
a hard disk for restore. To continue, restart your computer and run
the restore again. (0x80042403)

I did that. On the next run, I get:

The system image restore failed.

An error occurred while performing the recovery operation. _Details_

The "details" link says:

No disk that can be used for recovering the system disk can be found.
Try the following: 1) A probable system disk may have been excluded
by mistake. 2) A USB disk may have been assigned as a system disk.
3) An invalid disk may have been assigned as system disk. (0x80042412)

1) I excluded everything but the one disk I wanted to recover. I was very careful. 2) It's not a USB disk. 3) It was previously the system disk.

diskpart (via the command-line) doesn't show any modifications to "Disk 2" which is the primary boot drive. It's actually an M.2 SSD and I can't change it's drive number except by disconnecting the other physical drives.

Update 2

After doing a fresh install of Windows10, I thought I'd try again to restore the image. This time I created a "live" Linux USB boot to better track what is going on. I also used dd to make an image of the recent install so I can at least go back to that any time I want .

The image restore failed in exactly the same way saying "No disk that can be used for recovering the system disk can be found."

Booting into the Linux image, I find all the partitions exactly as they were so clearly the restore process didn't even get so far as to format the drive.

Sure enough, booting from the HD brought be back into the existing install of Windows.

There are three partitions on the boot drive (a 500GB NVME SSD) ...

  1. 499MB "Recovery Partition"
  2. 100MB "EFI System Partition"
  3. 293GB "Boot, Page File, Crash Dump, Primary Partition"
  4. 172GB "Unallocated"

... but only two .vhdx files in the backup. Perhaps there some manual way to extract one of those into the main partition?

The .vhdx file... Once I went through the steps to take ownership of them, I can mount them! Using "Computer Management" (This PC > Manage), I can go to "Disk Management" and then Action::Attach VHD to mount the image. Everything appears to be there! (Note that right-clicking on the .vhdx file and selecting "Mount" does not work.)

Now... How do I transfer its contents to the real disk partition?

Update 3

I found steps on how to restore a .vhd file but since I had a .vhdx file, they wouldn't work. All the instructions I could find to convert them required Hyper-V which is not available for Windows-10 "Home" edition.

I found the Disk2vhd utility by Microsoft but it sadly will read only from physical disks and not mounted .vhdx files.

Leaving Windows makes for more options, though, and I eventually came across qemu-img for doing conversions like this. Specifically:

qemu-img convert -p -f vhdx -O raw /foo/hexdigits-backup-file.vhdx /bar/c3.raw

With spinning disks, you'll usually get a faster conversion if you can have the input and output on different physical devices. I decided that I only needed to convert the main partition (partition 3) as the others were probably fine from the new install.

Finally, copy it as root:

sudo dd if=/bar/c3.raw of=/dev/nvme0n1p3 bs=1M

You can add "status=progress" if your dd is new enough to support it. Or you can do sudo killall -USR1 dd from another shell to get older versions to spit out their status.

All that was left was to cross my fingers and reboot...

Windows started and said "Reparing..." but eventually failed saying that repair was not possible.

At this point I tried the solution offered by harrymc below... It wouldn't work either as PowerShell couldn't convert the .vhdx file into a .wim file. Who knows, perhaps the backup was just damaged (though qeum-img didn't complain).

There were other things I could try but it was taking too much time. I gave up. I didn't ever restore the backup made with dd. I installed Windows10 from scratch (yet again) and did all my configuration one more time. I mounted the .vhdx file as a drive ...

  1. From Windows File Explorer, right-click on the top-level This PC (or whatever it has been renamed to) and select "Manage".
  2. Under Storage, click Disk Management.
  3. From the Action menu, select Attach VHD. Find your .vhdx file and select it. Use read-only mode to be safe.
  4. Again with File Explorer, locate the Drive: under which it has been mounted. Verify that it looks good and try to open a file or two.

... and copied over all the non-OS files plus things from Users and ProgramData that seemed appropriate.

In the end, I had to re-do all the configuration and reinstall all the software but at least I didn't lose any data.

The new install still has Windows system image backup enabled but I don't have any trust in it so I'm also using AOMEI Backupper (free edition for now) to regularly create images on another drive, UrBackup to regularly create a disk image over the network to another machine, and dd (via Linux live USB) to occasionally create a full raw image of the drive.

Next time I have a problem, I'm hoping at least one of these methods will allow a successful restore.

  • You state, "I have Windows10 backup set to do weekly images of the C: drive." Is that a full image of all partitions of the C: drive, or just a backup of system files? If you have a full disk image, e.g. one made wit Macrium Reflect, Acronis True Image or DriveImage XML, it might be best to revert to that, then try to update using the system image. – DrMoishe Pippik May 7 '18 at 3:05
  • The backup was made with the built-in Windows system image backup system. I don't recall if it was the whole drive or simply the main partition. Shouldn't Windows be able to properly restore what it created? – Brian White May 8 '18 at 1:03
  • AFAIK, Windows backup only saves one NTFS partition, not the whole disk: support.microsoft.com/en-us/help/17127/windows-back-up-restore . There are other partitions, e.g. FAT32 EFI system partition. – DrMoishe Pippik May 8 '18 at 15:33
  • That would be fine. As long as it will restore that partition. But it won't. – Brian White May 8 '18 at 18:28
  • It sounds to me like that backup might be corrupt. Do you also have a backup from the previous week? – 3D1T0R May 12 '18 at 3:04
3
+100

There are heaps of posts with your problem on this website. I use the free AOMEI Backupper that supports all storage devices recognized by Windows and has as bootable media both Windows PE and Linux Bootable. All this for free and never a problem with restore.

The following procedure is said to fix your problem, but I have never tried it. In fact, I have always avoided using Windows Backup.

  1. Disconnect the machine from the network.
  2. Install Windows 10 from the media. Select "I don't have a product key" and "Custom: Install Windows Only". This will create all the partitions (C: and EFI Recovery) and give you a Windows 10 machine to work on.
  3. Login
  4. Create the folder C:\MountedVHDX
  5. Create the folder C:\WindowsImage and copy from the backup the WindowsImage folder.
  6. Attach an external disk with at least as much free space as your System Image Backup, call it E:.
  7. Create the folder E:\CapturedWIM
  8. Launch PowerShell and execute :

    Mount-WindowsImage -ImagePath fullpathofvhdxindoublequotes -Path c:\MountedVHDX -Index 1
    New-WindowsImage -CapturePath C:\MountedVHDX -Name Win10Backup -ImagePath E:\CapturedWIM\sib.wim -Description "Windows 10 Backup" -Verify
    Dismount-WindowsImage -Path C:\MountedVHDX -Discard
    
  9. Restart Windows.

  10. At the login screen click on the power icon and click Restart while holding the shift key. The machine will restart in recovery mode.
  11. Select Troubleshoot -> Advanced -> Command Prompt
  12. When the command window appears execute :

    Format c:
    Dism /Apply-Image /ImageFile:E:\CapturedWIM\sib.wim /Index:1 /ApplyDir:C:\
    
  13. That's it. When you restart, your Windows will still be activated.

Source : Part 5 of the post
I cannot restore any system image which was created in Windows 10 v1709 using Backup and Restore

  • I tried that method but the New-WindowsImage command failed with an error without creating any .wim file. I don't have the exact error message any more. I wasn't using separate disks, though I wouldn't expect that to be an issue. Any idea why it didn't "just work"? – Brian White May 12 '18 at 21:32
  • After running for many minutes... New-WindowsImage : The environment specified is invalid. (Exception from HRESULT: 0x8007070D) At line:1 char:1. CategoryInfo: NotSpecified: (:) [New-WindowsImage], COMException. FullyQualifiedErrorId: Microsoft.Dism.Commands.NewWindowsImageCommand. Same/different drive doesn't make any difference. Repeated attempts fail almost immediately (a few seconds). – Brian White May 12 '18 at 22:29
  • Are you maybe running Powershell (x86) on a 64-bit Windows? Use the 64-bit version. – harrymc May 13 '18 at 7:02
  • It's a fresh Win10 install. I haven't added any outside programs so the PowerShell is whatever came stock with Windows. – Brian White May 13 '18 at 20:58
  • There are two versions installed and it's important in this case to use the 64-bit version on 64-bit Windows. – harrymc May 13 '18 at 21:18
2

I haven't done this, so I can't be certain that all of it will work perfectly, but if I was in your situation, here's the next thing that I would try:

  1. Mount each VHDX from your backup.
  2. Extract a raw image of each partition from each mounted VHDX with 7-Zip
    This can be done as follows:

    1. Open 7-Zip
    2. Repeatedly click the 'Go up', or 'Go to parent directory' button Folder with an upward pointing arrow until you can't any more.
      List shows "Computer", "Documents", "Network", and "\\."
    3. Open "\\."
    4. Select your mounted VHDX from this list and click "Copy".
      Clicking "Copy" in the toolbar with a drive selected.
    5. Choose where to save your disk image, and click "OK". "Copy" dialog showing path to desktop
    6. You should now have a file named after that volume which you can copy to your empty disk drive.
      I did this for two volumes, F: and G:, F: was a FAT partition and G: was an NTFS partition: List showing F.fat and G.ntfs
  3. Boot a Linux distribution (a LiveCD is fine)
  4. Find your hard drive.
    I'm going to guess that your drive is likely to be /dev/sda if it's your primary hard drive.
    Note: You won't be writing to the drive directly, you'll write to each partition: /dev/sda1, /dev/sda2, etc.

    • Not knowing your *nix skill level, I'll break that down a bit:
      • / is the root of all file-like objects visible to a linux (or other unix-alike) OS.
      • dev is a virtual folder where the OS lists enumerated devices.
      • / also acts as the folder separator.
      • sd is a storage device. (depending on your computer, your disk drive, and what linux distro you use this could be hd instead)
      • a This is the first storage device of this type. If the drive you want to put these on is the second would be b instead, the third would be c, etc...
      • 1 This is the first partition on this particular drive. The second is 2, third is 3, etc...
  5. If the distribution of Linux you chose automatically mounted the hard drive, you'll have to unmount it, either by right-clicking it in the GUI and choosing to unmount, or by using the umount command.

  6. From a terminal, use the dd command to copy the raw partition images back to their appropriate place on your hard drive.

    dd if=/path/to/F.fat of=/dev/sda1
    dd if=/path/to/G.ntfs of=/dev/sda2
    
    • I'm not 100% certain about this part.
      If someone could tell me if this is right or help fix it if wrong, that would be nice.
    • Note: Make absolutely certain that you're copying it to the right place, as this will completely destroy whatever partition previously existed if there was one.
  7. Reboot to see if it worked.

There may also possibly be another step between steps 2 and 3, but I'm not sure if it's better to leave the drive as is, erase it, or try to build an approximation of what you eventually want the partition table to look like using empty partitions (which you then replace in step 6).

  • I didn't know 7-Zip could do that. Presumably the results would be the same as with the qemu-img command I used to convert .vhdx to .raw but I won't be trying it since I've given up and simply started from a fresh install (again). – Brian White May 18 '18 at 21:56
  • 1
    Theoretically it should be the same, however last time I played with qemu-img it stated that vhdx support was experimental, so I put a little more trust in Windows' ability to properly read a vhdx file. – 3D1T0R May 18 '18 at 22:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.