Submitter: Mike Andrew

Setting up a cd burner on Linux fills mailgroups with queries. Here is what you need to know.


Device drivers for Linux come in 2 forms:

Monolithic drivers are compiled into the kernel. The IDE disk driver, ide-cd.o, is an example. On IBM PC's it is normally in the kernel, ready for use. Modular drivers are loaded as needed by modprobe. It is the order in which these drivers are registered by the kernel that causes heartache. Bear this in mind, and read on.

Confusion 101: Terminology

Confusion 102

There is NO SUCH THING as an IDE cd burner in Linux, and NEVER will be

Now that you've gotten over that hurdle, here's the reason why.

All cd burning software for Linux relies on the console-only application, cdrecord. It is the *industry standard* app for cd-anything. There will be no other, because it is the killer app of its class. All GUI applications (Xcdroast, Gcombust, etc) ultimately communicate with cdrecord.

Cdrecord communicates exclusively with SCSI devices.

To get around this minor detail, a wedge driver called ide-scsi exists. As its name suggests, it is an IDE->SCSI emaulator. Once invoked, the cd burner(s) on your IDE channel(s) become SCSI devices. It is as simple as that. You then use your cd-burning software to talk to the device on the SCSI bus.

Now for the hard part

ide-scsi is a wedge module. In a fair and reasonable world it is invoked like any other module: HOWEVER, the 'problem' with this wedge module is that is scans ALL unregistered devices on all IDE channels and takes them over. ALL OF THEM.

Thus everything on the IDE channels that are unregistered by the kernel become emulated SCSI devices.

An unregistered device is anything the kernel doesn't currently know about. It becomes registered by modprobe (or at boot if you compiled the driver into the kernel as a monolithic driver).

Every single device ever invented for the IDE channel is supported by one of the following modules:

In the case of IBM PCs, the ide-hd (hard disk) driver is compiled monolithic. Thus, it is registered at boot. Normally,Zip drives, tapes, LS120 drives, and cds have to be registered as part of the boot process by using modprobe.

The end result is that either you have loaded a device driver FIRST, or ide-scsi will take them over. Assuming you have all these devices, the order of load could be:

Note the OR. You either want your cds (plural) to remain as IDE devices, OR you want your cds (plural) to become SCSI. If you choose to remain IDE (using the ide-cd module) you CANNOT burn cds. Period.


The above order of module loading will ensure that your Zip and tape drive will remain as IDE controlled devices, if that is what you want. The reality is that both of these drivers are SCSI emulators and they in fact use truncated code from from ide-scsi to achieve an identical result. Thus, you can eliminate their need as ide-scsi will cover them with the exact same /dev entries. I have included the above modprobe list to orient you to what's happening, not to what you need to do.

The end result of all this is that by eliminating any reference to any of the ide-xxx type drivers in your /etc/modules.conf (or whatever the file is on your distro) and simply using ide-scsi, your problems are over for modular drivers.

LILO append statement

Because of the vagaries of control over when ide-cd gets loaded (if at all), and worse if it gets loaded first (thus preventing ide-scsi from doing its job), the append statement in your boot config is the catch all. (the Grub stament is similar. Refer to the Grub info on this site.)

The above specifically states that BOTH cd drives (/dev/hdb and /dev/hdd) are to be emulated as SCSI. This would be a normal situation for a typical hardware setup of copying cds from one drive to the other. Note especialy that is you don't emulate your cdrom, it cannot be used in cd-burning software (specifically cd->cd copying). You would instead have to rely on the 'wasteful' ISO image method.

To be pedantic, the append statement offers fine grain control over which specific device you wish to emulate, rather than every unregistered device.

Confusion 104: Device names

Historically (and by convention), /dev names are associated with their device driver modules. Thus, the unfortunately named sr_mod.o is the SCSI cd device driver, and the corresponding entries in /dev are /dev/sr0, /dev/sr1, etc...

These entries do no exist in modern distributions.

The preferred naming convention is /dev/scd0, /dev/scd1, etc...

The consufion comes when recommended 'procedures' mention one or the other and the reader doesn't realize they are one and the same. The cure is to simply ln -s /dev/scdX /dev/srX for the needed devices. This simply makes both names reference the same device.

For those who want to see the topology, it looks like:
isofs.o isofs.o
cdrom.o cdrom.o
ide-cd.o sr_mod.o
/dev/hdc scsi-mod.o
searchSearch Index