Corruption in DMG disk images
Apple's included support for a variety of disk images in OS X is one of the more convenient aspects of the operating system, allowing you to easily encrypt or otherwise compartmentalize your data for easy organization and management. While disk images
Written by Topher Kessler
Apple's included support for a variety of disk images in OS X is one of the more convenient aspects of the operating system, allowing you to easily encrypt or otherwise compartmentalize your data for easy organization and management. While disk images are fairly robust for the most part, sometimes they can become corrupt.
Unfortunately, when corruption happens there may be little you can do to reverse it. However, there are a few things you can try.
Step one: Back up
Before attempting to fix a corrupt disk image, be sure to make a copy of it. While you may be able to fix a damaged image, it is also possible that these suggestions may further corrupt it, so be sure to work from a copy.
Use Disk Utility
Disk Utility has several routines you can use to try to clear the problem. Open the program and drag the disk image copy into the devices list. Then select it and in the "First Aid" tab run a disk verification. If any problems are found, try repairing the image.
Provided the problem is still persisting, you can try converting the image or resizing it. While these usually require the image to be intact for the program to read and transfer the data, there is a possibility that this may still read the image even if it is not mountable in the operating system. These options are available in the "Images" menu. For resizing, you might try the options for resizing just the partition, just the image, or both the image and partition since these will target different parts of the image structure.
As with hard-drive repair, you may have more success with using a third-party data recovery utility such as Data Rescue, VirtualLab, or Macintosh Data Recovery. These packages may work better than some others, which may require the image to be mounted, such as DiskWarrior or Drive Genius.
You can also try converting the disk image to another format using the open-source dmg2iso. There are also a variety of DMG converter utilities available, which you can search for using VersionTracker.
Mount with Toast
Sometimes the problem is with the disk image mounter not being able to handle the image structure, and a third-party solution that does not rely on the "diskimagemounter" tool may be more successful. The popular Toast image and disk-burning software and other third-party mounters may be successful when the system's tools are not. Additionally, you might try mounting the image when booted into Safe Mode (holding Shift at start-up), since this may disable programs and extensions that could interfere with the mounting process.
Additionally, you can try mounting the image in another operating system. Many times the utilities built to enable Mac compatibility in Linux and Windows use methods for mounting or converting a filesystem that may be more successful (albeit more crude) at getting a filesystem mounted than the ones Apple provides.
Here are some resources for managing DMG disk images in other operating systems:
Data recovery services
As a final resort, there are a variety of data recovery services that claim to be able to extract files from corrupt DMG files. A couple of these are:
Topher has been an avid Mac user for the past 10-15 years, and has been a contributing author to MacFixIt for just over a year now. One of his diehard passions has been troubleshooting Mac problems and making the best use of Macs and Apple hardware both for family and friends, as well as in the workplace. He and the newly formed MacFixIt team are hoping to bring enhanced and more personable content to our readers, and keep the MacFixIt community going here at CNET. If you have questions or comments for Topher or the other MacFixIt editors, feel free to contact us at http://www.macfixit.com/contactResources