I'm looking for a way to get the.dmg path of a mounted disk image with just its mount point. I want to write a 'simple' Finder service that ejects the disk image and trashes the accompanying.dmg. The ejecting is trivial, but I'm at a loss as to how to figure out the path of the.dmg, given just the mount point. Method 3: Mount.dmg file using iSumsoft Bitlocker Reader for Mac If you cannot open.dmg files on your Mac using either of the first two methods, it’s a good idea to use a third-party utility like iSumsoft Bitlocker Reader for Mac. ISumsoft Bitlocker Reader for Mac is mainly to help unlock BitLocker-encrypted drive on Mac, but it also comes. Mount Dmg File Windows 10; How To Mount Dmg File Terminal 1; How To Mount Dmg File Terminal 4; If you want to script the install it requires a few more steps since the name of the.dmg file, the name of the Volume created, the name of the application, and the name of the device that needs to be detached can all be different. Mount the.DMG File via Terminal If the right-click menu is grayed out or nothing happens when you click any of the Open With options, you can try mounting the file using Terminal instead. Drag the file to the Desktop and follow the steps below: Open the Terminal app by going to Finder Applications Utilities.
☆ ★ ★ ★ ★ Rated (4.0 of 5.0) by 10 reviewers.November 8, 2019 at 6:30 AM
Categories: macOS | View Comments
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 not able to mount the new Apple File System (APFS). So if you're on macOS Sierra (10.12) or earlier and you ran hdiutil and see references to
Apple_APFS
or error112
, the issue is likely legitimate incompatibility, and this disk image won't open on this Mac without an update to the operating system.Here's an example of the end of
hdiutil attach -verbose
output that shows an APFS error due to an older version of macOS: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.
Another suggestion added by a reader (thank you, Markus!) is that filesystem errors on your main Mac drive could be the cause of the disk image mounting errors. Here are instructions from Apple for scanning and repairing errors using Disk Utility. Note that in order to scan and repair errors on your main Macintosh HD drive, you'll need to reboot your Mac into recovery mode. You'll want to choose Disk Utility in the utilities listed in the recovery mode menu.
A new discovery from a reader (thank you, Colby!) is that APFS DMGs won't mount if you're booted in macOS booted in Safe Mode. (Who knew!?!) If you're not sure if you're in safe mode, select the Apple menu > About This Mac > System Report button, then select the 'Software' heading from the left column. To exit safe mode, restart your Mac, without holding Shift during startup. Or, if you previously set your Mac to always boot into safe mode using
nvram
, turn off safe mode and have your Mac boot normally on the terminal:
Scroll down to “Update and Solution” to see how to get this to work.
Apple recently released new installers for Mac OS X/OS X/mac OS to deal with expired certificates:
Three of the six are links to the Mac App Store:
The other three are URLs to download DMGs:
- macOS Sierra – InstallOS.dmg
- OS X El Capitan – InstallMacOSX.dmg
- OS X Yosemite – InstallMacOSX.dmg
Today I tried (and failed) to create a new Virtual Machine in either Parallels or VMware Fusion using one of these DMGs, specifically, the El Capitan one.
I will explain what I did, and where I got stuck, in the hopes that someone else might figure out what I did wrong and point me in the right direction.
Terminal Mount Dmg
Download the DMG
Apple has created three DMGs for Yosemite, El Capitan, and Sierra, but couldn’t be bothered to give them useful names, so Yosemite and El Capitan are called ‘InstallMacOSX.dmg’ and Sierra is ‘InstallOS.dmg’.
Likewise the DMGs aren’t named usefully when you mount them either, so make sure you name the DMGs well when you download them to avoid confusion. Here’s how to download it and rename it at the same time
Mount the DMG
Open the ‘~/Downloads/InstallElCapitan.dmg’
That will leave you with
“/Volumes/Install OS X/InstallMacOSX.pkg”
Extract the App
Don’t try to install from that .pkg file, it probably won’t work unless the Mac you’re using is capable of running El Capitan:
Instead, open it with Suspicious Package which will let you examine the contents of the .pkg file, as shown here:
Note the area in the red box. Obviously that’s not the full installer, despite the .dmg being over 6 GB. But let’s export it anyway:
Save it to /Applications/ (or wherever you prefer, but that’s where I’ll assume it is for the rest of these instructions).
Don’t eject “/Volumes/Install OS X/InstallMacOSX.pkg” yet, we still need to get the actual .dmg from it.
Macos Terminal Mount Dmg
Get the other DMG
Download The Archive Browser if you don’t already have it (it’s free!) and use it to open “/Volumes/Install OS X/InstallMacOSX.pkg”.
It will look like this:
Click on the triangle to the left of “InstallMaxOSX.pkg” to reveal its contents, and select the “InstallESD.dmg” file from it.
Once it is selected, choose “Extract Selected” from the bottom-left. Save it to ~/Downloads/ (it won’t be staying there long).
Ok, this part could be confusing…
Mac Terminal Mount Dmg
When The Archive Browser exports the file, it will not just export the “InstallESD.dmg” file. First it creates a folder “InstallMacOSX” and then it created “InstallMacOSX.pkg” inside Download game rumble racing untuk android pc. that folder, and the “InstallESD.dmg” file is put inside the .pkg… but you can’t see it, because the .pkg file won’t let you open it.
That’s OK, because we’re going to use Terminal.app to move the file into place anyway.
First we need to create a directory inside the ‘Install OS X El Capitan.app’ which we previously saved to /Applications/. We’re going to use the same folder for two commands and we want to make sure we get it exactly right both times, so we’ll make it a variable:
Then use the variable with mkdir
to create the folder:
and then we need to move the “InstallESD.dmg” file into that folder
Note: you probably want to trash the ‘~/Downloads/InstallMacOSX/InstallMacOSX.pkg’ (and its parent folder) now that it is empty, to avoid confusion later
Now if you look at the ‘Install OS X El Capitan.app’ in the Finder, it should show itself as 6.21 GB:
So close, and yet…
VMWare was willing to start trying to make a virtual machine using the app, but it failed when it came to the actual installation part:
I don’t know what to try next. Parallels would not use either the ‘Install OS X El Capitan.app’ or the ‘InstallESD.dmg’ to try to create a new virtual machine.
Update and Solution
I posted a question on the VMware Fusion support forum asking how to do this, and someone came up with a very clever solution, which I will replicate here in case others are interested. The idea is simple, but I never would have thought of it.
- Create a virtual machine of any version of macOS, even the current version that you are using on your Mac.
Inside the VM, download the .dmg (see below) and mount it.
Launch the .pkg inside the .dmg.
The .pkg seems to understand that it is inside a VM, and will install the app, which it would not do outside of the VM. Note that the Installer.app says that it will only take a few megabytes, but that is incorrect.
Find the “Install OS X El Capitan.app” (or whatever the app name is) in the /Applications/ folder inside the VM. It should be over 6 GB in size.
Copy the “Install….app” from the VM out to your actual Mac.
Create a new VM using the “Install….app” from the /Applications/ folder on your Mac.
Step #4 is the part that I never would have guessed. The .pkg would not install the app outside of a VM, but will install it inside of a VM.
This worked perfectly with the El Capitan .dmg file, and I’m currently doing the same with Yosemite and Sierra. Then I’ll try the older versions of Mac OS X from old installers that I have from before they disappeared from Apple’s servers.
Update 2
Turns out that Rich Trouton wrote about this technique back in early 2017:
But I wasn’t working with VMs at the time, so I must not not stored that in my long-term memory.
Update 3
I had saved the older installers for Lion, Mountain Lion, and Mavericks, which are no longer available for download.
Each of them still installed as a VM. Apparently they were not signed with the certificates that expired.
Older versions of Mac OS X (10.6.8 and before) are not available to virtualize.