PDA

View Full Version : Restoring bootcamp from DMG




unixperience
Aug 20, 2010, 12:12 PM
I was looking online at various ways to backup my bootcamp partition and I found that you can use Disk Utility to make a .DMG of my bootcamp partition. Sounded good, now all I need is time machine to back up both my windows and os x.
upon further reading I found few people knew how to properly restore the .DMG so I came across this http://discussions.apple.com/thread.jspa?messageID=10835653
Does anyone know if this actually works?

If it does it would be a great way to backup windows using Time Machine, a few extra steps, but no need for extra 3rd party programs.



balamw
Aug 20, 2010, 03:45 PM
Winclone is basically a front end to ntfsprogs and some of the other OS X routines behind Disk Utility.

This approach is similar to what Winclone does to restore XP to a bootable state.

It probably won't work for Vista/7 as their boot process is a bit more involved. (BCD vs. BOOT.INI.)

B

unixperience
Aug 20, 2010, 06:36 PM
I just used this for Win7 64 bit (in fact I'm typing this on my win7 partition) and everything works fine. I'm pleased with the results.
This might not be the best option for those with smaller hdd. I have a 500gb (300GB osX/200GB windows) and my 70GB windows compressed to a 38GB dmg file. Which time machine will easily back up along with my other mac files.
The problem with winclone, is last I heard it doesn't support win7 well, and I even heard a few compatibility issues with snow leopard. I also figured I would then have to partition my backupdrive. Which would probably be fine but this way if it's hidden in my osx, I only need one partition formatted for mac.
Moreover my external is only big enough to store my osX anyway. When I get a new external I may go another route but if anyone wanted to find a way to "trick" Time machine into backing up windows, here it is.

unixperience
Aug 20, 2010, 06:38 PM
Here are the instructions from the following link
http://discussions.apple.com/thread....ageID=10835653

"After analyzing and trying things out, I was able to solve this. It seems that Boot Camp does not flag the partition as ACTIVE immedately after Boot Camp creates the new partition from windows.

Assuming you already have a .dmg image of your previous Windows Boot Camp partition, do the following:

:: 1
Use Boot Camp to allocate the new space. Don't use Disk Utility because the MBR will not be configured properly


:: 2
Use Disk Utility to restore your .dmg image to the new Boot Camp partition you just created. Be sure to run IMAGES --> SCAN IMAGE FOR RESTORE in Disk Utility before restoring. You may need to unmount the Boot Camp partition in Disk Utility before it begins to restore.


:: 3
Use fdisk in Terminal to mark the Boot Camp partition active. First, enter the fdisk MBR edit mode by running the following:

$sudo fdisk -e /dev/disk0

Ignore the error "could not open MBR file /usr/standalone/i386/boot0: No such file or directory". Then, determine which partition number to mark active by running the following (*in bold*):

fdisk: 1> show

Your windows partition should be #3 labeled "Win95 FAT-32". Now, mark the partition active:

fdisk: 1> flag 3
Partition 3 marked active.
fdisk:*1> write
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
Writing MBR at offset 0.
fdisk: 1> exit

Now, reboot and hold the OPTION key and Windows should be listed as a bootable option."

balamw
Aug 20, 2010, 08:17 PM
The problem with winclone, is last I heard it doesn't support win7 well, and I even heard a few compatibility issues with snow leopard.

It works fine if you use uncompressed dmg as the target format as suggested here. http://twocanoes.com/discontinued/winclone/slwin7.html

Which is exactly why I say it is pretty much the same thing Winclone is doing.

I wonder if it helps that you are restoring to a partition of the same size... Winclone supports resizing partitions.

B

unixperience
Aug 25, 2010, 07:57 PM
You could be right about the partition size thing. I did restore to the same exact size. I would guess it would work if you made a larger partition, but probably not a smaller one. I'm not really willing to try it out :pI'm pleased with the performance I'm getting now

As I side note I did use a COMPRESSED image, and it still worked fine
Thanks for your input balamw

thermodynamic
Sep 30, 2010, 05:18 PM
Here are the instructions from the following link
http://discussions.apple.com/thread....ageID=10835653

"After analyzing and trying things out, I was able to solve this. It seems that Boot Camp does not flag the partition as ACTIVE immedately after Boot Camp creates the new partition from windows.

Assuming you already have a .dmg image of your previous Windows Boot Camp partition, do the following:

:: 1
Use Boot Camp to allocate the new space. Don't use Disk Utility because the MBR will not be configured properly


:: 2
Use Disk Utility to restore your .dmg image to the new Boot Camp partition you just created. Be sure to run IMAGES --> SCAN IMAGE FOR RESTORE in Disk Utility before restoring. You may need to unmount the Boot Camp partition in Disk Utility before it begins to restore.


:: 3
Use fdisk in Terminal to mark the Boot Camp partition active. First, enter the fdisk MBR edit mode by running the following:

$sudo fdisk -e /dev/disk0

Ignore the error "could not open MBR file /usr/standalone/i386/boot0: No such file or directory". Then, determine which partition number to mark active by running the following (*in bold*):

fdisk: 1> show

Your windows partition should be #3 labeled "Win95 FAT-32". Now, mark the partition active:

fdisk: 1> flag 3
Partition 3 marked active.
fdisk:*1> write
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
Writing MBR at offset 0.
fdisk: 1> exit

Now, reboot and hold the OPTION key and Windows should be listed as a bootable option."

Thanks for the post - unfortunately the Apple site link goes to a 'not found' page (it may have been archived or deleted), but as I am working on making a viable backup procedure for my Win7 partition, I wanted to acknowledge your post and hopefully have more to say in the future. :)