Code: Select all
cdrecord dev=HELPHi,
I just wanted to dispel a few myths about enabling SCSI emulation for IDE devices, that is, setting up Linux so that you can use an IDE CD burner.
These myths are:
- You have to statically compile in certain SCSI-related kernel features and/or leave IDE CD-ROM support out completely.
- You have to specify a kernel option in your bootloader (e.g. hdc=scsi)
First, compile your kernel with the relevant options (I compiled them as modules in all cases, except where noted):
IDE Options
Include IDE/ATAPI CD-ROM support
SCSI Emulation support
SCSI Options
SCSI Support
SCSI CD-ROM Support
Enable Vendor-Specific Extensions (this is a simple 'Yes' option, no module)
SCSI Generic Support
OK, now recompile and enable your kernel and modules in the usual fashion. Now here's the trick (you may as well do this before you reboot):
Add a line to your /etc/modules.conf as follows:
Code: Select all
options ide-cd ignore='hdc hdd'Code: Select all
su
modprobe sg
exitYou'll probably want to change your /etc/devfsd.conf file so that non-root users can probe and use the CD-R device without jumping through hoops. Simply search for the following line in your devfsd.conf:
Code: Select all
#REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS root.cdrw 660Code: Select all
kill -s SIGHUP `ps -C devfsd -o pid=`Code: Select all
usermod -g kerframil -G cdrw,users kerframilCode: Select all
su
modprobe ide-scsi
exit
cdrecord -scanbusNot so fast though! I forgot to mention that modules.conf in Gentoo is dynamically generated, so you really don't want to edit the modules.conf file directly to add the exclusion line mentioned above, otherwise it'll get nuked at the next reboot. Instead, do this:
Code: Select all
echo "options ide-cd ignore='hdc hdd'" > /etc/modules.d/cdrBy removing that file from /etc/modules.d, or by commenting the options line out, you should be able to go straight back to the regular IDE driver for your devices. In fact, it should be possible to switch between IDE and SCSI emulation mode live.
When you actually get round to recording any CDs
Code: Select all
su
chmod +s /usr/bin/cdrecordEDIT revision 2: Well, I got round to trying this out on several more machines and I have found that the above technique has worked every time. You should uncomment the line to allocate permissions to non-root users in devfsd.conf, and should make sure ide-scsi module is loaded but that's it. Some of this wasn't made clear (I incorrectly implied that it wasn't necessary to load ide-scsi module to use a CDR device before) so I've edited the above to improve the tutorial. For those reading for the first time, scroll down to read about the background behind this but basically some people are saying that this technique doesn't work for them; they must (apparently) still specify a special boot-time option for the kernel, and disable IDE-CDROM support which is how most guides tell you to do it. I'm not trying to be contradictory but the fact is that I have still yet to find personal evidence to support this, that is, it works for me every time. If you do run into problems, then the above tutorial will still work - however, observe the following differences in approach:
- You won't need to create the cdr file in your /etc/modules.d
- You'll need to add append="hdc=ide-scsi" to your kernel boot options. You can do that in /boot/grub/menu.lst. Change hdc according to the device that your IDE CD-R would normally have been assigned.





