This howto deals with the burning of a data CD using the Linux or unix command line.
Below are the list of commands required to burn a data CD.
The above will work on many systems, but not all systems. The above is not optimized for performance, or efficiency.
Below you will find an explanation of the above set of commands and more information to optimize (or even get working) CD data burning.
There are only about 3 steps in creating a CD. You don't have to be root to do this, but if you are not you have to ensure you have full access to the CD recording device.
The CD writer could be labeled as a number of devices on your system. /dev is where all the hardware nodes of your devices reside on your system.
The device node is often symlinked to as well to further aid recognition.
Useful commands to run to determine CD device:
You do need to determine the CD device you are going to use. If you cannot find the device then you may need to recompile the kernel for CD support. I won't deal with that here, but I will supply a couple of links:
eject is a handy little program when you know the device node name, eject /dev/cdrw will open the drawer of the device, whilst ejecy -t /dev/cdrw will close the draw of the device. Eject is generally not essential, and if you are missing it then you can always use the manual button on the CD if available.
mkisofs is a pre mastering program, it does not actually burn the data to the CD, but instead creates an image that can be subsequnetly burned to the CD.
The -r in mkisofs stands for RockRidge, this is an extension to the ISO9660 format, RockRidge helps with filenameing in the unix environment. -J in mkisofs stands for the Joliet filesystem and is again an extension of the ISO9660, this allows for better filenaming in the windows environment. Specifying both makes the CD readable on a number of platforms.
Generally it is best to use a file, perhaps using tar to first create the tar ball.
All that is left, is to burn the data onto the CD.
Omitting the speed parameter will allow cdrecord to record at the highest speed your drive allows. In the case of any problems drop the speed by a couple.
cdrecord has an -eject parameter; include this, if you wish the CD to be ejected upon completion.
A lot has been written about CD writing on a unix platform, below are some of the more definitive examples.