# udev / fstab-sync / pmount confusion.

## pazz

hi,

i know there are a lot of threads on this but after going through most of them i still have my problems:

It's about automount with udev, hal, dbus snc co.

It seems that for some time now fstab-sync is not around anymore.

since i did not really have time for that stuff i simply used a "hard" fstab entry for all my usb-storage devices.

now i tried to give udev a try by writing a rule for my usb stick:

```
BUS="scsi", SYSFS{model}="TS64MJFLASHA    ", NAME="%k",SYMLINK="usbdrive"
```

which i put into /etc/udev/rules.d/10-local.rules

. But still after a #udevstart no such link shows up in /dev.

second confusion:

so, pmount is now in favour over fstab-sync. Early howtos on this advised to do something in /etc/hal/devices.d or somewhere down there.

the trouble is, no such directory exists anymore.

I do have pmount installed, and hald and dmesg seem to work correctly since the usb-stick shows up in gnome's "computer" environment.

when i click on that, it states that it's missing an fstab entry to mount the device.

Does pmount get rid of the fstab entries completely? or do i still have to have an entry for each device in there?

Since "computer" displays every fstab entry as an icon per default, i guess i don't need an entry for devices from hal right?

so, please help me out with this:

1) i want different symlinks for different usb-storage devices

2) i want to use g-v-m for that devices without all the fuss about dynamic fstab entries.

thanks a lot! This stuff really annoys me here..

pazz

----------

## Headrush

 *pazz wrote:*   

> hi,
> 
> i know there are a lot of threads on this but after going through most of them i still have my problems:
> 
> It's about automount with udev, hal, dbus snc co.

 

If you read most of them, must have taken forever, there are so many.  :Wink: 

 *pazz wrote:*   

> It seems that for some time now fstab-sync is not around anymore.
> 
> since i did not really have time for that stuff i simply used a "hard" fstab entry for all my usb-storage devices.
> 
> now i tried to give udev a try by writing a rule for my usb stick:
> ...

 

We need to see your sysinfo for the device to help. I would suggest using the idVendor and idProduct codes. They can easily be found by using lsusb when the drive is plugged in.

 *pazz wrote:*   

> second confusion:
> 
> so, pmount is now in favour over fstab-sync. Early howtos on this advised to do something in /etc/hal/devices.d or somewhere down there.
> 
> the trouble is, no such directory exists anymore.

 

You shouldn't have to edit those files anymore if using pmount.

 *pazz wrote:*   

> I do have pmount installed, and hald and dmesg seem to work correctly since the usb-stick shows up in gnome's "computer" environment.
> 
> when i click on that, it states that it's missing an fstab entry to mount the device.

 

I'm not a gnome user, but it would seem the gnome-volume-manager isn't using pmount to mount. What USE flags was gvm compiled with?

 *pazz wrote:*   

> Does pmount get rid of the fstab entries completely? or do i still have to have an entry for each device in there?
> 
> Since "computer" displays every fstab entry as an icon per default, i guess i don't need an entry for devices from hal right?

 

If you use pmount, NO /etc/fstab entries are needed.

 *pazz wrote:*   

> so, please help me out with this:
> 
> 1) i want different symlinks for different usb-storage devices
> 
> 2) i want to use g-v-m for that devices without all the fuss about dynamic fstab entries.
> ...

 

Post the output of lsusb for your devices and what symlinks you would like for each.

If you are saying you don't want to use pmount, I think you can still use fstab-sync. If not, once you make the udev rules you can have a static /etc/fstab if you want that will work.

----------

## pazz

of cource!  :Rolling Eyes:   i knew i missed something ..

```
# lsusb

Bus 005 Device 002: ID 0c76:0005 JMTek, LLC. USBdisk

Bus 005 Device 001: ID 0000:0000

..

```

```
# udevinfo -a -p `udevinfo -q path -n /dev/sda` | grep 'id'

    SYSFS{idProduct}=="0005"

    SYSFS{idVendor}=="0c76"

    SYSFS{idProduct}=="0000"

    SYSFS{idVendor}=="0000"
```

all usb-storage devices map to /dev/sda when i have only one plugged in..

i thougth of symlinks like /dev/ipod, /dev/key and so on.

installed versions:

```
sys-apps/hal (0.5.5.1)

sys-apps/dbus (0.50-r1)

sys-apps/hotplug (20040923-r1)

sys-apps/pmount (0.9.6)
```

meanwhile something strange happened here:

I don't know why, but udev seems to accept my rule now. nothing changed, just a reboot. But i did restart udev last time..

AND: this whole g-v-m thing works like this:

i plug in the device, it shows up in 'computer' and once clicked, it mounts /dev/sda1 to a new mountpoint /media/DISKLABEL 

i have no idea what happened. this surely is magic to me!

ok its nice that it's working, but something more deterministic would have been even better  :Very Happy: 

anyhow, if someone can explain that to me, i would be very happy!

thanks Headrush!

pazz

----------

## Headrush

 *pazz wrote:*   

> i have no idea what happened. this surely is magic to me!
> 
> ok its nice that it's working, but something more deterministic would have been even better 
> 
> anyhow, if someone can explain that to me, i would be very happy!
> ...

 

Can't really say with only that limited amount of information.   :Sad: 

If it is working, my suggestion would be, don't touch it.

Too many people tinker blindly and cause more problems. 

(Just to verify, there are no fstab entries for USB devices, right? If it's working right with pmount there shouldn't be.)

If you have any more specific questions regarding udev or usb devices, just ask.   :Cool: 

----------

## pazz

Yes,

no fstab entries, just pmount.

what else information would you have needed?

config files for pmount? i guess there are none are there?

I think what might have caused the trouble here is that i missed to put my useraccount in the "plugdev" group.

anyway, thanks a lot Headrush!

pazz

----------

