cdrecord – CD Recording Function Command under Linux System

cdrecord is a command-line tool used to record data or audio CDs and DVDs on Linux systems. It is a part of the cdrtools package and is commonly used for creating backups, duplicating disks, and burning ISO images to optical media.

Overview

The basic syntax for using cdrecord is:

cdrecord [options] [device] [file]

Where options are the various flags and parameters available for the command, device is the target CD/DVD writer device, and file is the input file to be burned onto the disc.

Here are some examples of how to use cdrecord:

  • To burn an ISO image to a CD or DVD:
cdrecord -v dev=/dev/cdrom image.iso
  • To create an audio CD from a list of WAV files:
cdrecord -v dev=/dev/cdrom -audio *.wav
  • To copy a CD to another CD:
cdrecord -v dev=/dev/cdrom1 -dao -read-raw dev=/dev/cdrom2

In the above examples, -v is used to enable verbose output, -dev specifies the target CD/DVD writer device, and -audio and -dao are options specific to creating audio CDs and duplicating CDs, respectively.

Options

Here are the available options for cdrecord:

Option Description
-v Enable verbose output
-dev=DEVICE Specify the target CD/DVD writer device
-speed=SPEED Set the writing speed
-dummy Perform a test run without actually writing to the disc
-eject Eject the disc after writing
-audio Create an audio CD
-data Create a data CD
-dao Use Disk-At-Once mode for writing
-tao Use Track-At-Once mode for writing
-multi Enable multi-session writing
-msinfo Display information about the multi-session layout
-isosize Display the size of an ISO image
-checkdrive Check if the CD/DVD writer device is ready
-inq Display information about the CD/DVD writer device
-toc Display the table of contents of a CD or DVD

Troubleshooting tips

  • If you encounter permission errors when trying to use cdrecord, make sure that your user account has the necessary permissions to access the CD/DVD writer device. You can do this by adding your user to the cdrom group using the usermod command.
  • If you encounter buffer underrun errors during the writing process, try reducing the writing speed using the -speed option.
  • If you encounter errors related to the input file, make sure that the file is accessible and that you have the necessary permissions to read it.

Notes

  • cdrecord can be a powerful tool, but it also has the potential to cause data loss if used improperly. Always double-check your command before executing it, and make sure that you are using the correct target device and input file.
  • cdrecord is just one of several tools available for burning CDs and DVDs on Linux systems. Other popular options include wodim, growisofs, and Brasero.