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 :( |
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? |
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.
|
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" 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. |
Ok, thanks for pointing the right direction. I'll check that and see if I can get it to work properly.
|
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. |
All times are GMT -5. The time now is 08:49 PM. |