Home

SCSI emulation

This information is irrelevant to users of 2.6 kernels. CD burning works in 2.6 without SCSI emulation.

I have a CD-ROM and a CD-RW drive in my system; ATAPI drives, known to Linux as /dev/hdc and /dev/hdd respectively. The CDROM can also be referred to as /dev/cdrom by means of a symbolic link. To make xcdroast work, these devices must appear as SCSI devices to xcdroast. Of course the drives (at least the CD-ROM) must remain usable with CD-music players like workman or xmcd, and be mountable as data drives (on mount points /cdrom and /cdrw respectively).

OK this is what I did:

1. Compiled kernel (in my case, 2.2.18pre21) with the following options:

For 2.4 kernels, the locations of the options (in make menuconfig) are slightly different: These options are all 'hard-wired' into the kernel (not as modules).

2. Changed /etc/fstab, where it used to say

/dev/cdrom /cdrom   iso9660 defaults,ro,user,noauto    0  0
/dev/hdd   /cdrw    iso9660 defaults,user,noauto       0  0

to

/dev/scd0  /cdrom   iso9660 defaults,ro,user,noauto    0  0
/dev/scd1  /cdrw    iso9660 defaults,user,noauto       0  0

3. In the /dev directory, where cdrom used to be a symlink to hdc, I made it a symlink to scd0. Ditto for cdrw which now points to scd1.

4. In /etc/lilo.conf, I added a line

append="hdc=ide-scsi hdd=ide-scsi" 

And then, of course, re-ran lilo.

The result of this is that the IDE devices /dev/hdc and /dev/hdd seem to have disappeared, to be replaced by the SCSI devices /dev/scd0 and /dev/scd1. In actual use, there is no difference, other than that xcdroast now works. /cdrom can still be mounted, and also used by workman, as before; and so can /cdrw. xmcd must be told about the new state of affairs (that the CDROM is a SCSI one) by means of xmcdconfig. It all works now.

Two tips
  1. xcdroast can burn DVD’s, but not by default. You have to install a program called cdrecord-ProDVD, and install a ‘DVD key’. The xcdroast documentation explains how to do this.
  2. If burning DVD’s is slow – maybe you don’t have DMA (Direct Memory Access) enabled in the kernel. When compiling your kernel, enable the option ATA/IDE/MFM/RLL support ---> IDE, ATA and ATAPI Block devices ---> IDE chipset support/bugfixes ---> Generic PCI bus-master DMA support. This will speed up disk access (and DVD burning) tremendously (in my case, burning a DVD went from one hour 20 minutes to 10 minutes). Enabling DMA also involves use of hdparm, but my distribution did this already by default.

Home