Mounting disk-images on macOS
You can mount
img files with
hdiutil on macOS. I’ll write down both versions here.
img-files are consideres as so called raw images while
iso-files are plain ISO images. When I talk about
img-files, I mainly talk about image files that I create with dd. Also note that I may use partitions as a word for slices here.
The mounted image will be available in
$ hdiutil mount backupdisk.iso
raw images can be mounted with a more complex command. First we list the partitions available in that image container—we then mount only the needed partition.
$ hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount image.img /dev/disk5 FDisk_partition_scheme /dev/disk5s1 Windows_FAT_32 /dev/disk5s2 Linux $ mount_msdos /dev/disk5s1 ~/test
We unmount that device when we finished our work with it.
$ hdiutil detach disk5 "disk5" unmounted. "disk5" ejected.
Comments won't work at the moment
I'm sorry but the comments are offline. I'm not sure when I have fixed this issue, but I'll let you know when comments are back online.