How can I clone a CD or DVD to an ISO or DMG, using just the CLI, so that I can attach it to a VirtualBox VM.
I often clone CDs or DVDs using the following commands:
diskname=`df -kh /Volumes/* | grep -o Volumes.* | cut -d"/" -f2` diskname=`echo $diskname | sed s/\ //g` # remove spaces device=`df -kh /Volumes/* | grep Volumes | cut -d" " -f1` sudo umount $device dd if=$device of=~/Desktop/$diskname.iso bs=2048 hdiutil eject $device
The result is a .ISO on my desktop that is, as far as I can tell, a bit clone of the CD or DVD.
However, when I boot a VirtualBox Windows XP VM and attach the ISO, Windows says it cannot read it.