SlackwareThis Forum is for the discussion of Slackware 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.
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.
I've been trying to create a udev rule for my usbstick so that I can add an entry to fstab. I can mount it manually without any problems once I've found out what device node it's mapped to - but this often changes because I have sata drives, card readers, and other usb devices. So I created /etc/udev/rules.d/local.rules and added this entry:
Many thanks to both of you. marnoid, I tried rewriting the udev rule but unfortunately it still didn't work, so I looked at Bob's suggestion and added this entry to fstab:
Steve50, I realise that you have worked around your initial problem, however if you're still interested, I think the cause of your rule falling over is syntax. Your rule:
The matchkey must use the equality operator (==). A single (=) is the assignment operator, except for when you assign a SYMLINK, which uses "+=".
Also, I think that the serial and product SYSFS keys (and possibly kernel key) are enough to identify your deivce. I can't see the name key doing anything, since it says, "match a device that was named by the kernel with the name that the kernel gave it".
Therefore, the rule should probably look more like:
Code:
BUS = "usb", SYSFS{serial}=="0A315B503230C892", SYSFS{product}=="disgo", KERNEL=="sd?1", SYMLINK+="usbstick"
As well as the /dev/sd?1 node, you would get /dev/usbstick, which is a consistently named symlink to your usb stick, whether it be /dev/sda1, /dev/sdb1, etc.
I've been doing a lot of reading on udev to fix a few problems lately, but am no expert, I assure you. My apologies if I lead you up the garden path, but I find it's a nice garden anyhow, if you have the time. I highly recommend Writing udev rules by Daniel Drake.
[edit: changed my mind about needing BUS = "usb"]
Last edited by BeerIsGood; 10-13-2006 at 05:45 AM.
Hi BeerIsGood. Thanks for this follow up. After creating the working fstab entry I also needed to create a udev rule for my wacom tablet, and I ended up doing a fair bit of research, including reading the reference in your post. And you're right, the syntax in my first rule was completely wrong (I believe it changed relatively recently)and after playing around with it I ended up with a working rule that looked very similar to yours. I was also able to create a symlink for my wacom that made configuring xorg.conf entries much easier. The key seems to be the use of the "==" for SYSFS and KERNEL entries and "+=" for the SYMLINK, although I'm sure there's a lot more to it. I'll keep reading.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.