Mounting an ISO image with readwrite permission

9

1

I am following these instructions for creating a cross-platform CD. I am coming across a problem in Mountain Lion where I cannot mount the image as read-write.

When I enter the following in Terminal:

hdiutil attach -readwrite ~/2013CD.iso

I get the following message:

hdiutil: attach failed - Function not implemented

Is there any way around this? I need to be able to mount the image as readwrite to make changes to it.

colincameron

Posted 2013-01-29T13:58:32.667

Reputation: 525

PS: I read your link. I am not sure how step 5 could ever have worked unless hdiutil internally does what I described as step 1. – Hennes – 2013-01-29T14:17:34.780

Yes, step 5 doesn't work, but I don't need the background image – colincameron – 2013-01-29T14:22:29.893

Answers

7

ISO 9660 (CD images) are not designed for writing. The entire filesystem is designed for efficient read only access.

If you want to change part of an .iso you have three options:

  1. Copy all data. Change the copy. Generate a new iso file.
  2. If the iso is part of a multi-session CD, you can add new files and change the index. This will not change the old files, nor can you gain space by erasing files.
  3. Use an overlay filesystem. All writes go to the non-iso part, but show up as if they were in the iso. This is how many live CDs work.

Hennes

Posted 2013-01-29T13:58:32.667

Reputation: 60 739

Thanks for the answer. The reason I need to mount as read-write is to have the folder open on mount using sudo bless -folder /Volumes/CD -openfolder /Volumes/CD can I do this without mounting as read-write? – colincameron – 2013-01-29T14:34:48.623

No idea. I am not an Mac user. However this URL seems to indicate that bless no longer is needed for OS/X. ( https://discussions.apple.com/thread/354645?start=0&tstart=0 ). Are you trying to make a CD image for ancient Mac OS 8?

– Hennes – 2013-01-29T14:58:06.467

That discussion seems to refer to blessing the system folder, rather than a disk image. This is still needed to allow a folder to open when the disk is inserted. – colincameron – 2013-01-29T15:16:17.980

1

From https://wiki.afp548.com/index.php/Mount_DMG_Read_Write:

...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.

It's the -shadow option that enables this.

DavidWan

Posted 2013-01-29T13:58:32.667

Reputation: 11

has no effect with iso – Sergei – 2019-01-04T09:25:10.943

With a bit more details to this approach https://apple.stackexchange.com/questions/94836/how-can-i-modify-a-dvd-image-iso-and-then-burn-a-new-dvd

– zoechi – 2019-07-05T18:55:09.870

1

I had the same problem. The workaround is use a Mac running OS X 10.6.8.

Mountain Lion seems to block it for some reason.

user199906

Posted 2013-01-29T13:58:32.667

Reputation: 11