Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-11-2006, 02:10 AM
|
#1
|
Senior Member
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006
Rep:
|
Mounting USB devices on fixed locations?
Hi,
I own a USB-memorystick and a USB-HD. My problem is that it shifts the device name everytime I connect them so the first device I connect is /dev/sdb and second will be /dev/sdc. Is there someway to force, for example, my USB-stick to be registered as /dev/sdc?
Not a big problem but enough to irritate
|
|
|
07-11-2006, 03:53 AM
|
#2
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep:
|
Yeah it's called UDEV. Before that, when people used devfs a lot, things were just like that: you plugged an usb stick in, it was sda, but next time you never knew what it was called. Then came udev, which amongst other things aims at fixing this; you should get the devices under the same name every time. Udev started to be available at kernels 2.4 I think (correct me if I'm wrong) and I think 2.6 series started having it as the default choice, so devfs became obsolete.
So..are you using udev and not devfs, and if so, have you changed your configuartion somehow? Which kernel version are you running?
|
|
|
07-11-2006, 04:59 AM
|
#3
|
Senior Member
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006
Original Poster
Rep:
|
Ah, yes. I'm running gentoo-patched kernel version 2.6.16-r12. I do believe that I have the udev I haven't configured udev or anything.
|
|
|
07-11-2006, 01:05 PM
|
#4
|
Member
Registered: Mar 2006
Location: Germany
Distribution: OpenSuSE 10.3 x86-64 SMP - Kernel 2.6.23.14
Posts: 42
Rep:
|
Here is an idea for an udev-rule under /etc/udev/rules.d
Code:
KERNEL=="sd[a-z]", SYSFS{idVendor}=="10ab", SYSFS{idProduct}=="10c5", NAME="usbstick", MODE="666", GROUP="uucp"
You should fill in the correct values for idVendor and idProduct.
If it wont work play around with KERNEL=="sd[a-z]".
Maybe it has to be KERNEL=="sd*" or KERNEL=="sd*[0-9]".
Then it mounts your Stick as /dev/usbstick.
Last edited by tuxangler; 07-12-2006 at 03:36 AM.
|
|
|
07-12-2006, 02:16 AM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006
Original Poster
Rep:
|
Ok, thanks for pointing the right direction. I'll check that and see if I can get it to work properly.
|
|
|
07-12-2006, 02:31 AM
|
#6
|
Member
Registered: Mar 2006
Location: Germany
Distribution: OpenSuSE 10.3 x86-64 SMP - Kernel 2.6.23.14
Posts: 42
Rep:
|
Simply place your rule as /etc/udev/rules.d/12-usbstick.rules
Then:
udevcontrol reload_rules
HowTo get your Vendor and Product-ID:
http://www.reactivated.net/writing_u....html#udevinfo
or "lsusb" or "usbview" could help.
There are Numbercodes like Vendor:Product.
Last edited by tuxangler; 07-12-2006 at 03:43 AM.
|
|
|
All times are GMT -5. The time now is 12:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|