[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to link CD drive to /dev/cdrom?



>>>>> "Greg" == Greg Howland <gregoryhowland@yahoo.com> writes:

Greg> Is there a way to assign the scsi emulation to the bus scsi0?

Short answer: change the order in which the drivers are initialized.

The easiest way to do this, is to change the order in which modules
are loaded. If you edit /etc/modules and put the ide-scsi module
before the SCSI driver, the internal CD-ROM becomes scd0.

If both drivers are compiled into the kernel, things get more
complicated. I would suggest you recompile your kernel, and specify
your SCSI card as a driver. Then add it to /etc/modules

Greg> Or, is there some other way to automatically create the correct
Greg> link so that I don't have to manually change it each time I
Greg> connect the external CD drive?

Put a script like this in /etc/init.d/cdroms:
#! /bin/sh
if grep -q "Vendor: <foo>" /proc/scsi/scsi; then
   # Found external CDROM
   ln -sf /dev/scd1 /dev/cdrom
else
   # Not found
   ln -sf /dev/scd1 /dev/cdrom
fi

Create a link to it in /etc/rcS.d:
update-rc.d cdrom start 99 S .

-- 
G. ``Iggy'' Geens - ICQ: #64109250
Home: <ggeens@iggyland.com> - Work: <guy.geens@cgey.be>
WWW: http://users.pandora.be/guy.geens/
`I want quality, not quantity. But I want lots of it!'



Reply to: