Can a Mac mount a Debian install CD?

General Tech Learning Aids/Tools 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer 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...

$ hdiutil mount debian-8.5.0-amd64-CD-1.iso 
hdiutil: mount failed - no mountable file systems

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.

profilepic.png
manpreet 2 years ago

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.

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.