Previous Section  < Day Day Up >  Next Section

Recipe 11.3. Enabling SCSI Emulation for IDE/Atapi CD and DVD Writers

11.3.1 Problem

Your CD-writing program (whether it's cdrecord or one of the good graphical programs such as X-CD-Roast or K3b) reports that it cannot find any drives on your system, or it sees your CD-R/RW drive just fine but does not see your CD-ROM drive, so you can't copy discs.

11.3.2 Solution

Make sure the IDE-SCSI emulation system is enabled and your drives are configured to use it. This applies only to the 2.4 Linux kernel, because the 2.6 kernel supports IDE/ATAPI drives directly, using the standard /dev/hd* designations.

First, verify that the ide-scsi pseudo-device driver is available:

$ locate ide-scsi.o

/lib/modules/2.4.21/kernel/drivers/scsi/ide-scsi.o

Next, there are two text files to edit: /etc/modules.conf, and the configuration file for your bootloader. (Debian users, please refer to the "Discussion" section of this recipe, as file locations are different.) First, find the device names for your drives:

$ dmesg | grep '^hd.:'

hda: IBM-DTLA-305020, ATA DISK drive

hdb: TOSHIBA DVD-ROM SD-M1202, ATAPI CD/DVD-ROM drive

hdc: LITE-ON LTR-24102B, ATAPI CD/DVD-ROM drive

The CD drives are hdb and hdc. Add the following to /etc/modules.conf:

alias scsi_hostadapter ide-scsi

options ide-cd ignore="hdb hdc"

alias scd0 sr_mod

pre-install sg     modprobe ide-scsi

pre-install sr_mod modprobe ide-scsi

pre-install ide-scsi modprobe ide-cd

Next, LILO users, add the following to the end of lilo.conf, using the hd* designations for your devices:

append="hdb=ide-scsi"

append="hdc=ide-scsi"

GRUB users, add the following to /etc/grub.conf at the end of the kernel line, using the hd* designations for your devices:

hdb=scsi hdc=scsi

It should look like this, all on one line:

kernel   /boot/vmlinuz-2.4.21 root=/dev/hda1 ro hdb=scsi hdc=scsi

Reboot, then verify that the ide-scsi module loaded:

$ lsmod | grep ide-scsi

ide-scsi           9456   1

scsi_mod          55124   2 [ide-scsi sr_mod]

Now when you run cdrecord -scanbus it should show SCSI device names for all the drives you configured to use IDE-SCSI, and you should be ready to start CD writing.

Note that the device names are changed now, so when you mount the discs the device names won't be /dev/hd* any more, but rather /dev/scd*. You'll probably want to update /etc/fstab with the new /dev names.

11.3.3 Discussion

Debian's module configuration files are in different locations. First, Debian uses /etc/modules and /etc/modutils/idecd_opts. Add:

ide-scsi

to /etc/modules. Then add:

options ide-cd ignore="hdb hdc

to /etc/modutils/idecd_opts.

There is no downside to running all of your CD/DVD drives under the IDE-SCSI subsystem, except for having different device names.

The 2.6 kernel needs no special steps. Simply use the /dev name:

$ cdrecord dev=/dev/hdc <commands>

Remember, you can use a cdrecord group to grant permissions to users for cdrecord.

11.3.4 See Also

  • grub(8), lilo(8)

    Previous Section  < Day Day Up >  Next Section