On Fri, 16 Dec 2005, Stephen Beaver wrote:

> Please indulge me and tell me what I am doing wrong here:
> 
> Kernel v 2.4.21 (I can't upgrade it, I have 6500 devices in the field and
> that would be prohibitive)
> 
> In rc.sysinit, I do
> 
> mknod /dev/sda1 b 8 1
> 
> When I plug in a usb memory stick, I can mount it by doing
> 
> Mount -t vfat /dev/sda1 /mnt/memstick
> 
> I can unmount it and remove it, plug it back in again, remount . .
> Everything works fine.
> 
> If I plug in a different brand/size of memory stick, however, I can't mount
> it.
> 
> Looking at dmesg, it says it has given the new device the name sdb - That
> seems OK, I'll create another node called dev/sdb1 with
> 
> mknod /dev/sdb1 /b 8 1
> 
> Doesn't work though. - Even though I dmesg says sdb. The command
> 
> Mount -t vfat /dev/sdb1 /mnt/memstick fails.
> 
> What am I doing wrong?

You need "mknod /dev/sdb1 b 8 17".  Although those entries should already 
exist in /dev.

> How can hot plug tell the name of the most recently iserted memory stick
> (there is only one USB connector so there can't be two installed at the same
> time) ?

Under 2.4, the usb-storage driver pretends that devices never get 
unplugged.  So the system thinks the first device is still present even 
after you have removed it.

> Is it possible to tell the driver to always use the same device name (set
> max devices to 1 or something) ?

If you do "rmmod usb-storage" and "modprobe usb-storage" after removing 
the first device and before inserting the second, the name will get reset.

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
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to