On Mon, 2 Jan 2006, DeShawn wrote: > I'm running a linksys NSLU with a custom embedded > linux firmware. The box has 2 usb ports on it labeled > 1 and 2. With the orignal firmware and the unslung > custom firmware, whatever was plugged into port 1 got > mounted on sda. And whatever was plugged into port 2 > got mounted as sdb. This was always the case. It did > not matter if you did a cold start, or a reboot. > > However the openslug firmware I would like the use > seems to switch the sda and sdb designations between > both ports. If I do a cold start, port 1 gets sda and > port 2 gets sdb. But if I reboot the system, port 1 > gets sdb and port 2 gets sda. This creates a problem > for me seeing as to how my rootfs sits on the disk > plugged into port 1. > > The syslog seems to indicate that the system > recognises port 1 as "usb 1-1" and port 2 as "usb 1-2" > when scanning for usb devices at startup, yet it > doesn't bind 1-1 to sda or 1-2 to sdb. > > Can I change a setting somewhere to mimic the behavior > of the stock firmware?
No. SCSI drive letters are assigned in the order the devices are discovered by the kernel, which you can't change directly. But with a Linux 2.6 kernel you can get almost the same effect. The udev package can be configured to create symbolic links however you like. For instance, you could set things up so that /dev/drive1 always is a link for the device attached to port1 and /dev/drive2 always is a link for the device attached to port2, regardless of which one happens to be sda or sdb. Even if you don't use udev, you can write custom shell scripts to set up the device links the way you want. The trick is to make use of the information available in sysfs. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
