dd
gives a non-mountable image
On Catalina, when trying to copy an old RedHat 6.2 install CD I found that using
diskutil unmountDisk /dev/disk2
dd if=/dev/disk2 of=~/RHDisk.iso bs=2048
produced an ISO that was not, thereafter, mountable1. When double clicking the resultant ISO file, the DiskImageMounter utility gave the following error message:
No mountable file systems
Solution
Instead, I found that I had to specify the slice number, in addition to the disk number, i.e. disk2s0
:
sudo umount /dev/disk2s0
sudo dd if=/dev/disk2s0 of=~/RHDisk.iso bs=2048
which then produced an ISO file that I could then just double click to mount.
Note the use of sudo dd
, without which I got a permissions error. In the former attempt at using dd
I had not required the need for sudo
.
After following all of the answers above, only this method worked, which I found on Create an exact duplicate of a CD from the command line.
hdiutil
segmentation fault
FWIW, when trying to use
hdiutil hybriddisk -iso -joliet -o ~/disk.iso /Volumes/RedHat_6_2
I found that it produced a segmentation fault
$ hdiutil makehybrid -iso -joliet -o ~/disk.iso /Volumes/RedHat_6_2
Creating hybrid image...
zsh: Segmentation fault hdiutil makehybrid -iso -joliet -o ~/disk.iso /Volumes/RedHat_6_2
$
Footnote
1 Even after trying the answers from I'm unable to mount a DMG, getting a "no mountable filesystems" error
sudo diskutil unmount /dev/disk2
notsudo umount /dev/disk2