Recently, I needed to create an ISO file of a DVD disc (for replaying, storage, burning, etc) in Linux. Under Windows XP, I would have just fired up DVD Decrypter and created the ISO like that. However, DVD Decrypter does not run under Linux (natively; I believe it runs under Wine, though). After searching the web, I found a reference to the "dd" command. Specifically, in the following manner: dd if=/dev/cdrom of=~/myimage.iso

This approach is adequate, but a bit tedious as I would have to enter this as a command each time, customized for each DVD. After a while, I created the following bash script:

{code lang=sh}{literal}

!/bin/bash

Usage: mkiso

Author: Evan Charlton

Change this if different device on your computer

DEVICE=/dev/cdrom

Use a variety of tools (isoinfo, awk, sed) to parse the DVDs Volume ID

DVD_ID=isoinfo -d -i ${DEVICE} | awk /^"Volume id:"/ | sed 's/Volume id: //'

Unmount the drive

sudo umount ${DEVICE}

echo "Writing image to ~/Desktop/${DVD_ID}.iso"

Copy the drive contents

dd if=${DEVICE} of=~/Desktop/${DVD_ID}.iso

Eject the drive

eject ${DEVICE}

exit 0{/literal} {/code}

To install, copy the above script into a text file named simply /usr/bin/mkiso and run chmod +x mkiso. Additionally, you can create a new shortcut (Under Gnome: right-click the desktop and "Create Launcher..") so that you can just double-click to automatigically create an ISO when a DVD is in the drive.

If you have a more elegant way of creating said ISO, feel free to let me know in the comments.