Wednesday, August 14, 2013

Creating an ISO Image from CD/DVD in Ubuntu using terminal

First of all, know where your CD Drive is mounted. You can run the following command to do the same:

shehbaz@Augustus:~$ mount | grep sr
/dev/sr0 on /media/UDF Volume type udf (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,

The CD / DVD is mounted in /dev filesystem in linux. running the mount command itself could help you to figure out the location where CD / DVD is mounted.

Next, you could do the following

cat /dev/sr0 > dumb.iso

which, as the name suggests, is a dumb way of creating the iso file.

why you ask? because, there is no error checking while reading from the Disk (/dev/iso) and writing to our iso image file. Here, I introduce before you the command


Which stands for read - optical - media : your disk.

This command is available in the package wodim and can be installed using

sudo apt-get install wodim

readom not only creates a new, error-free iso image, but also retries reading from the cd drive in case the drive is busy / error occoured in copying a specific block/sector.

readom dev=/dev/sr0  f=smart.iso

Note : If you get the following error:

shehbaz@Augustus:~$ readom dev=/dev/sr0 f=smart.iso
Error trying to open /dev/sr0 exclusively (Device or resource busy)... retrying in 1 second.
just eject the CD Drive, and reinsert it, and close any auto msg boxes that pop up.

readom will ensure that the final CD/DVD iso image that is created is authentic, which would help you save lot of time playing around with erroneous iso image files.

No comments:

Post a Comment