Linux: Cloning audio CDs - the commandline way

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

Linux: Cloning audio CDs - the commandline way

Post by ^rooker »

I found an excellent article about using "cdrdao" for extracting & cloning audio cds (by Martin Rasp), which also shows how to store a reproduceable image of an audio CD.

1) Find your CD burner device ID:

Code: Select all

cdrecord -scanbus
returns something like this:
scsibus5:
5,0,0 500) 'HL-DT-ST' 'DVDRAM GSA-4120B' 'A111' Removable CD-ROM
5,1,0 501) *
5,2,0 502) *
5,3,0 503) *
5,4,0 504) *
5,5,0 505) *
5,6,0 506) *
5,7,0 507) *
So in my case, "5,0,0" is the device id of my DVD burner.


2) Here are some tasks and their commands:

Extract CD and store as "data.bin" image:

Code: Select all

cdrdao read-cd --device 0,0,0 --driver generic-mmc audiocd.toc
This will give a nice .toc file if the CD had CD-TEXT info on it. If it didn't, you can
use freedb (aka cddb) for this:

Code: Select all

cdrdao read-cddb --device 0,0,0 --driver generic-mmc audiocd.toc 
Burn toc/bin image:

Code: Select all

cdrdao write --device 0,1,0 --speed 8 --driver generic-mmc:0x10 audiocd.toc
Note: The string ":0x10" is a driver option which, according to /usr/share/doc/cdrdao/README.gz, enables CD-TEXT writing:
0x00000010: Enable CD-TEXT writing.
This must be done explicitly because there is no way to detect if a recorder supports CD-TEXT writing. Trying to write CD-TEXT data with recorders that do not support this feature usually results in an error message at the beginning of the recording process and in real write mode the medium will be unusable.
on the fly copy:

Code: Select all

cdrdao copy \
	--source-device 0,0,0 --source-driver generic-mmc \
	--device 0,1,0 --driver generic-mmc \
	--on-the-fly \
	--with-cddb

Additional information:
- More infos about drive models and drivers can be found on the cdrdao homepage
- Howto: Duplicate Audio CDs using cdrdao (ubuntuforums)
- /usr/share/doc/cdrdao/README.gz (if you're on e.g. Debian, Ubuntu)
Post Reply