Trying to restore a Mac OS X system from DMG file fails
I just had the same problem and did not find anything useful first, but now came up with a solution myself. Like you, I first attach the drive using hdutil like you did (with -noverify
to speed up the process). Instead of diskutil
, I used mount_hfs
like this:
sudo mount_hfs -j -o rdonly /dev/disk3s2 ~/mountpoint
Not sure if -j
(ignore journal) is needed, but -o rdonly
is required! ~/mountpoint
is a directory I created beforehand.
![slhck](https://i.stack.imgur.com/jyNn1.png?s=256&g=1)
slhck
Updated on November 23, 2022Comments
-
slhck over 1 year
I'm in a bit of a panic at the moment. My MacBOok was hanging and generally misbehaving so I decided it was time to do a clean install. I took 2 backups:
- Time Machine (happens anyway, but I ensured it was up to date)
- A complete disk image into a DMG file which I put on an external drive.
I re-installed mac/os from a bootable USB image I made of 10.8.2. So far, so good. Then I went to recover my users, apps etc from Time Machine. Unfortunately Migration Assistant could not see the backup. It could see my wife's MacBook backup, but not mine.
I went to the command line and found the backup on the AirPort Extreme disk and used
cp -r
to copy some files across, but this wasn't really what I wanted to do. I wondered if I could do this via Time Machine, so I enabled it. Big mistake! Time Machine kicked in for the first time and appears to have overwritten my backup! I now don't have my original files on the Time Machine backup.So, I tried doing a complete restore from the DMG file I created using Disk Utility – it would not mount the DMG file. After some investigation I discovered that this may be because I have multiple partitions in my DMG file.
The situation I am in now is I can use
hdid -nomount /Volumes/ExternalFreeAgent1TB/PipMacBookPro20121209.dmg
to mount the dmg file. It shows up in diskutil list:
/dev/disk2 #:, TYPE NAME, SIZE, IDENTIFIER 0:, GUID_partition_scheme, *320.1 GB, disk2 1:, EFI, 209.7 MB, disk2s1 2:, Apple_HFS Macintosh HD, 297.4 GB, disk2s2 3:, Apple_Boot Recovery HD, 650.0 MB, disk2s3 4:, Apple_HFS bootcamp, 21.7 GB, disk2s4
disk0
is the MB,disk1
is the external drive the DMG file is on, anddisk2
is the DMG file itself.Trying to mount the partition I'm interested in fails:
$ diskutil mount readOnly -mountPoint /Volumes/Old /dev/disk2s2 Volume on disk2s2 failed to mount
I'm at a loss as to what to do next. This is currently the only copy of my data (docs, emails, photos, music) going back 10 years or so any help would be greatly appreciated!
-
Admin over 11 yearsHave you tried using your OSX Install CD/USB when booting from it and see if in Disk Utility you could use Restore function on Hard Drive ?
-
Admin over 11 yearsHave a look at this, you should be able to restore from the DMG: help.bombich.com/kb/dmg-and-remote/restoring-from-a-disk-image