Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

.DMG file not recognized

A couple months ago my Macbook ran into a bootloop, couldn't get into macos but rather looped after the Apple screen. Only way out was to internet-recover a fresh install of the OS. Before doing that I saved my whole pictures folder - or rather the program that is called "Pictures" - the app. All of it totaled some 25-30 gigabytes of data, saved onto a 32gb stick and put onto my windows desktop for keeping. I took 3 copies of this library. One of which I know completed and gave a green checkmark.


Once the Macbook was up and running again on a fresh install those .dmg that I created in disk utility didn't want to mount. macOS claims that they "could not be recognized" which I've since learned is a common error on .dmg files that have a corrupt download. Since this isn't a download from the internet, but rather an image created directly from the machine none of the other cases I've read about applies.


Basic stuff I've checked are:

The image is mounting with the correct program, diskimagemounter.

The file size is the anticipated 27,46gb.

Terminal will not either recognize the image using hdiutil.


What do I do? Is there any way I can extract these pictures or what might be left of them? Any way to force it open? Split it up and avoid any bad parts of the image? Fix the image? What can be done?


Thankful for all and any help!

Posted on Feb 16, 2020 12:49 PM

Reply

Similar questions

9 replies

Feb 16, 2020 3:56 PM in response to Wilmer2k

Wilmer2k wrote:
A couple months ago my Macbook ran into a bootloop, couldn't get into macos but rather looped after the Apple screen. Only way out was to internet-recover a fresh install of the OS. Before doing that I saved my whole pictures folder - or rather the program that is called "Pictures" - the app

those .dmg that I created in disk utility didn't want to mount. macOS claims that they "could not be recognized"

Diskutility itself in recoverymode


Please post some reference to the [ "Pictures" - the app] that you mention.

I am trying to think through the issue here.


Your macOS issues— you were running Mojave(?) formatted as HFS(?) or was it formatted as APFS(?)


You reinstalled Mojave, did you change to the newer APFS ?


macOS High Sierra (10.13) you had an option to bow out of converting to apfs, macOS Mojave made this more difficult, and macOS Catalina demands apfs.


If those .dmg where created using the extended journal (HFS+) format, then it may not be possible to open them on a apfs. *see ref below.


Here is a guess—

If you ty mounting and opening these .dmg on another mac that is formatted as HFS+ (ie previous to apfs.) there may be no issue.


It also could be a bug in Catalina, period.


*https://support.apple.com/guide/disk-utility/create-a-disk-image-dskutl11888/19.0/mac/10.15

Feb 16, 2020 6:46 PM in response to Wilmer2k

2017 could have well shipped with High Sierra, formatted as HFS+ (extended/journaled), however on a new Mac (2017) High Sierra on all devices with flash storage are automatically converted to APFS. On older models/earlier models, if upgrading to High Sierra you had an option to keep the HFS+ file format—many of us did.


</Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --converttoapfs NO>




So it may be a red herring this whole thought process...


if however yours was a early 2017 MBP there is a chance/ likelihood the above may be relevant. I would certainly try mounting the .dmg from another earlier macOS and find out the results.




Feb 16, 2020 4:09 PM in response to leroydouglas

Super interesting approach. The mac is and was om Mojave, I havn’t updated to Catalina yet.

Which ever driveformat the mac shipped with mustve been what the images was created on, apfs I suppose? Is there a newer apfs format?


It’s a 2017 a1708 Mb pro 13 inch, if that can point at a filesystem format.


Super greatful for your expertise

Feb 17, 2020 12:31 PM in response to leroydouglas

So today I've done some proof of concept on the issue, just to check that my method of creating a dmg of this pictures library actually works. I took my macbook, now formatted on apfs since the reinstall, and entered recovery mode, made an image of a folder and selected the photos library. The whole process looked exactly the same like it did the first time. Takes ages and finishes off by "freezing" with an empty bar until suddenly it marks it with a green check mark. This dmg mounted and opened just like expected once I came back into macos and inserted the usb drive it was created on.


This I guess raises a couple questions;

Could storing these dmgs on a windows based PC make for corrupt dmgs? They were merely moved and stored using the MacDrive application.

Were the dmgs to be corrupt, damaged or otherwise broken, is there a way one can tell what happened and resolve it?

The idea of splitting the dmg into segments, could this make parts of it openable? Make a copy and try?


Feb 17, 2020 4:40 PM in response to Wilmer2k

Wilmer2k wrote:

So today I've done some proof of concept on the issue, just to check that my method of creating a dmg of this pictures library actually works. I took my macbook, now formatted on apfs since the reinstall, and entered recovery mode, made an image of a folder and selected the photos library. The whole process looked exactly the same like it did the first time. Takes ages and finishes off by "freezing" with an empty bar until suddenly it marks it with a green check mark. This dmg mounted and opened just like expected once I came back into macos and inserted the usb drive it was created on.


from original post:
saved onto a 32gb stick

USB sticks are not good choices for storing data. Many of them even from a reputable vendor are just junk. I've run data integrity checks on various USB sticks and almost all of them invariably flip a bit once in a while.


FYI, when creating an archive always make sure you can open it after it has been created.



This I guess raises a couple questions;
Could storing these dmgs on a windows based PC make for corrupt dmgs? They were merely moved and stored using the MacDrive application.

No, storing a file on another OS won't damage it. Now if the drive on the other computer has issues, then that is another thing. Most likely your original USB stick is to blame for the corruption of the .dmg file.


Were the dmgs to be corrupt, damaged or otherwise broken, is there a way one can tell what happened and resolve it?
The idea of splitting the dmg into segments, could this make parts of it openable? Make a copy and try?

Don't try anything on the original .dmg. Make a copy and work from the copy instead.


You might want to try converting the .dmg file to a straight uncompressed raw image file. You may be able to do this the Terminal command line utility "hdiutil", but an even better way would be to use the Linux "dmg2img" utility to uncompress the archive into a plain raw image file. I don't use Windows so I'm not sure if there is any third party utility to do the same using Windows. You may be able to install "dmg2img" on macOS using HomeBrew. Sometimes using a utility from another OS makes all the difference in the world.


I know it is possible for Linux to repair the file system on raw image files, but I don't know if Disk Utility can do the same or not. You would probably need to use "hdiutil" to create an access point from which to work. I'm not familiar enough with "hdiutil" to provide instructions or examples. It would be best to work from an uncompressed image file. See if you can get the "hdiutil" utility to "mount" or rather "open" the image file. It isn't really mounted yet. Consider it more like opening the .dmg image archive to peek inside a bit. It is hard to explain. I've never really done this with macOS, although I have done it a few times using Linux. If you can "open" the image file with "hdiutil", then perhaps you can use a data recovery program such as Data Rescue to extract the contents.


If the .dmg file used the HFS+ file system, then it may be possible to fix it, but unfortunately if it was created with APFS, then you are out of luck since there are no third party utilities available to repair APFS since Apple has not released the necessary documentation.


I was successfully able to use the command line tool "testdisk" to access data from a cloned drive with a corrupted file system (it used HFS+). Testdisk can work on .dmg raw image files as well as unmounted drives/partitions (with HFS+ file system).


You may want to consider contacting a professional data recovery service such as Drive Savers or Ontrack. Both vendors provide free estimates and are recommended by Apple and other OEMs.


Always work from a copy so you don't damage the original file or drive.

Feb 20, 2020 3:02 PM in response to HWTech

dmg2img on ubuntu just returned a ERROR: dmg is corrupted, which wasn't very interesting.

I installed testdisk on the windows OS and ran it in search for pictures stored in hfs+ containers, or previous ones that is. it collected a couple thousand files, probably not from the dmg I'm trying to break open. I can't really wrap my head around if it's possible to use teskdisk/photorec to only recover from a specific library, or image in this case.

Are there any alternatives as to trying to find out what's wrong with this image?

Very very thankful for the help!

Feb 20, 2020 7:46 PM in response to Wilmer2k

Make sure to work from a copy of the .dmg file.


See if you can use Disk Utility to repair the .dmg file. Open Disk Utility and drag & drop the .dmg file from the Finder onto the Device List within Disk Utility. Select the .dmg from the left pane of Disk Utility and run First Aid on it.


If that doesn't work, then try the following command in the Terminal making sure to drag & drop your .dmg file onto the Terminal in place of "<path-to-dmg-file>" so the correct path is auto-filled for you:

hdiutil  attach  -noverify  -mount suppressed  <path-to-dmg-file>


If this completes successfully, but you still cannot access your files, then see if you can run Disk Utility on the mounted volume. Try running TestDisk or PhotoRec on the mounted volume produced by the above "hdiutil" command.


I just tried using TestDisk on a couple of .dmg files and it doesn't seem to work even when using macOS. You might want to try using PhotoRec instead while booted from macOS. I tried PhotoRec on a .dmg using my Linux system and was unable to recover anything from the .dmg file, but PhotoRec did work on the converted .img file that "dmg2img" made. I'm not sure why TestDisk would not work on the same converted .img file.


If these things do not work, then I think you will need to contact a professional data recovery service such as Drive Savers as they are more likely to have the necessary tools and experience to access the files.


Please let us know how you make out with this endeavor.

.DMG file not recognized

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.