[NTLUG:Discuss] SCSI compatability driver

brian@pongonova.net brian at pongonova.net
Sun May 19 15:54:10 CDT 2002


On Sat, May 18, 2002 at 05:30:35PM -0400, falconjetflyer at netscape.net wrote:
> The CD-Writing Howto say that I need a SCSI compatability driver so linux sees my
> IDE cd writer as a scsi device.  One other things it says the following creates
> device file entries under /dev.  I presume that I am to run it as a script?

I'd check first to see if it's necessary:

ls /dev/loop?
ls /dev/sg?

> test `whoami` = 'root' || echo "You must be root to execute the commands."
> cdrecord -scanbus > /dev/null
> if ! (pidof kerneld || test -f "/proc/sys/kernel/modprobe"); then
>     echo "Neither kerneld nor kmod are running to automatically load modules".
> fi
> report_no_autoload() {
>     echo "Ensure the module $1 is loaded automatically next time."
> }
...

I've discovered (the hard way) that depending on kerneld to autoload SCSI-related
modules may or may not work, perhaps with catastrophic results.  With multiple SCSI
devices, the devices may change depending upon the order the devices are
encountered when booting. (Obviously, if you don't have multiple SCSI devices, this
won't concern you.) An alternative is to simply load the modules manually at boot,
perhaps in /etc/rc.d/boot.local or wherever your distro places boot-time commands.
This is what I use:

# Load CD-R modules.  Necessary so we can "fix" location of the
# scanner on the SCSI bus.
STATUS=ok
echo "Loading CD-R modules:"
insmod sg || STATUS=failed
echo "Loading sg module...$STATUS" && STATUS=ok
insmod sr_mod || STATUS=failed
echo "Loading sr_mod module...$STATUS" && STATUS=ok
insmod ide-scsi || STATUS=failed
echo "Loading ide-scsi module...$STATUS" && STATUS=ok
echo "Finished loading CD-R modules."

Also, don't forget to modify your lilo.conf so that your IDE device you're
emulating as a SCSI device doesn't appear as an IDE device to the system:

image=/boot/vmlinuz-2.2.12-patched
label=linux-new
root=/dev/sda3
append="hdd=ide-scsi"
read-only

Once you get this working, it's pretty slick!

  --Brian




More information about the Discuss mailing list