Credit: https://unix.stackexchange.com/questions/298685/can-a-mac-mount-a-debian-install-cd
This is one of those "I have to do this occasionally and can never remember how" things - mounting an ISO in macOS, especially Linux ISOs.
macOS has a few things that are stupid. Trying to mount a .iso file directly using normal means ends in failure:
hdiutil: mount failed - no mountable file systems
It's completely doable, unlike other image formats (.img
, .dmg
, etc), just takes a bit more effort.
sudo kmutil load -p /System/Library/Extensions/cd9660.kext
sudo kextload /System/Library/Extensions/cd9660.kext
Haven't take the dive into Big Sur yet, but loading the kext happens automagically in macOS 10.x.
hdiutil attach -nomount </path/to/your/iso_file>
Take note of the device name - ie /dev/disk7
mkdir -p /tmp/iso_mnt
mount -t cd9660 <device_name> /tmp/iso_mnt
Make sure anything using the ISO contents is closed, and that you're not cd'd into the directory in your terminal.
umount <device_name>
hdiutil detach <device_name>
If you're really a neat freak, you can unload the kernel module, but it's not strictly necessary.
sudo kmutil unload -p /System/Library/Extensions/cd9660.kext
(maybe?)