Mounting a Disk DMG with the Terminal options

So I'm trying to mount a disk DMG of one of my external hard drive that I recovered with a data recovery program. I tried to use my terminal as suggested in an earlier post where I sought help on this mater:(Re: Disk DMG can't be opened "No Mountable File Systems.") and upon following the instructions given got this result:


dmg: verb not recognized

Usage: hdiutil <verb> <options>

<verb> is one of the following:

help flatten

attach imageinfo

detach internet-enable

eject isencrypted

verify makehybrid

create mount

compact mountvol

convert unmount

burn plugins

info resize

checksum segment

chpass pmap

erasekeys udifderez

unflatten udifrez


So, my question now is, what do I do now? How do I find out which option is the problem and solve it?

null-OTHER, Data Recovery for OS X iMacs

Posted on Nov 3, 2017 10:11 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 3, 2017 12:43 PM

Try entering: hdiutil attach image in Terminal.


Do NOT use the <return> key yet. Now as you were instructed in the previous post, click on and drag the DMG file to right after the above command in Terminal. After doing so, hit the <return> key to execute the command. If all goes well, the drive image mount as a device.

11 replies

Nov 4, 2017 1:06 PM in response to VikingOSX

VikingOSX wrote:


Have you tried in the Terminal:


open /full/path/to/your/dmg/foo.dmg


This should mount and open the .dmg on your Desktop. It works with .dmg installers.

Sorry I'm not much of a tech wiz, so I just wanna make sure I have your instructions right. I have to type "open/full/path/to/your/dmg/foo.dmg" into my terminal and that should open it? Do I drag the dmg into the terminal after typing this too?

Nov 4, 2017 12:59 PM in response to Tesserax

Tesserax wrote:


Try entering: hdiutil attach image in Terminal.


Do NOT use the <return> key yet. Now as you were instructed in the previous post, click on and drag the DMG file to right after the above command in Terminal. After doing so, hit the <return> key to execute the command. If all goes well, the drive image mount as a device.

It says "there's no such file or directory." So how do I add it?

Nov 4, 2017 2:32 PM in response to VikingOSX

VikingOSX wrote:


You replace /full/path/to/your/dmg/foo.dmg with the full path to your mountable .dmg — directly after the open command.


In the Finder, press the option key while right-clicking on the .dmg file. One of the secondary menu items will offer to copy the full path to the .dmg. Select that menu item, and paste after the open command in the Terminal.

I don't have a PC mouse, I'm working with a mouse of a 2008 24inch screen mac... So is there an alternative to right clicking?

Nov 5, 2017 1:41 PM in response to Tesserax

Tesserax wrote:


I don't have a PC mouse, I'm working with a mouse of a 2008 24inch screen mac... So is there an alternative to right clicking?

Hold down the <option> key before clicking to get the equivalent of a right-click.

It's the <control> key for El Capitan, which is weird because I coulda swore for Maverick and Yosemite it was the <option> key, but I digress, as these are my options upon using the <command> and clicking gives me these options:"Open," "open with," "Move To Trash," "Get Info," "Rename," "Compress Application," "Burn image to disc," "Quick look," "Duplicate," "Make Alias," "Copy Applicants," or "share."


Click do I click in order to copy the full path to my DMG?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mounting a Disk DMG with the Terminal options

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