How to mount the pc/iso partition of an iso file when it also contains an HFS partition?
You can check that the .iso file does indeed have an HFS/HFS+ volume on it with the file
command (I can't remember if this is native or if I installed it via homebrew... might have to do that yourself):
file -k --mime path/to/something.iso
If it does have an HFS volume, then the output will be 3 lines (instead of 2).
something.iso: application/x-iso9660-image
- application/x-apple-diskimage
- application/octet-stream; charset=binary
To mount the PC portion, you have to do more than just doubleclick.
hdiutil attach -nomount something.iso
This will produce output something like this:
/dev/disk3 Apple_partition_scheme
/dev/disk3s1 Apple_partition_map
/dev/disk3s2 Apple_HFS
Keep in mind that depending on what else you might have mounted, the disk number can change. If so, amend the following command:
mount -t cd9660 /dev/disk3 ./path/where/contents/will/show
Also, you will need an empty directory, the path/where/contents/will/show
. You can create it as you would any other way on OSX. It can be a relative path, or an absolute one. It won't automatically remove itself after you're done mounting this though.
Finally, when you are ready to get rid of this, there are several commands to undo all of this.
umount ./path/where/contents/will/show
hdiutil detach /dev/disk3
Doing this more than once or twice has the tendency to cause my iMac running Mojave to lock up and required a reboot (but I had done this with as many as half a dozen ISOs at that point).
I forget where I found this (didn't figure it out on my own), and I think it was on Stackoverflow. I apologize to whomever posted the answer there as I can no longer give credit. Answering it here though will make it easier for others to find.