Ripping, Mounting, and Burning CDs at Command Prompt

From SUSE Wiki

Jump to: navigation, search

Type: Howto

Tested Versions: 10.x

Written By: E@zyVG

Further Modifications By: Kamatsu

1. Rip Data-CDs

To rip an entire normal data-cd (ISO filesystem) from a CD-ROM:

$ dd if=/dev/cdrom of=my_cd_image.iso


2. Burn Data-CDs

ISO CD images can be burned to CDs by using the program "cdrecord". You can use it like this with a SCSI burner:

$ cdrecord -v speed=XX dev=0,Y,0 -data cd_image.iso

XX sets the speed, dev=0,Y,0 is the burners (SCSI) ID. Run cdrecord -scanbus to view your drive(s) and their ID(s)

For IDE CD burners (most likely what you got) you must use -dev ATAPI:/ and add the link to your device:

$ cdrecord -dev ATAPI:/dev/hdc -data cd_image.iso

It is also possible to use a numbered ID when using IDE/ATAPI: cdrecord dev=ATAPI:0,0,0 Run cdrecord dev=ATAPI -scanbus to find the valid IDs.

(cdrecord is a part of cdrtools)


3. Mounting ISO Images

.iso images can 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:

$ mount -t iso9660 -o loop [isofile] [mountpoint] 

Example:

$ mount -t iso9660 -o loop /path/cd_image.iso /mountpoint/cdrom

You can specify the loop device you want, that it is not needed. (loop=/dev/loop0).

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


4. Mounting / Converting cue/bin images

You will need "cdemu" to mount cue/bin images in Linux.

You can also use "bchunk" to convert bin/cue CD-images to iso+wav/cdr.


'5. Audio CDs'

You will need "cdparanoia" installed to rip audio tracks from a CD. The sound can be saved as WAV, AIFF, AIFF-C or raw format.

$ cdparanoia [options] span [outfile] 

To list a CDs table of contents:

$ cdparanoia -Q

To copy a track to the current directory:

$ cdparanoia n myfile.wav``** where n is track number.

For example:

$ cdparanoia 5 lovesong.wav

To rip several (a to, and including c) tracks to one big file:

$ cdparanoia --batch a-c bigfile.wav
Personal tools