Subject: how to pin down sd ad umass?
To: None <tech-kern@netbsd.org>
From: Christoph Badura <bad@bsd.de>
List: tech-kern
Date: 04/05/2007 17:40:08
So, I want to pin down a USB flash drive to a particular device instance
in some of my machines.  What I care about it that a USB flash stick in
a certain socket shows up under a predetermined name.  The machines I care
about right now have space for 4 internal SCSI disks.  I'd like these disks
to be probed as sd0-sd3. I don't care to have to pin these down to particular
SCSI controllers because I want the kernels to be flexible in that regard.
I'd also want to avoid the admin nightmare of having to maintain kernels
for every possible hardware combination in the machine and actually
being able to boot the relevant kernel, should the need arise.

Putting the following into the kernel config file pins down the USB key.

usb0 at ohci0
uhub0 at usb0
umass0 at uhub0 port 2 configuration 1 interface 0
scsibus2 at umass0
sd4 at scsibus2 target 0 lun 0

However, it also causes the SCSI disks to be probed as sd5 and sd6
(on scsibus3).  That is unexpected, undocumented and entirely not what I want.
It is especially annoying, because a GENERIC or INSTALL kernel will probe
the disks under different names not in sync with the /etc/fstab on the root
disk.

Any ideas?
--chb