-   Gentoo (
-   -   udev rules to mount external hard drive at mount point (

akamikeym 03-30-2010 09:13 AM

udev rules to mount external hard drive at mount point

I've been trying to find out all day how to set a mount point for my external hard drive. From what I've been told udev rules are the way to do it, but I've had 0 success with applying my udev rules.

I've tried every combination I can come up with to match my drive (sticking with trying to just make a symlink for testing purposes with no success.

Anyway here's a link to the output of '/sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb1)'

and here's one of my attempts (in /etc/udev/rules.d/98-local.rules):

SYSFS{model}=="Basics Desktop ", SYMLINK+="usbdevices/music"

I've been reloading the rules with $sudo /sbin/udevadm control --reload-rules

Which I've been running because I get

$ sudo /etc/init.d/udev restart
* Service udev starting
The udev init-script is written for baselayout-2!
Please do not use it with baselayout-1!.
* ERROR: udev failed to start

This is the only thing I've found that gives me any output to indicate what the problem might be.

thanks for your help for this perplexed Gentoo-er

smoker 03-31-2010 06:10 AM

Have you read any documentation on udev at all ?

Because I've never seen SYSFS{model} mentioned anywhere.

A more correct approach would be something like

SUBSYSTEMS=="scsi", ATTRS{model}=="Basics Desktop  ", SYMLINK+="usbdevices/music"
which would provide a symlink at /dev/usbdevices/music IF /dev/usbdevices aleady exists.



SUBSYSTEMS=="usb", ATTRS{product}=="Basics Desktop  ", SYMLINK+="usbdevices/music"

akamikeym 03-31-2010 10:56 AM

Thanks for the reply
Thanks for the reply, though a little less sarcasm would be appreciated. Yes I have read everything I could get my hands on including Daniel Drake's page and one which suggested that only rules containing SYSFS would work. As I indicated that was just one example of many I've tried.

I have tried both the rules you gave with no success, but I'm suspecting now that perhaps the area I've been falling down on is the reloading of my udev rules. Will investigate further.

smoker 03-31-2010 01:12 PM


All times are GMT -5. The time now is 10:05 AM.