HOWTO: Creating ISO file/CD Image in Ubuntu

Monday, January 28, 2008 | Labels: | |

I spent quite some time researching on this matter, so I'm going to show my findings. Please be informed that I am no Linux/Ubuntu/CD Imaging expert; I am just recording what I have learned.

Basically there are many ways to get this done. One way will not work, but the other will. In truth, there are 4 ways you can do this in Ubuntu. So, just do whichever that works for you, okay? :)

First method: Use the GUI
This is by far the easiest. Every time you insert a CD into the drive in Ubuntu, Ubuntu will auto mount the drive and a CD Icon will show up on your desktop. Right-click it, and choose Copy CD. Save it as a file. Done.

But there are times when the CD Icon just... won't show up on your desktop. Read on.

Second method: cat
This one uses the command line (just like the rest of the methods I am going to mention soon).

sudo umount [your_cd_drive]
cat
[your_cd_drive] > iso_name.iso


If you don't know your CD drive, look it up here:

df -h


BUT, sometimes you will end up with "Input/Output Error". If so, move on.

Third method: dd
This one is a little tricky; so bear with me.

First, you need to know the ISO Info of your CD. Do this:

isoinfo -d -i [your_cd_drive]


Look for these 2 lines (might be different than yours):

Logical block size is: 2048
Volume size is: 313202


Okay note them down. Then, unmount the CD Drive:

sudo umount [your_cd_drive]


Now, do this to rip the CD:

dd if=/dev/[your_cd_drive] of=whatevernameuwant.iso bs=2048 count=313202 conv=notrunc,noerror,sync


Sometimes you will be okay, sometimes you will still be plagued by "Input/Output Error" (the CD will still be ripped though but you will have issues later when you mount it). Whatever the result may be, there's still hope by using the 4th and final method.

Fourth method: cdrdao

Make sure you already have this package by typing cdrdao. If the system says that you don't have it, install it.

sudo apt-get install cdrdao


Unmount.

sudo umount [your_cd_drive]


Now, this is the command that you need:

cdrdao read-cd --read-raw --datafile whateveruwant.iso --device [your_cd_drive] --driver generic-mmc-raw whateveruwant.toc


This is an example:
cdrdao read-cd --read-raw --datafile cc01.iso --device /dev/scd0 --driver generic-mmc-raw cc01.toc


This method worked for me flawlessly. I hope it works for you too.

Well, that's it then. If there's something that you don't understand, don't be shy to ask.

References:
1. Ubuntu Forums
2. LinuxQuestions.org

0 comments: