# [Solved] udev/hal/hotplug confusion

## rncwnd

Hi,

when I plug my usbstick in, I get the following message in my syslog:

```

Mar  8 21:24:07 YODA Vendor:           Model:                   Rev:

Mar  8 21:24:07 YODA Type:   Direct-Access                      ANSI SCSI revision: 02

Mar  8 21:24:07 YODA SCSI device sda: 256000 512-byte hdwr sectors (131 MB)

Mar  8 21:24:07 YODA sda: Write Protect is off

Mar  8 21:24:07 YODA sda: Mode Sense: 0b 00 00 08

Mar  8 21:24:07 YODA sda: assuming drive cache: write through

Mar  8 21:24:07 YODA SCSI device sda: 256000 512-byte hdwr sectors (131 MB)

Mar  8 21:24:07 YODA sda: Write Protect is off

Mar  8 21:24:07 YODA sda: Mode Sense: 0b 00 00 08

Mar  8 21:24:07 YODA sda: assuming drive cache: write through

Mar  8 21:24:07 YODA sda: sda1

Mar  8 21:24:07 YODA Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0

Mar  8 21:24:07 YODA Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0,  type 0

Mar  8 21:24:07 YODA usb-storage: device scan complete

Mar  8 21:24:07 YODA scsi.agent[9918]: disk at /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host1/target1:0:0/1:0:0:0

Mar  8 21:24:07 YODA fstab-sync[9965]: added mount point /media/USB-STICK for /dev/sda1

```

Is it possible to define my own mount points for specific devices? And if so, WHERE???Last edited by rncwnd on Tue Mar 15, 2005 11:46 am; edited 1 time in total

----------

## curtis119

As root:

```
nano -w /etc/fstab
```

Find the entry and change it to whatever you want.

----------

## rncwnd

Sorry. That doesn't work. The USB-Stick-specific fstab-entries are generated automagically

when I plug the stick in and are deleted automagically when I plug that thing out ....

----------

## chunderbunny

If you make your own entry for the USB stick in fstab then hal/dbus/ivman or whatever you use should respect it.

----------

## rncwnd

Problem is: sometimes my USB-Stick appears as /dev/sda1, somtimes as /dev/sdb1 ...

----------

## chunderbunny

In which case you are going to have to mess with the udev rules (in /etc/udev/rules.d/50-udev.rules) IIRC so that your USB stick always maps to the same device.

----------

## rncwnd

 *chunderbunny wrote:*   

> In which case you are going to have to mess with the udev rules (in /etc/udev/rules.d/50-udev.rules) IIRC so that your USB stick always maps to the same device.

 

Well, I tried that. But I couldn't define a rule, which matched the stick (I tried SYSFS{VendorId}, because SYSFS{product} is empty).

Oh, and thank you all, for your replies.  :Embarassed: 

----------

## rncwnd

Ok, I finally got it. fstab-sync ceates a mount point with the name of the hotplugged blockdevice.

Because my usb-stick was called "USB-STICK", fstab-sync created the directory /media/USB-STICK.

 :Embarassed:   :Embarassed:   :Embarassed: 

----------

## mkrisch

 *rncwnd wrote:*   

> Ok, I finally got it. fstab-sync ceates a mount point with the name of the hotplugged blockdevice.
> 
> Because my usb-stick was called "USB-STICK", fstab-sync created the directory /media/USB-STICK.
> 
>   

 

i just noticed that i don't have the fstab-sync file.  i've got /etc/hal/device.d/50-fstab-sync.hal which points to /usr/sbin/fstab-sync--but the actual fstab-sync file doesn't exist.

i've got ivman and pmount and gamin installed, not sure if one of those removed it.

the other things i've noticed is that my devices no longer show up in nautilus in the main "computer" page, like my CD drive, or when i put in a USB key.

that feature seemed to have gotten lost while playing with the "newer" tools like gamin and ivman as well.  is it possible to get the old vanilla-gnome style capabilities with the newer tools?

----------

## spiryt

I have similar problem with hde hal-5.2 and dbus-0.33-r1 both from Gentopia.  Even after modifying ebuild for hal to --enable-fstab-sync and with the fstab-sync build and linked to /etc/hal/device.d/50-fstab-sync.hal, I cannot get the fstab to be modified. I don't know why. All other callouts from /etc/hal/device.d removed and still no success. I couldn't get a single callout to work anyway, neither fstab-sync nor pmount one. I will try to revert to an earlier version of hal and dbus to check if it's sorting the issue out. Strange enought, pmount on its own works and I could get ivman to work either to a certain extent.

----------

