Burning CDs under Linux by Victor Rehorst This document is meant to give a quick overview of how to install a CD-R drive under Linux, how CD-R drives work under Linux, and how CD-R related apps work under Linux. This document will cover only CD-R drives connected via SCSI, and only Linux distributions with kernel version > 2.0. ------------------------------------------------------------------------- OK, so you've got your neat-o BurnMaster 2000 CD-R drive out. You've got your SuperUltraJumboFastWideLong SCSI card all ready. You've got a boring old ribbon cable. What do you do? Well, that's where this document comes in. It's going to help you install your drive and card, get it set up under Linux, and guide you through using CD writing software under Linux. Anyways, let's get down to it. First thing you should do is make sure your SCSI card is supported by Linux. Actually, you should do some research on this before you purchase your card. For the record, Linux has pretty good SCSI support, and there are even manufacturers who help out with the Linux drivers for their products. BASIC SCSI STUFF If this is your first foray into the world of SCSI, I highly suggest you read Warren Block's SCSI Examples document, available at: http://www.rapidnet.com/~wblock/SCSI/SCSIExamples.html Although originally written for Amiga, it has clear, concise explanations of the SCSI jargon, as well as diagrams of some simple SCSI implementations. I'm not going to go into the technical aspects of SCSI cabling, so if you don't know what to do, read Warren Block's SCSI Examples. So your card and drive are installed. Great. Power up your machine. You'll see it go through the various self-tests and BIOS installs, and if your SCSI card has a BIOS, you'll see it load after all the usual stuff. If you don't, don't worry about it right now: some cards don't have a BIOS. At the end I'll go through some things you should look at if you do have a SCSI BIOS. LINUX SET-UP Now you're in Linux. The first thing you need to do is add support for your SCSI card to the Linux kernel. If you've never compiled your kernel before, DON'T PANIC!! Compiling the kernel is really easy. In fact, we're not even going to recompile the kernel, we're just going to compile some kernel modules that will load with the kernel itself. So, go to your kernel source directory (usually /usr/src/linux) and type 'make menuconfig' if you're running from a text console or 'make xconfig' if you're using X Windows. Select the section 'SCSI Support'. Inside, you'll want to select 'SCSI support', 'SCSI CD-ROM support', and 'SCSI generic support' at the very least. If you've installed any other SCSI devices, such as disks or tape drives, add them into the pot as well. Make sure you select everything to compile as a MODULE. Now that that's done, go back to the main menu and select 'SCSI low-level drivers'. Here's the fun part: selecting the driver for your specific SCSI card. If you've got the box or model number in front of you, that may be helpful, but the most helpful piece of information here is the actual chipset of your SCSI card. Then find the appropriate entry and select it as a module. There may be other options for your driver; read the help section for each one and determine from it whether or not you should turn it on/off/change its value. Great! We've changed the kernel configuration. Go back to the main menu, and save your changes before your exit. Now at the prompt, type 'make modules; make modules_install'. This will compile all of the kernel modules (including the ones we just added) and change the module configuration files so that they are inserted at boot time. Once the command finishes, you can restart your system. To make sure your SCSI modules have loaded, at any prompt issue the command 'cat /proc/scsi/scsi'. You should get a list of the devices attached to your SCSI bus. If you didn't, then there may be something wrong with your module configuration. You could go back into your kernel configuration and compile the SCSI drivers directly into your kernel (select them as Y instead of M), but instead of doing a 'make modules; make modules_install' you would have to use a different make command; check the /usr/src/linux/README file to see which one is right for you. Assuming that everything's peachy with your SCSI drivers, you're ready to start burning. For writing CD-R's under Linux, there is one definitive program: cdrecord. Since cdrecord is one of those not-very-intuitive command line-based programs, there has been a multitude of frontends built for it. The most popular one of these is xcdroast, available at: http://www.fh-muenchen.de/home/ze/rz/services/projects/xcdroast/e_overview.html Sporting a nice, easy to use GUI interface, xcdroast also comes with all of the utilities you need, like cdrecord, mkisofs (creates an ISO9660 filesystem, the filesystem used on CD-ROMs), and cdda2wav (a program for reading audio CDs digitally). Other than these utilities, there is one other program worth mentioning when dealing with CD-Rs under Linux. That program is known as cdparanoia, and in my opinion it is the finest audio-reading (aka "Ripping") program ever made. Why? Well, although cdparanoia is usually much slower than cdda2wav, it has one very important feature: error correction. Basicially, cdparanoia reads each sector of audio over and over again, comparing each pass until it is sure that your drive has read the correct data. It will even correct common read errors made by drives and recover data lost by scratches on CDs. But don't take my word for it, visit: http://www.mit.edu/afs/sipb/user/xiphmont/cdparanoia/ GOODBYE Well, that's all the time I have for now. I'm sure I'll update this information later, as well as add a little note for my upcoming CD-R app for Linux, AudioBurn. Victor Rehorst Last Modified Wed Dec 2 22:35:02 EST 1998