Jump to content

Restore DMG of complete (as in all partitions) to a bigger disk


skysea76
 Share

1 post in this topic

Recommended Posts

I already posted this on mac-forums.com, but no one responded (I guess there aren't that many UNIX/BSD users there...)

 

What I think is the major problem is that dd doesn't fix the GPT disk size, etc, etc when it does a block by block copy.

Just some more data: when I first ran gptsync (I got a mac version from this forum) it showed me my "bad" (EFI HFS+ & 1 FAT32, that btw fails to mount) GPT and a "good" (as in EFI OS X & 2 NTFS partitions -one I guess is the Windows Recovery one) MBR. It asked me to update the MBR, and I said no (I want to do it the other way around).

At this point what I mostly want is to get my data off that Windows partition, I can live thru one more reformat>reinstall.

 

Post 1:

"I upgraded my lappy HDD from the stock 120GB HDD to a 320GB one, but before I did, I connected it to my desktop and made a complete .dmg backup of it (as in, File>New>Disk Image From Diskx). I had a Windows 7 partition, which Windows 7 made me extend upon it's installation to support the Windows recovery partition (or at least that's my guess), so now it won't mount in OS X when I open the .dmg>I can't use Disk Utility to restore it.

I've tried using dd, but I haven't figured out exactly how to tell it to copy the partition. I really haven't used the mac partition any further than what's in the backup, so restoring the whole DMG would be fine, but I need some help with the command.

1st: I would have to "decompress" the DMG, right? So that dd can copy it block by block...?

2nd: how exactly would I input the dd command parameters so that it copies the whole DMG to the new HDD (connected thou firewire or, if necessary/if it will speed it up drastically -which I think it will, internally thou SATA), taking into account the the new hdd will be bigger? If it would make it easier, I could just copy it "as is" (ie, leave the difference in space free), boot into Windows, use Windows to make it's own backup, then delete the Windows partition from OS X, make the OS X partition bigger, recreate the Windows partition until the end of the drive, and then use Windows to restore it's backup. This would take centuries, so I'd rather just use dd

 

Thanks in advance."

 

Post 2:

"dd if=/dev/rdisk3 of=/dev/rdisk4 bs=32m worked for OS X (1st partition without counting EFI, 2nd if you do count the EFI one) but Windows (which I can select to boot from) says "Missing Operating System". I'm currently booting into the Windows repair environment, to see if I can fix it."
Link to comment
Share on other sites

 Share

×
×
  • Create New...