7

Please share, if you know any tips to salvage data from a "compressed DMG" which no longer mounts (in my case, something went wrong during "scan image for restore").

7

Answering my own question here with a list of things to try.

  • Disk Utility > First Aid > Repair Disk
  • Disk Utility, try converting the image to an ISO
  • try using 3rd party utility to convert the image, such as "dmg2iso" (sometimes this has a side effect of ignoring corrupt data, and the image will mount)
  • try mounting with 3rd party utility such as Toast
  • hdiutil attach -ignorebadchecksums /Volumes/path/to/image
  • hdiutil mount -nomount -readwrite /Volumes/path/to/image (then try repair using DiskWarrior, etc)

I'll probably be fleshing this list out over the next week as I do more research. I want to take a look through these sites:

5

I found the following command to work on salvaging a corrupted dmg image. The solution started from reading your problem. I looked for a solution for three days.

hdiutil convert imac.dmg -format UDTO -o output.img

Background: I had used diskutil on OSX 10.8.2 to create an image of my iMac's internal drive. I transferred it up to my server and when I went to restore it to another disk it would not mount saying there were no valid file systems. I was devastated as I had too much confidence in the image and got rid of my timemachine images to save space. Okay I am a moron who should know better!

I googled the error and found this discussion. I tried all of the items and was not able to mount the dmg file. I knew the the image was basically good by running

hdiutil imageinfo imac.dmg which gave promising results:

Format Description: UDIF read-only compressed (zlib)
Class Name: CUDIFDiskImage
Checksum Type: CRC32

From a link provided in this thread http://discussions.apple.com/thread.jspa?threadID=1218394

I found a reference to http://vu1tur.eu.org/tools/ for dmg2img which DMG2IMG is an Apple's compressed dmg to standard (hfsplus) image disk file convert tool. I went to the read me file for the tool which had this note:

1. An equivalent command under Mac OS X would be:
    hdiutil convert <input.dmg> -format UDTO -o <output.img>

And that turned out to be the solution. I was able to mount the output file, which was the right size, 200GB, and extract the files I needed!

SUCCESS!

  • Brilliant; got the same issue (curse you, OSX Disk Utility restore feature...); after the conversion I was able to get the image and restore it. I suspect my image was compressed, since it end up being twice as big as the original DMG file. – rataplan Nov 27 '14 at 2:52
3

I had to use the -noverify and -mount suppressed flags to get my disk to mount. Without those flags, the errors kept causing the mount to abort. After mounting in this way, I was able to select a blank entry in the Disk Warrior drop-down and recover the majority of my files.

hdiutil attach -noverify -mount suppressed /Volumes/path/to/image
1

DiskWarrior can be used to rebuild some corrupt disk images, depending on the nature of the corruption. Might be worth a shot if you have a copy.

-1

Most probably, it is dead beyond repair.

You will need to download or obtain it again.

  • 1
    How can you tell that is broken beyond repair? I had the same issue and converting the image fixed the issue. An attempt is always a good thing to do, before give up :) – rataplan Nov 27 '14 at 2:50

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.