How do I restore Windows 7 from a System Image to a Boot Camp partition without formatting?

41,814

Solution 1

I would suggest to first install Windows 7 on the new partition as a new installation.

Then, within Windows 7, Restore your computer from a system image backup using Control Panel -> Recovery -> Advanced recovery methods -> Use a system image you created earlier to recover your computer, and then follow the steps.

If worse comes to worst, you can always mount the .vhd in Disk Management to retrieve your data.

EDIT

I have found new info from this article using Acronis True Image Home 2011 (trial version available):
Restoring Windows 7 VHD Backup Files with Acronis True Image Home 2010.

The article says:

Windows 7 has a special System Reserved Partition, which is hidden and contains boot files. This partition can be viewed in Windows Disk Management (Start-Run -> diskmgmnt.msc).

When making an image of your Windows system using the Windows 7 Backup tool, it will create a separate .vhd file for each partition that is in the system, including the System Reserved Partition.

If you choose to restore your system partition from the created Windows 7 Backup .vhd files, you will need to restore the whole disk where this system partition is.

Solution

  1. Boot from Acronis Bootable Media and select Acronis True Image Home (Full version)
  2. Click Recovery, browse to your Windows 7 Backup .vhd files and select any of the files
  3. Once selected, right-click on the .vhd file and select Recover
  4. Select Recover whole disks and partitions and click Next
  5. Check the partition to recover
    image1

This approach has failed if you are warned that all data on the destination disk will be erased:
image2

Solution 2

Your Mac OS X system should be intact. Windows 7 "see" just bootcamp partition as HDD. Is there size of hard drive? to help you figure out?

usually bootcamp partition looks like last with BOOTCAMP name on it. If your restore will be unsuccessful, Install fresh copy of windows 7 to partition what you created. try to use virtualbox (virtualbox.org) or this method to access your files: http://www.gilsmethod.com/how-to-mount-vhd-files-without-virtual-pc

Next time use winclone free software to change win bootcamp partition Or Paragon (trial or buy)

Solution 3

This is not the most direct approach, and would be inconvenient, but would probably be the safest.

I would recommend that you restore the VHD to a different computer hard drive - either an external drive, a spare one you may have lying around, a different computer if you have one you don't care about — anywhere you can. Then, use a different imaging suite (with the capability to restore to a particular partition) to create an image of that, then using that, restore to your original machine.

Solution 4

A simple solution would be to convert the vhd disk to a raw disk file, (which would take up 70gb) then 'dd' it to the given partition. qemu-img, which is part of QEMU, can handle the conversion. (You would obviously have to install qemu on the osx side)

qemu-img convert -f vhd -O raw YourW7Disk.vhd OutputDiskImage.raw

This would, as it is a raw disk image, require 70gb of space. You would then, after creating the raw disk file:

dd if=OutputDiskImage.raw of=/dev/disk0s2

Replacing disk0s2 with the path to the partition device node. You can find the partition device node name in Disk Utility.

Obviously, these commands would have to be run on the OSX side. This is all assuming that the VHD disk is an image of just the W7 partition, and has the bootsector/etc intact.

This, of the solutions I have seen, is the easiest. It can be done in the already installed system, with minimal effort and time. The only thing you would have to install is qemu (which provides qemu-image iirc), which you can get through macports/brew/fink.

Share:
41,814

Related videos on Youtube

Christian
Author by

Christian

Updated on September 17, 2022

Comments

  • Christian
    Christian almost 2 years

    I had a 70GB Boot Camp partition on my iMac that I wanted to increase the size of, so after creating a system image (.vhd) on an external FW drive of the Boot Camp partition using Windows Backup and Restore, I removed the Boot Camp partition from within OS X and re-created one that is now 140GB.

    When I go to restore the system image using the Windows 7 installation disc or the repair disc, it says that when restoring the image, the entire [physical?] disk is going to be erased and formatted so that the image can be restored to it. (I don't see any options to choose just a partition!)

    I've considered that there may be a command line utility on the Windows 7 install disc to restore the VHD to the partition, but can't find any documentation for such. Is there a cost-free way to just restore the system image backup to the new partition while preserving the OSX partition?


    EDIT:

    Basically what I am saying is that when installing Windows 7, there is an option to install to a specific partition on the physical disk, but when restoring, I do not see that option...


    UPDATE: (bounty)

    I am still looking for a way to restore a VHD image to an NTFS formatted partition on a hard drive. Specifically a boot camp partition on a Mac.

    I really don't understand why Windows won't allow this, although it allows installing to a partition...

    • fideli
      fideli almost 14 years
      A little late since you erased your Boot Camp partition, but an easier way would have been to use either CampTune or iPartition.
    • tyoc213
      tyoc213 about 13 years
      I've experimented quite a bit with Windows Restore and I have not been able to come up with a way to preserve the target disk partitions. Restoring a system image will replace everything.
    • Christian
      Christian almost 13 years
      I'm thinking it might be possible to boot from an Ubuntu Live CD and just restore the contents of the VHD to a newly-formatted NTFS partition and boot from it? Does Ubuntu now support NTFS and VHD images?
  • Christian
    Christian almost 14 years
    That article just ultimately brings me to the same screen I described in my message, but it is being read from the installed OS instead of a disc...
  • harrymc
    harrymc almost 14 years
    @pattern86: You can see the entire disk, but can't you choose the Windows partition? Might be a good idea to post a screenshot of this screen, now that you're in Windows.
  • Christian
    Christian almost 14 years
    I don't know of a way to take a screenshot at that point after rebooting, but I found some images that show what I was seeing. I follow this process: sevenforums.com/tutorials/675-system-image-recovery.html and am never given the option of where I would like to restore the image. Compare to the images of the installation process here: techtalkz.com/windows-7/… Take note of the step entitled "Where do you want to install Windows?" I am trying to select a partition when restoring, but am given no such choice.
  • harrymc
    harrymc almost 14 years
    @pattern86: See my edit for another maybe solution.
  • Christian
    Christian almost 14 years
    Can I do this with the trial version? I don't want to spend any money. I would rather re-install everything from scratch than spend more money.
  • harrymc
    harrymc almost 14 years
    @pattern86: You could just install it and try. I don't know if you will need to create the boot CD for this.
  • Christian
    Christian almost 14 years
    Would all of my boot-related files be in tact? I'm not super-savvy when it comes to low-level system architecture.
  • nhinkle
    nhinkle almost 14 years
    That depends. I can't specifically say for a Mac using Bootcamp, since I'm not particularly familiar with that platform. Since Bootcamp handles deciding which OS to boot into, I would assume that it would still work, but unfortunately I can't promise you anything. Perhaps somebody here with more experience using Bootcamp can comment on that possibility.
  • Christian
    Christian almost 14 years
    Thanks--I hope someone does know. The Boot Camp thing is a major part because of my setup.
  • Christian
    Christian almost 14 years
    The last dialog box says it will erase my entire disk, which I do NOT want to do.
  • harrymc
    harrymc almost 14 years
    @pattern86: Then there is no hope of recovering the disk. In the future, I suggest not to use Microsoft backup. See rather paragon-software.com/home/db-express and techsupportalert.com/best-free-drive-imaging-program.htm.
  • Christian
    Christian about 13 years
    You're right. I have updated the question to address that I am still looking for a way to restore a VHD image to an NTFS-formatted partition on a hard drive. Specifically a boot camp partition on a Mac.
  • harrymc
    harrymc about 13 years
    I have written a possible solution above.
  • Christian
    Christian about 13 years
    Can I mount a VHD easily on a Mac?
  • bzsparks
    bzsparks about 13 years
  • Christian
    Christian almost 13 years
    I am going to try this when I have the time to re-image my Mac if something goes awry. I didn't want to do this simply because of the headache if it did go wrong, but I'm at the point where it's worth a try.
  • techie91
    techie91 almost 13 years
    Check my update, and DEFINITELY run Time Machine first.
  • Christian
    Christian almost 13 years
    I did run TM first, and tried it myself before you updated the post. It simply failed for me. I re-partitioned my iMac as a single HFS+ partition and re-installed Lion / restored from the TM backup. Am now waiting for another answer.
  • Vito Gentile
    Vito Gentile over 10 years
    For everyone who wants to follow this solution, in this page there is a working guide on how to install QEMU on OSX ;)