# hal is not auto mounting usb devices

## ifeelcool.com

When i plugin my usb devices memory key/hi-md player hal finds the device but is not mounting it with fstab-sync! See log below:

```

Sep 24 19:31:35 CC556312-A usb 2-1: new full speed USB device using uhci_hcd and address 4

Sep 24 19:31:37 CC556312-A scsi2 : SCSI emulation for USB Mass Storage devices

Sep 24 19:31:37 CC556312-A usb-storage: device found at 4

Sep 24 19:31:37 CC556312-A usb-storage: waiting for device to settle before scanning

Sep 24 19:31:42 CC556312-A Vendor: SONY      Model: Hi-MD WALKMAN     Rev: 1000

Sep 24 19:31:42 CC556312-A Type:   Direct-Access                      ANSI SCSI revision: 00

Sep 24 19:31:44 CC556312-A Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0

Sep 24 19:31:44 CC556312-A usb-storage: device scan complete

```

fstab

removed commented lines

```

/dev/hde1               /mnt/ntfs       ntfs            defaults,umask=0133,dmask=000   0 0

/dev/hde2               /boot           ext2            defaults,noatime        1 2

/dev/hde4               /               ext3            noatime         0 1

/dev/hde3               none            swap            sw              0 0

/dev/cdroms/cdrom0      /mnt/cdrom      auto            auto,user       0 0

none                    /proc           proc            defaults        0 0

none                    /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

/dev/hda                /media/cdrecorder       auto    user,exec,auto,managed 0 0

```

----------

## Sachankara

Ehm, HAL doesn't mount anything at all, it's not its job. Use ivman if you want to auto mount devices...

http://gentoo-wiki.com/HOWTO_ivman

----------

## paul555

ifeelcool.com did you use gnome-volume-manager and recently upgrade udev?When i upgraded udev from 058 to 068 i could mounted cdrom devices but not my usb stick and camera.So i downgraded udev to 058 with adding 

```
>sys-fs/udev-058
```

 to 

```
/etc/portage/package.mask
```

 and it worked again

----------

## mwilliamson

You need to install DBUS and IVMAN (HAL talks to IVMAN over DBUS). Make sure you add them to your start up (rc-update add ...). If you want ivman to mount things that are not in your fstab, such as usb drives, you should also install pmount.

----------

## ifeelcool.com

mwilliamson, i thought gnome-volume-manager would do this by it self via hal and dbus! But do i need to add dbus to rc-update or is it started automatically through hal? And ivman is a replacement for gnome-volume-manager?

So basically i need dbus,hal and ivman to get gnome-volume-manager to work????

----------

## paul555

ifeelcool.com you must add dbus to your runlevel.Also can you post the versions of udev dbus hal and gnome-volume-manager you have?Ivman is not needed for gnome-volume-manager to work (look here http://gentoo-wiki.com/HOWTO_gnome-volume-manager )

----------

## ifeelcool.com

paul555, so basically just add dbus to my runlevel

```
rc-update add dbus default
```

 And do i need to reboot or do something, starting dbus ? And when i plugin my usb device it should be detected and automounted by gnome-volume-manager?

Do dbus,hal and volume-manager have an log? Or do they put all there informatioin into /var/log/messages ?

I will have a look at the versions of hal, dbus and gnome-volume-manager.

----------

## paul555

To start dbus you only do 

```
/etc/init.d/dbus restart
```

 (i think you must also restart hald).Then fire up 

```
gnome-volume-properties
```

 as user and select the preferences you want.There aren't any special  log file for them and you can check logs by 

```
tail -f /var/log/messages
```

 and there you must see something like that when you plug-in your usb stick  *Quote:*   

> fstab-sync: added mount point /media/usb_bar for /dev/sdb1

 .Of course you must have to run 

```
gnome-volume-manager
```

 as user (To make it permanently launch 

```
gnome-session-properties
```

 and then at Startup Programs tab click add and type 

```
gnome-volume-manager & 
```

 ok and close)

----------

## ifeelcool.com

Thanks paul555, i will have a try tonight. Doesn't gnome-volume-manager startup by default?

I hope it helps, i would really like to get this working!

----------

## ifeelcool.com

Hi paul555,

Back again, tried your steps, without any result! So here some debug information, possible you can help!

I have added dbus to the default run level without any problem! An restarted no problem.

Starting gnome-volume-properties from the terminal showed the following messages:

```

(gnome-volume-properties:6799): GnomeUI-WARNING **: While connecting to session manager:

Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

```

The tail of the log file showed the same as when i started the post, detecting but no fstab-sync

```

Oct  5 14:18:59 CC556312-A usb 2-1: new full speed USB device using uhci_hcd and address 5

Oct  5 14:19:00 CC556312-A scsi0 : SCSI emulation for USB Mass Storage devices

Oct  5 14:19:00 CC556312-A usb-storage: device found at 5

Oct  5 14:19:00 CC556312-A usb-storage: waiting for device to settle before scanning

Oct  5 14:19:05 CC556312-A Vendor: SONY      Model: Hi-MD WALKMAN     Rev: 1000

Oct  5 14:19:05 CC556312-A Type:   Direct-Access                      ANSI SCSI revision: 00

Oct  5 14:19:07 CC556312-A Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Oct  5 14:19:07 CC556312-A usb-storage: device scan complete

```

I have tried to start gnome-volume-manager from the terminal and it gave the following error:

```

(gnome-volume-manager:6810): GnomeUI-WARNING **: While connecting to session manager:

Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

** (gnome-volume-manager:6810): WARNING **: manager.c/1124: already running?

```

I also managed to successfully add gnome-volume-manager &amp; command to gnome-session-properties startup programs tab! But is this needed or does gnome desktop starts this automatically?

However i cant find wich version of udev/dbus/hal i am using, where can i find this? Hopefully you or someone else can help me with this, it would be great to have it working!!

PS. tried all steps from terminal as root.

----------

## paul555

To find what version of hal dbus udev gnome-volume-manager simply do 

```
emerge -av hal dbus udev gnome-volume-manager
```

 .To see if gnome-volume-manager is running when you startup your pc do 

```
ps -ef |grep gnome-volume
```

 .I guess that this is a problem with udev as i had

----------

## ifeelcool.com

paul555, the output of emerge -av hal dbus udev gnome-volume-manager

```

Calculating dependencies ...done!

[ebuild   R   ] sys-apps/hal-0.4.7-r2  -debug -doc -livecd -pcmcia 1,317 kB

[ebuild   R   ] sys-apps/dbus-0.23-r3  +X -debug +gtk +python -qt +xml2 1,250 kB

[ebuild   R   ] sys-fs/udev-068-r1  (-selinux) -static 436 kB

[ebuild   R   ] gnome-base/gnome-volume-manager-1.2.2  -debug 252 kB

```

So i think it possible is udev, and i should downgrade! I will try this next week. If you see a possible other problem let me know!!

----------

## paul555

To downgrade udev simply do :

```
nano -w /etc/portage/package.mask
```

 and write in that file that :

```
>sys-fs/udev-058
```

Then 

```
emerge -av udev
```

 (There it should emerge udev 058)

and last execute 

```
udevstart
```

 .After all those i think your problem must be solved

----------

## ifeelcool.com

Paul555, when i upgrade my gnome desktop to 2.12 will this also solve my problem? It has been recently added to portage unstable and i would like to give it a try!

I also will try your solution first  :Very Happy: 

----------

## paul555

Well no for gnome 2.12 see the guide here don't use what i said above  *Quote:*   

> To downgrade udev simply do :
> 
> Code:
> 
> nano -w /etc/portage/package.mask
> ...

  upgrade udev to 068-r1 and it should work.I upgraded to gnome 2.12 following the guide and all 

is ok exept some minor things.Now the only thing is bothering me is that when i plugin my usb stick it mounted ok but it doesn't popup a nautilus window with its contets.But it work ok.My advice follow the guide and for any question just ask

----------

## ifeelcool.com

hi Paul555, i just tried your first solution by downgrading udev to 058. The emerge went well but when i plug i any usb device it keeps giving the following message in messages log:

```

Oct 11 22:03:36 CC556312-A usb 2-1: new full speed USB device using uhci_hcd and address 9

Oct 11 22:03:36 CC556312-A usb 2-1: new full speed USB device using uhci_hcd and address 10

Oct 11 22:03:36 CC556312-A usb 2-1: new full speed USB device using uhci_hcd and address 11

etc.

```

This weekend i will try to upgrade gnome according to the guide, hopefully it will solve my problems.

----------

## CarloJekko

hi to everyone...

I have installed f-spot 0.1.3; to do this i have just updated dbus with use mono;

```
[ebuild   R   ] sys-apps/dbus-0.36.2  +X -debug -doc +gtk +mono +python +qt +xml2 0 kB
```

than i have updated hal because it doesn't work with new dbus

```
[ebuild   R   ] sys-apps/hal-0.5.4  -debug -doc -pam_console -pcmcia 0 kB
```

and so gnome-volume-manager to make it works with new dbus and hal 

```
[ebuild   R   ] gnome-base/gnome-volume-manager-1.5.3  +crypt -debug -doc 0 kB
```

Now the problem is that it doesn't mount anything... but it is running in fact

```
JekkoMachine ~ $ gnome-volume-manager

** (gnome-volume-manager:13447): WARNING **: manager.c/2258: already running
```

my groups are 

```
disk wheel audio cdrom video games cdrw apache usb users portage captive speech sharing mysqladmin scanner plugdev messagebus
```

EDIT:

i have made this

```
carlo@JekkoMachine ~ $[b] killall gnome-volume-manager[/b]

carlo@JekkoMachine ~ $ [b]gnome-volume-manager[/b]

manager.c/573: setting[0]: bool: autobrowse = 1

manager.c/573: setting[1]: bool: autoburn = 0

manager.c/568: setting[2]: string: autoburn_audio_cd_command = nautilus --no-desktop burn:

manager.c/568: setting[3]: string: autoburn_data_cd_command = nautilus --no-desktop burn:

manager.c/573: setting[4]: bool: autoipod = 0

manager.c/568: setting[5]: string: autoipod_command =

manager.c/573: setting[6]: bool: automount_drives = 1

manager.c/573: setting[7]: bool: automount_media = 1

manager.c/573: setting[8]: bool: autophoto = 1

manager.c/568: setting[9]: string: autophoto_command = sudo /usr/bin/import-photo; gthumb --import-photos

manager.c/573: setting[10]: bool: autopalmsync = 0

manager.c/568: setting[11]: string: autopalmsync_command = gpilotd-control-applet

manager.c/573: setting[12]: bool: autoplay_cda = 1

manager.c/568: setting[13]: string: autoplay_cda_command = gnome-cd --unique --play --device %d

manager.c/573: setting[14]: bool: autoplay_dvd = 1

manager.c/568: setting[15]: string: autoplay_dvd_command = totem dvd://

manager.c/573: setting[16]: bool: autoplay_vcd = 1

manager.c/568: setting[17]: string: autoplay_vcd_command = totem %d

manager.c/573: setting[18]: bool: autopocketpc = 0

manager.c/568: setting[19]: string: autopocketpc_command = multisync

manager.c/573: setting[20]: bool: autoprinter = 1

manager.c/568: setting[21]: string: autoprinter_command = gnome-printer-add hal://%h

manager.c/573: setting[22]: bool: autorun = 1

manager.c/568: setting[23]: string: autorun_path = .autorun:autorun:autorun.sh

manager.c/568: setting[24]: string: eject_command = /bin/eject %d

manager.c/2117: mount_all: mounting /dev/sda1

manager.c/1253: mounting /org/freedesktop/Hal/devices/volume_uuid_6A31_3DD5...

manager.c/707: executing command: /usr/bin/pmount-hal /org/freedesktop/Hal/devices/volume_uuid_6A31_3DD5

manager.c/2117: mount_all: mounting /dev/hda1

manager.c/1253: mounting /org/freedesktop/Hal/devices/volume_uuid_6f7d8d32_9a2e_11d9_8d3e_9942dba56eeb...

manager.c/707: executing command: /usr/bin/pmount-hal /org/freedesktop/Hal/devices/volume_uuid_6f7d8d32_9a2e_11d9_8d3e_9942dba56eeb

Warning: device /dev/hda1 is already handled by /etc/fstab, supplied label is ignored

mount: in base a mtab, /dev/hda1 è già montato su /

mount non riuscito

manager.c/1846: Mounted: /org/freedesktop/Hal/devices/volume_uuid_6A31_3DD5

manager.c/1793: Device removed: /org/freedesktop/Hal/devices/usb_device_553_202_noserial_if0

manager.c/1793: Device removed: /org/freedesktop/Hal/devices/usb_device_553_202_noserial

manager.c/1758: Device added: /org/freedesktop/Hal/devices/usb_device_553_202_noserial

manager.c/1758: Device added: /org/freedesktop/Hal/devices/usb_device_553_202_noserial_if0
```

it seams to be running but it doesn't make a link on my desktop, and drivemount_applet doesn't work correctly now

----------

## Karl_R

Hi, I found this topic https://forums.gentoo.org/viewtopic-t-419907-highlight-cdrom+gnome+automatically.html

basically the auto popping up on desktop stuff, relies on an automagic editing of fstab, which is a security issue

so to allow your user to do that add your user to the plugdev group (make sure hal and dbus USE flags are set) do a revdep-rebuild and possible a emerge --newuse world

and then log out of your desktop and back in again.

for detailed instructions see

gnome-2.12 upgrade instructions

Cheers

Karl

----------

