Hello I've downloaded a bootable .iso image that I'd like to write to an USB stick under OSX (10.6).
I've converted the image with the command
hdiutil convert -format UDRW -o ./X15-65804.img ./X15-65804.iso
The problem is that I need to remove a file from the image before writing it to USB.
As far as I understand during the conversion the new image file has become read/write (due to the -format UDRW
switch). Still, I can't delete files from the mounted image (Permission denied).
I also tried to mount from command line:
hdiutil attach -readwrite X15-65804.dmg
Still no luck, the image is read-only. How could I mount it in read/write mode?
Best Answer
Disk images are just containers that emulate a disk. The DMG's contents are distinct from the DMG container. So you've probably only converted the container to read/write.
For example:
We can convert a DMG that contains an ISO to be read/write, but the ISO itself can only be read-only:
You run into a similar problem with the hybrid filesystem images that many OS distributions are shipping these days.
Here's an excerpt from the
hdiutil(1)
man page section on Hybrid images:So there's the work-around: Copy the files off and make another DMG.
Which, unfortunately, is probably what you were hoping to avoid.
By the way, you might find this command helpful to peek into the DMG's partitions: