macOS Error Opening .dmg Disk Image - No Mountable File Systems

I ran into an interesting macOS error while working with a customer a couple of weeks ago. I didn't find a lot of good search results addressing the issue, so I decided to write up a post about it myself.
The error was as the screenshot above shows; trying to open a dmg (disk image), macOS showed the error "no mountable file systems". If you see the "no mountable file systems error" while opening a dmg, here's what you should try:
-
In most cases, the downloaded dmg file is actually corrupt or had an error downloading. If possible, try downloading the dmg again, turning off any download assistant plug-ins you may have. You can try downloading the file in a different browser as well. Or if you don't need to be logged in to the site to download the file and you want to be fancy, you can try
curl -O url
in Terminal to download the file. (There's an example of that in my screenshot below.) -
Reboot your Mac if you haven't already tried that. Apparently there is an issue sometimes after opening too many dmg files, that is fixed with a reboot.
-
Try mounting the DMG on the command line in Terminal. We will at least get some sort of useful error message to go on if it still fails:
-
Open Terminal: In Spotlight, the search magnifying glass at the upper right corner of your screen, search for Terminal, and press enter to open the Terminal app.
-
Type
hdiutil attach -verbose
into the terminal. Add a space at the end, but don't press enter yet. -
Drag the dmg file from your Finder window onto the Terminal window and let go. This will fill in the location of the dmg file into your Terminal window.
- Press enter.
-
-
macOS Sierra (10.12) and earlier is actually not able to mount the new Apple File System (APFS). So if you ran hdiutil and see references to
Apple_APFS
, the issue is likely legitimate incompatibility, and this disk image won't open on this Mac without an update to the operating system. -
Think about if you have any kind of security policies on this machine to prevent writing to external drives (thumb drives, optical drives, etc). I haven't seen this one in action, but I read about this being a possibility while researching the issue.