How to – Rip a CD to an ISO file in Linux

Ripping copying and burning normal CD’s or ISOsRipping means copying the contents of a CD to another filesystem. This can be done easy with standard Linux command-line tools or using a frontend like k3b or xcdroast.

Rip data-cds

To rip an entire normal data-cd (ISO filesystem) from a CD-ROM:
[code lang=”bash”]dd if=/dev/cdrom of=my_cd_image.iso[/code]

dd manual page

The syntax for me to rip a CD to an ISO file would be:
[code lang=”bash”]
billy@billy-desktop:~$ dd if=/dev/cdrom of=WXPVOL_EN.iso
1198620+0 records in
1198620+0 records out
613693440 bytes (614 MB) copied, 166.1 seconds, 3.7 MB/s

Mounting ISO Images
.iso images be mounted as if they were burned to a CD. This is a quick and good way to test your .iso images or extract files from them without actually burning it – the mounted image folder will act like a CD with the syntax:
[code lang=”bash”]mount -t iso9660 -oloop [isofile] [mountpoint][/code]
[code lang=”bash”]mount -t iso9660 -o ro,loop /path/cd_image.iso /mountpoint/cdrom[/code]
You can specify the loop device you want, that it is not needed. (loop=/dev/loop0).

I’m using Ubuntu Feisty myself, so if I wanted to mount the ISO I created previously I would use the command
[code lang=”bash”]
billy@billy-desktop:~$ sudo mount -t iso9660 -o ro,loop WXPVOL_en.iso /media/cdrom

This only works if you have CONFIG_BLK_DEV_LOOP=m or y in your kernel configuration.

mount manual page

How to find out the device that your DVD/CD rom is attached to, type the following at the command prompt.

[code lang=”bash”]
billy@billy-desktop:~$ cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

drive name: sr0
drive speed: 48
drive # of slots: 1
Can close tray: 1
Can open tray: 1
Can lock tray: 1
Can change speed: 1
Can select disk: 0
Can read multisession: 1
Can read MCN: 1
Reports media changed: 1
Can play audio: 1
Can write CD-R: 1
Can write CD-RW: 1
Can read DVD: 1
Can write DVD-R: 1
Can write DVD-RAM: 1
Can read MRW: 1
Can write MRW: 1
Can write RAM: 1

Leave a Reply