Figured it out. It's a two step process.
Step 1. Attaching as a block device
# the '-nomount' option avoids the 'mount failed' error $ hdiutil attach -nomount debian-8.5.0-amd64-CD-1.iso /dev/disk2 Apple_partition_scheme /dev/disk2s1 Apple_partition_map /dev/disk2s2 Apple_HFS # verify disk is a block device (indicated by 'b' at line start) $ ls -l /dev/disk2 br--r----- 1 amorphid staff 1, 5 Jul 27 19:41 /dev/disk2
Step 2. Mount the disk with cd9660 (aka ISO9660) file system
# create mount point $ mkdir -p /tmp/debian-installer # mount the disk $ mount -t cd9660 /dev/disk2 /tmp/debian-installer # see da filez! $ ls -l /tmp/debian-installer total 2296 -r--r--r-- 1 root wheel 9468 Jun 4 09:24 README.html -r--r--r-- 1 root wheel 185525 Jun 1 00:52 README.mirrors.html -r--r--r-- 1 root wheel 100349 Jun 1 00:52 README.mirrors.txt -r--r--r-- 1 root wheel 461 Jun 4 08:37 README.source -r--r--r-- 1 root wheel 6000 Jun 4 09:24 README.txt -r--r--r-- 1 root wheel 146 Jun 4 08:37 autorun.inf dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 boot dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 css lr-xr-xr-x 1 root wheel 1 Jun 4 08:37 debian -> . dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 dists dr-xr-xr-x 1 root wheel 4096 Jun 4 08:37 doc dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 efi dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 firmware -r--r--r-- 1 root wheel 180335 Jun 2 03:18 g2ldr -r--r--r-- 1 root wheel 8192 Jun 2 03:18 g2ldr.mbr dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 install dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 install.amd dr-xr-xr-x 1 root wheel 4096 Jun 4 08:37 isolinux -r--r--r-- 1 root wheel 275432 Jun 4 09:24 md5sum.txt dr-xr-xr-x 1 root wheel 4096 Jun 4 08:37 pics dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 pool -r--r--r-- 1 root wheel 368480 Jun 2 03:18 setup.exe dr-xr-xr-x 1 root wheel 2048 Jun 4 08:37 tools -r--r--r-- 1 root wheel 233 Jun 4 08:37 win32-loader.ini
Step 3. Unmount the disk
# this will fail if the disk is being used
$ umount /dev/disk2
Step 4. Detach the disk
$ hdiutil detach /dev/disk2
"disk2" unmounted.
"disk2" ejected.
manpreet
Best Answer
2 years ago
Working on OS X Yosemite (v10.11.5), I'm unable to mounst a Debian installer ISO (debian-8.5.0-amd64-CD-1.iso on Debian download page). I get this error...
As a work around, I can mount the CD in a Linux VM by following the "Create copy of image" steps in the Debian installer docs.
Is it possible to read the file contents on directly from a Mac, without the aid of a Linux VM? Ultimately what I'm trying to do is write a script that can download the latest stable ISO, edit the ISO w/ pre-seeing data, and then perform an automated install of Debian on a VM. This is mostly for learning purposes, but might useful down the road.