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

OS Monterey unable to open dmg workaround using Terminal

Yesterday, 18Feb22 I updated from Big Sur to Monterey 12.2.1. Today I double clicked on the password protected dmg I keep on the Desktop in which I keep sensitive data. Searching online I found this is a known bug in Monterey. At the r/MacOS subreddit I found a workaround.


In Terminal type hdiutil attach ~/Desktop/'name of dmg' and press Return. I discovered that it only works if I type the full path. Typing the command and dragging the dmg into Terminal didn't do a thing. When the full path is typed, pressing Return caused Terminal to prompt me for the command. Entering it and pressing Return opened the dmg.


This showed me that my dmg was not corrupted but that the problem lies within Monterey.

Posted on Feb 19, 2022 12:42 PM

Reply

Similar questions

16 replies

Feb 19, 2022 1:04 PM in response to johngpt5

johngpt5 wrote:

Yesterday, 18Feb22 I updated from Big Sur to Monterey 12.2.1. Today I double clicked on the password protected dmg I keep on the Desktop in which I keep sensitive data. Searching online I found this is a known bug in Monterey. At the r/MacOS subreddit I found a workaround.

In Terminal type hdiutil attach ~/Desktop/'name of dmg' and press Return. I discovered that it only works if I type the full path. Typing the command and dragging the dmg into Terminal didn't do a thing. When the full path is typed, pressing Return caused Terminal to prompt me for the command. Entering it and pressing Return opened the dmg.

This showed me that my dmg was not corrupted but that the problem lies within Monterey.


Is this a zsh issue

or

applies to bash as well?


Have you added the Terminal.app to Full Disk Access...(?)

>System Preferences>Security & Privacy>Privacy>Full Disk Access



Controlling app access to files in macOS - Apple Support


Feb 19, 2022 1:44 PM in response to johngpt5

Give this a try: boot into Safe Mode according to How to use safe mode on your Mac and test to see if the problem persists. Reboot normally and test again.


NOTE: Safe Mode boot can take up to 3 - 5 minutes as it's doing the following; 

• Verifies your startup disk and attempts to repair directory issues, if needed

• Loads only required kernel extensions (prevents 3rd party kernel/extensions from loading)

• Prevents Startup Items and Login Items from opening automatically

• Disables user-installed fonts 

• Deletes font caches, kernel cache, and other system cache files


Also, have you tried creating a new password protected disk image and see if it will open normally?


Feb 20, 2022 8:23 AM in response to dialabrain

Not that it is necessarily related, but I had problem scanning a large (55GB) disk image with the Disk Utility with the Scan for Restore command. The command kept returning an error in Monterey but worked in Catalina. It seems that the disk image capability isn't being tested as thoroughly as required since disk images are used for backups.


Feb 19, 2022 1:27 PM in response to johngpt5

johngpt5 wrote:

No clue.
But thank you for including that screenshot.
I went to the Privacy preference dialog as you've shown and added Terminal.
The command hdiutil attach ~/Desktop/ and dragging the dmg into Terminal still didn't work.
I had to again type the full path for Terminal to prompt me for my password and then open the dmg.


Thanks— very interesting.

Feb 19, 2022 2:09 PM in response to dialabrain

I'm finding some online comments that suggest that if the dmg which Monterey thinks is corrupted was created some time ago with older OS versions, this problem shows. Apparently a dmg created within one or two OS versions back don't have this problem.


My wrongly thought corrupted dmg had been created on another MBP back in Lion or Yosemite, renamed on this computer in Catalina in order to keep the two files discrete. Big Sur didn't have a problem opening it. But now the problem is solved by using Terminal to open the 'corrupted' dmg, renaming the main folder and using Disk Utility to create a new password protected dmg for it. The newly created dmg opens just as it should in Monterey.

OS Monterey unable to open dmg workaround using Terminal

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