Learn to Burn CDs With Linux

Burning your own audio and data CDs used to be an expensive proposition, but now that the cost of CD recorders and media has plummeted to an all-time low, this technology is available to just about every PC user.

Desktop CD Roast Master

Desktop CD Roast Audio
Master of the Universe: Two views of audio track mastering in Thomas Niederreiter’s X-CD-Roast.

Burning your own audio and data CDs used to be an expensive proposition, but now that the cost of CD recorders and media has plummeted to an all-time low, this technology is available to just about every PC user.

Until recently, CD recording under Linux was an arduous affair. CD-recording devices were not well-supported, and burning a CD generally required a cryptic command-line interface for anything more complicated than making a simple copy. If you wanted to do things the easy way — with a nice drag-and-drop mastering interface — Microsoft Windows was the only game in town. But that’s all changed in the last year. Now there are some useful and slick CD-recorder programs for both the GNOME and KDE windowing environments.

Recorder Basics

If you don’t own a CD recorder already, the first thing you want to do is buy the fastest and best-quality recorder that you can afford. CD-R and CD-RW drives come in either SCSI (internal or external) or IDE models and are capable of 2x, 4x, 6x, 8x, and now 12x recording speeds. Just to give you an idea of the reason for the vast price differences among models of various speeds, an 8x recorder can write a full 640 MB disc in approximately nine minutes, a 4x in approximately 20 minutes, and a 2x in about 40. Aside from write speed, one of the most important factors in selecting a good recorder is the size of its read-ahead buffer cache. Anything between 2 MB and 4 MB should greatly improve performance and reduce the possibility of the dreaded “buffer underrun.” This happens when the recorder uses up all the data cached by the hard disk in your buffer and creates what is
commonly referred to as a “coastered” or unusable CD (“coastering” refers to the art of turning a CD into a beer coaster via a technical snafu).

If you’re going to use a CD recorder as your primary CD-reading device as well, you should choose a recorder with fast digital audio extraction (DAE) capabilities — DAE enables you to strip audio or “red book” tracks from music CDs. Many of the lower-priced units cannot extract audio tracks faster than 4x or 8x speed, so you will want to scour the manufacturer’s Web site for this information. (Not only is this an important consideration for CD recording, but it’s also important if you intend to produce your own MP3 music files, something I’ll cover in next month’s column).

I have a personal bias toward Yamaha and Plextor CD recorders, only because I have had phenomenal success with them over the years and they are professionally rated devices. Yamaha’s latest and greatest CRW8424SZ SCSI burner, which we used in our tests for this article, has a 4 MB buffer, writes at 8x, rewrites at 4x, reads at 24x speed, and extracts digital audio at 16X speeds. It can be had for around $230 street (the external SCSI version is somewhat more) from various e-tailers. My trusty Plextor 820T, which I use on my Windows NT box and is also a great drive for Linux, has similar high-end specs (although it’s strictly a burner and has no rewrite capabilities) and can be had for about $260. Both of these manufacturers make quality drives, but don’t take my word on it — check out Andy McFadden’s CD recordable FAQ, which has loads of information on various brands and models of recorders.

I prefer SCSI-based CD recorders because of their superior sustained-data-transfer rates. SCSI adapters do not monopolize the PC’s bus and CPU time as much as IDE devices, which makes them less likely to create buffer underruns. A good PCI Ultra SCSI adapter will run you between $50 and $175 depending on features and supported SCSI transfer speeds (Adaptec, Advansys, Tekram, and DPT are good brands), so be prepared for the extra expense if you want to be a SCSI bigot like me. I should note that IDE recorders have gotten much, much better in the last couple of years, and coastering using IDE drives has become less of an issue as long as you don’t try to do direct CD-to-CD copies and don’t have any CPU-intensive processes running on your computer (like fancy screen savers) while you are recording.

If you do decide to use an IDE recorder, make sure that IDE SCSI-emulation support is either compiled into your kernel or installed as a loadable module. The CD-recording support layer, which we are coming to next, requires this support in order to access your drive.

You’ll also want to make sure that you have enough space on your hard disk or /home directory mountpoint to store ISO9660 and audio CD images of the CDs you are mastering. This I cannot stress enough — a full ISO image is 650 MB in size, so if you are working with multiple images, make sure you have several free gigabytes of local disk space. Don’t attempt to write to and mount ISO CD images over your LAN — you’ll just be asking for trouble.

As for CD-reader-to-CD-burner copying on the fly — while it sounds appealing, just don’t do it. Period. For the extra five or 10 minutes you save for creating the ISO image to copy, you risk coastering your copy CD if you have a read error on the source CD or if the transfer rate on the CD reader can’t keep up with the read-ahead buffer on your CD writer.

The cdrecord Layer

As to a CD recorder’s Linux compatibility, you won’t find this on the box or in the product literature; like many devices and peripherals under Linux, the open-source community supports them independently. The first place you’ll want to stop on the Internet is the home page of Jörg Schilling, author of the cdrecord toolset, the most crucial CD-recording software-support layer for Linux and Unix operating systems. Jörg’s site has a list of recorders that have software support, but almost any recorder that has been produced in the last year probably works on Linux if it complies with the SCSI or ATAPI mmc CD-recorder-interface specification.

The version of cdrecord at the time of this writing is 1.8. Jörg adds support for new recorders and new bug fixes on a weekly basis, so to be completely up to date, you can download, compile, and install a new version of cdrecord every month or so. Jörg’s cdrecord tools are actually a whole set of command-line programs for recording and mastering data and audio discs. They include cdrecord (the recording layer itself), mkisofs (a program to create ISO 9660 CD filesystem images) and cdda2wav (which converts CD digital audio tracks to .wav files).

If you are running a recent distribution of Linux like Red Hat 6.1, SuSE 6.3, or Mandrake 7, cdrecord should already be installed on your system. However, you may want to install and compile the latest version, to ensure that the latest fixes and CD support are implemented on your system.

First, you’ll want to ftp the latest source code to cdrecord. For version 1.8, the filename is cdrecord-1.8.tar.gz. Put this in your home directory, and run tar xvfz cdrecord-1.8. tar.gz from a shell prompt in your home directory to unarchive the source files. Looking in your home directory, you should now see a cdrecord-1.8 directory that was just expanded from the archive; enter su root to get root privileges, and then run sh Gmake.linux to make the dependencies and compile the source tree for the Linux OS.

After the dependencies are linked and binaries are compiled, run make install, which copies the cdrecord programs to the /usr/bin directory. To verify this, you can type whereis cdrecord from the terminal prompt and then cdrecord -version to find out if the latest version is running.

Next, run cdrecord -scanbus to determine if cdrecord sees your drive on the SCSI chain. You should get an output similar to that in Table One, listing all the SCSI (and SCSI-emulated) devices attached to your system.

While the cdrecord and mkisofs tools are all you need to record CDs, several GUI shells for them are available that really make CD recording a pleasant experience. The open source software repository, Freshmeat.net, has a number of them. The three that I have had the most success with are X-CD-Roast, Gcombust, and KisoCD.

Table One: cdrecord Will Show All Your SCSI Devices

Cdrecord 1.8 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jörg Schilling
Using libscg version ‘schily-0.1′

0,0,0 0) *
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) ‘iomega ‘ ‘jaz 1GB ‘ ‘G.55′ Removable Disk
0,5,0 5) *
0,6,0 6) ‘YAMAHA ‘ ‘CRW8424S ‘ ’1.0d’ Removable CD-ROM
0,7,0 7) *


Desktop CD Roast Copy
Roast It: Copying a CD-ROM in X-CD-Roast.

X-CD-Roast, written by German open source hacker Thomas Niederreiter, is the best-implemented (and most up-to-date) GUI shell for the cdrecord tools, and it supports virtually all of its native features. Two versions of X-CD-Roast are under development — version 0.96ex2, which is written in Tcl/Tk and has had incremental bug fixes added to it over the last three years, and version 0.98 alpha, which is being written to take advantage of the GTK+ widget set and the GNOME environment. In my opinion, you’re going to need both, since 0.98alpha4 is capable only of duplicating discs.

Download both files into your home directory, and extract each with tar xvfz from a shell prompt. To compile version 0.96ex2, switch to the xcdroast- 0.96 directory that was just unarchived and run ./configure, make, and make install from the shell prompt.

Once you’ve compiled and installed version 0.96ex2, you can run it simply by typing xcdroast at the prompt.

Compiling version 0.98 is just a slight bit more complicated. Once you have extracted the tarball in your home directory, you need to copy the files cdrecord, cdda2wav, mkisofs and readcd from /usr/bin to the /lib/bin directory of the xcdroast 0.98 source tree.

Next, from the root directory of the source tree, run ./configure, make, and make install. You should then be able to run the program by entering ./xcdrgtk from the shell. You can also copy the file xcdrgtk from the root of the source directory to /usr/ bin, so you can simply type xcdrgtk from anywhere in your shell to launch the program.


Desktop Gcom Main Desktop Gcom Recording
Burn or Bust: Gcombust’s main interface (left) and interface for recording a CD (right).

Gcombust is another nice shell for cdrecord and mkisofs, written in GTK+, that’s comparable to X-CD-Roast. It’s available from Freshmeat, and you can also download the source code from http://www.abo.fi/~jmunsin/ gcombust/. One of the nice things about Gcombust is that it supports the burning of hybrid Unix and Macintosh HFS CDs using the mkhybrid command-line tool (which you can get from their Web page). Gcombust also supports drag-and-drop directory selections from Midnight Commander.


Desktop KisoCD
KDE Option: KisoCD supports drag and drop of its directories.

If you like KDE, KisoCD is another nice program that supports drag and drop of directories from KDE’s built-in file manager, KFM. KisoCD supports burning of ISO 9660 discs only, so you’ll need another program like X-CD-Roast or Gcombust for audio CD building. KisoCD is the easiest program to deal with CD-RW (rerecordable) discs because it has a “fast blanking” feature right from the main interface.

Commercial Options

At the time of this writing, two commercial CD-mastering programs were in late beta testing for Linux, the most significant one for the end-user community being Gear Software’s Gear for Linux, a port from the highly successful Unix version for Solaris. At an estimated cost of $700 per copy, it probably won’t sway most end users from cdrecord, but it looks to be an ideal professional CD-recording solution for software companies and audio professionals, with its laundry list of data-integrity and cross-platform features, as well as support for high-end multi-platter CD burners and transporters.

For super-high-end CD mastering on Linux, look no further than Young Minds Inc., one of the first companies to pioneer CD-recording and -mastering technology on the Unix platform. YMI’s MPS4 Mass Production Studio is a hardware and software turnkey system designed for the most demanding CD-recording needs — it combines powerful premastering software, intelligent SCSI controllers, up to four 8x writers, a thermal label printer, and robotic technology, and it is capable of creating up to 120 unique CDs without user intervention. YMI is also offering its DVD Studio product on Linux for mastering DVD data discs.

Finding it on the Web

Free Software

cdrecord: ftp://ftp.fokus.gmd.de/pub/unix/cdrecord

Freshmeat’s CD-burning-software repository: http://www.freshmeat.net/appindex/x11/cd%20writing%20software.html

GUI Tools

X-CD-Roast: http://www.xcdroast.org

X-CD-Roast (Tcl/Tk version): http://www.fh-muenchen.de/home/ze/rz/services/projects/xcdroast/src/xcdroast-0.96ex2.tar.gz

X-CD-Roast (GTK version): http://www.fh-muenchen.de/home/ze/rz/services/projects/xcdroast/src/xcdroast-0.98alpha4.tar.gz

Gcombust: http://www.abo.fi/~jmunsin/gcombust/

KisoCD: http://www.uni-karlsruhe.de/~um12/

Commercial Products

MPS4 Mass Production Studio: http://www.ymi.com/products/mps_over.html

Gear for Unix: http://www.gearcdr.com/html/products/gear/unix/product_sheet.html

Reading and Research

cdrecord author Jörg Schilling’s home page: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

The CD Recording HOWTO: http://linux.com/howto/CD-Writing-HOWTO.html

Andy McFadden’s CD recordable FAQ: http://www.fadden.com/cdrfaq/

Roundup of CD burning tools: http://sites.inka.de/~W1752/cdrecord/frontend.en.html

Jason Perlow is a freelance writer, systems integrator, and Linux enthusiast from the NY metropolitan area. He can be reached at perlow@hotmail.com.

Fatal error: Call to undefined function aa_author_bios() in /opt/apache/dms/b2b/linux-mag.com/site/www/htdocs/wp-content/themes/linuxmag/single.php on line 62