Mount DMG Read Write

Source from MacEnterprise

One of the interesting things that can be done with hdiutil is attaching a read-only image using a shadow file. Here’s how:

First, attach the read-only image as with the shadow option:


hdiutil attach -owners on your.dmg -shadow

After typing this command, the image will be attached as a new device to your operating system. Usually this is shown from the command line.

Next, copy over any items, or modify anything on the read-only image.

Detach the image when finished by right clicking and ejecting it. or in the terminal type :


hdiutil detach /dev/disk#

Now, convert the image back to read-only


hdiutil convert -format UDZO -o new.dmg your.dmg -shadow

You now have a brand new dmg, and the time and space required to convert the image to read-write has been eliminated.

N.B. : utilise par exemple avec S.I.C. de dunkan chez mondada. cf 

Olivier
About

Product and graphic designer turned to be a Mac SysAdmin.

Posted in Admin, Deploy, Mac, tips tricks scripts Tagged with: , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>