View previous topic :: View next topic |
Author |
Message |
jmusits Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_dr_zoidberg.gif)
Joined: 19 Jan 2004 Posts: 117 Location: New York
|
Posted: Fri Aug 20, 2004 4:40 pm Post subject: devfs & multiple usb-storage devices |
|
|
Hey all, it's been a while since I've posted here, life has kept me much too busy.
Here's my problem: I have three usb devices which utilize the USB-MASS-STORAGE kernel module, 1) a thumbdrive, 2) a scanner, and 3) a digital camera. They all work wonderfully. The only gripe I have is that each one binds to a different device eg: /dev/sda, /dev/sdb. Now thats fine, but the device each one binds to is dependent on the order in which you plug it in. For example, if I plug in the thumbdrive and then the scanner, the thumbdrive is /dev/sda and the scanner is /dev/sdb. But if I plug in the scanner and then the thumbdrive the scanner is /dev/sda and the thumbdrive is /dev/sdb. This causes a problem with the entries in my /etc/fstab file:
Code: |
# USB Thumbdrive
/dev/sda1 /mnt/thumbdrive vfat noauto,user,exec 0 0
# Gateway DC-M40
/dev/sdb1 /mnt/dcm40 vfat noauto,user,ro 0 0
# HP1000 Scanner
/dev/sdc /mnt/hp1000 vfat noauto,ro,user 0 0
|
What I have been resorting to is always plugging in my thumbdrive first, then my camera, and then my scanner. The devices are then bound to the proper entry in /dev until I reboot. This worked fine until I was on vacation and didn't have my thumbdrive with me, only the camera and my laptop. I had to go in and edit /etc/fstab in order to mount the camera. What I am wondering is there any way to get devfs to always register the thumbdrive as /dev/sda, the camera as /dev/sdb and the scanner as /dev/sdc regardless of the order I plug them in?
I am running gentoo-sources 2.4.26-r8 and devfs.
Any suggestions will be greatly appreciated.
Thanks
Jason _________________ If you got the DO RE I got MI.
--Jerry Garcia "Run For The Roses" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
roothorick Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 30 May 2004 Posts: 83
|
Posted: Fri Aug 20, 2004 4:58 pm Post subject: |
|
|
I've heard you should use udev, but I haven't even figured out how to do things like that in udev yet. I personally use a more generic /mnt/usb0, /mnt/usb1 etc but this might not work with your setup. _________________ Note: This user has been arrested under the DMCA for copyright infringement based on a complaint from The Inernational Cliche Company. He is also facing charges for violating US patents describing the encoding of text in digital form. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
oumpah-pah Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/743855687425ffcbfe320d.jpg)
Joined: 18 Jul 2004 Posts: 575 Location: Lausanne, Switzerland
|
Posted: Fri Aug 20, 2004 5:04 pm Post subject: |
|
|
udev is definitly what you're looking for. You can find everything you need to know on these two sites : Decibel's udev setup and writing udev rules. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jmusits Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_dr_zoidberg.gif)
Joined: 19 Jan 2004 Posts: 117 Location: New York
|
Posted: Fri Aug 20, 2004 5:04 pm Post subject: |
|
|
In order to use udev, i need to upgrade to the 2.6 kernel. I was hoping to find a solution using devfs because I am happy with the 2.4 kernel as of now.
Jason _________________ If you got the DO RE I got MI.
--Jerry Garcia "Run For The Roses" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jmusits Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_dr_zoidberg.gif)
Joined: 19 Jan 2004 Posts: 117 Location: New York
|
Posted: Sat Aug 21, 2004 3:32 am Post subject: |
|
|
Well it looks like the solution is to upgrade to the 2.6.8 kernel and start using udev (I made my last post before I saw the second response to my first post). Looks like I've got some reading to do for the switch from 2.4 to 2.6 and also for udev.
Thanks for the links and the prompt replies.
Jason _________________ If you got the DO RE I got MI.
--Jerry Garcia "Run For The Roses" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Lokheed Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/122717862943eb78d5cc814.jpg)
Joined: 12 Jul 2004 Posts: 1295 Location: /usr/src/linux
|
Posted: Sat Aug 21, 2004 5:43 am Post subject: |
|
|
Thanks for the links oumpah-pah. I have been looking at switching to udev from devfs. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nate_S Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Monkey Island/Monkey_Island_-_Monkey.gif)
Joined: 18 Mar 2004 Posts: 414
|
Posted: Sat Aug 21, 2004 6:47 pm Post subject: |
|
|
The switch from 2.4 to 2.6 is really not all that hard (you might not want to go with 2.6.8 jsut yet as it just came out like 2 days ago, 2.6.5 has been rock solid) Just 'make xconfig' and read the help for the different options.
I thought you might be able to use udev on a 2.4 kernel, but I might be wrong about that.
-Nate |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jmusits Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_dr_zoidberg.gif)
Joined: 19 Jan 2004 Posts: 117 Location: New York
|
Posted: Tue Aug 24, 2004 1:44 am Post subject: |
|
|
Well I made the migration to 2.6.8, everything went smooth and painless. I noticed a significant speed increase over 2.4.25. I'm glad that devfs was pissing me off enough to prompt the change. One small problem: my scanner no longer works. I started a new thread about it: https://forums.gentoo.org/viewtopic.php?t=213566&highlight=. Well gotta keep pluggin away to debug this lil bastard of a problem.
Peace
Jason _________________ If you got the DO RE I got MI.
--Jerry Garcia "Run For The Roses" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|