udev rules not working

mparrilla at ono.com mparrilla at ono.com
Sat Dec 13 20:52:42 UTC 2008


El Friday 12 December 2008 00:10:04 Derek Broughton escribió:
> 
mparrilla at ono.com wrote:
> > I have a usb pen drive and I want it to be 
mounted in a
> > particular directory when I plug it.
> >
> > I have 
written a udev rule in the
> > file /etc/udev/rules.d/50-MyRule.rules:

> >
> > BUS=="usb", KERNEL=="sd?1",
> > ATTRS{product}=="USB DISK 2.0", 
ATTRS{serial}=="078A184502BD", NAME="%
> > k", SYMLINK+="usb16GB%n"
>
> 
OK, but there's no mount command there...
>
What do you mean? Where can 
I get information about that?

> > and added to /etc/fstab the line:
> 
>
> >
> > /dev/usb16GB1 /mnt/usbdisk    ext3  users,noauto,exec,suid  
0     0
>
> It's "noauto" - how do you expect it to be automatically 
mounted there?
>
It is automatically mounted, but not in the place I 
want.

> > But when I plug the pen drive, it is automounted in 
/media/usb0,
> > ignoring my udev rule.
>
> Itclearly didn't ignore the 
rule, because...
>
> > If I umount the device and do:
> >
> > mount
> > 
/mnt/usbdisk
> >
> > It is correctly mounted.
>
> How could it be 
mounted on /dev/usb16GB1, unless your udev rule worked?
>
Ok, the udev 
rule works, but not in the way I'd like.

> > How can I get what I 
want?
>
> You could probably execute a "mount" command from udev, but 
you probably
> really should be modify hal's .fdi files (and I have no 
idea how to do
> that).  fwiw, I thought gnome let you just rename the 
/media mountpoint
> by renaming the mounted device icon on your desktop 
(KDE 3.5 did, I have
> no idea about 4.1).
>
I'll do some research 
about it.

> --
> derek
>
Thank you

Manuel Parrilla





More information about the ubuntu-users mailing list