1. Home
  2. Computing & Technology
  3. Focus on Linux

Linux Newbie Administrator Guide

From Authors, for About.com

7.7.6 Making a copy of the entire CD

Most CDs can be copied by first copying all data (for data CDs) or all tracks (for audio CDs) onto the hard drive as described before, but some CDs cannot.

For example, these kinds of data (not audio) CDs need to be treated differently: bootable CDs (like Linux installation CD), CDs that require the label, disk with errors, etc. For data CDs, I use these commands to make an exact copy:

dd if=/dev/cdrom of=cd_image

cdrecord -v speed=2 dev=1,0,0 -data cd_image

The dd command copies the input file (if), which in this case is the device /dev/cdrom to the output file (of) which in this example is a file called cd_image (on the hard drive in the current working directory). The second command copies the file cd_image that was created by the dd command onto an empty CD.

For data disk with error, you might want to try:

dd conv=noerror,notrunc if=/dev/cdrom of=cd_image

cdrecord -v speed=2 dev=1,0,0 -data cd_image

The option "conv=noerror,notrunc" specifies that the potential read errors are to be ignored, and files not truncated on error.

For audio CDs, I use these command to make a copy:

[rip the content of all audio tracks on the CD, from track 1 on. The tracks are saved into files in the current directory and named: track01.cdda.wav, track02.cdda.wav, etc.)]

cdparanoia -B "1-"

[write all the audio files to the CD, one by one. The tracks are separated by a 2 s gap]

cdrecord -v speed=2 dev=1,0,0 -audio track*

To copy an audio CDS in the most accurate way, man cdrecord recommends doing this:

cdda2wav -v255 -D2,0 -B -Owav

cdrecord -v dev=2,0 -dao -useinfo *.wav

To make an exact copy of mixed mode CDs:

[The dd command will output an error message when the the data has ended and audio started. This is expected and OK]

dd if=/dev/cdrom of=cd_image

[rip the content of all audio tracks on the CD, except the first track since it is data]

cdparanoia -B "2-"

[Write the data and subsequent audio files, piece by piece]

cdrecord -v speed=2 dev=1,0,0 -data cd_image -audio track*

* License

* Linux Newbie Administrator Guide Index

Explore Focus on Linux

More from About.com

  1. Home
  2. Computing & Technology
  3. Focus on Linux
  4. Linux Documentation
  5. Newbie Administrator Guide
  6. Linux Newbie Administrator Guide - 7.7 Writing CD-R/Ws: cdrecord and cdparanoia

©2008 About.com, a part of The New York Times Company.

All rights reserved.