Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: USB drives not automounting, possible solution!

  1. #1
    Join Date
    Jun 2007
    Beans
    6

    USB drives not automounting, possible solution!

    After running in to several walls and skimming countless threads on this problem I think I found a solution!

    Running an up to date install of Hardy, with GNOME my USB drives would not mount properly. They would show up in places, work from the command line etc but the automount just wasn't going to work. So a little bit of sniffing and I tried to use the gnome-mount command and came up with this:

    Code:
    matt@Godzilla:~$ gnome-mount -vbd /dev/sdb1
    gnome-mount 0.8
    ** (gnome-mount:30183): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_4EF4_3A8A
    ** (gnome-mount:30183): DEBUG: read default option 'utf8' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:30183): DEBUG: read default option 'umask=077' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:30183): DEBUG: read default option 'exec' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:30183): DEBUG: read default option 'flush' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:30183): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_4EF4_3A8A with mount_point='KRASS', fstype='', num_options=4
    ** (gnome-mount:30183): DEBUG:   option='shortname=mixed'
    ** (gnome-mount:30183): DEBUG:   option='uid=1000'
    ** (gnome-mount:30183): DEBUG:   option='utf8'
    ** (gnome-mount:30183): DEBUG:   option='umask=077'
    ** (gnome-mount:30183): DEBUG:   option='exec'
    ** (gnome-mount:30183): DEBUG:   option='flush'
    ** Message: Mount failed for /org/freedesktop/Hal/devices/volume_uuid_4EF4_3A8A
    org.freedesktop.Hal.Device.PermissionDeniedByPolicy : org.freedesktop.hal.storage.mount-removable no <-- (action, result)
    
    ** (gnome-mount:30183): DEBUG: pk_action='org.freedesktop.hal.storage.mount-removable' pk_result='no'
    ** (gnome-mount:30183): DEBUG: gained privilege = 0
    matt@Godzilla:~$
    A bit of googling turned up this:
    http://cblfs.cross-lfs.org/index.php/PolicyKit

    At the bottom in the Configuration heading is a solution, just make the required changes to the PolicyKit file and restart hald:
    Code:
    matt@Godzilla:/etc/PolicyKit$ sudo /etc/init.d/hal restart
     * Restarting Hardware abstraction layer hald                                                                                                                             [ OK ] 
    matt@Godzilla:/etc/PolicyKit$ gnome-mount -vbd /dev/sdb1
    gnome-mount 0.8
    ** (gnome-mount:30260): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_4EF4_3A8A
    ** (gnome-mount:30260): DEBUG: read default option 'utf8' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:30260): DEBUG: read default option 'umask=077' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:30260): DEBUG: read default option 'exec' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:30260): DEBUG: read default option 'flush' from gconf strlist key /system/storage/default_options/vfat/mount_options
    ** (gnome-mount:30260): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_4EF4_3A8A with mount_point='KRASS', fstype='', num_options=4
    ** (gnome-mount:30183): DEBUG:   option='shortname=mixed'
    ** (gnome-mount:30183): DEBUG:   option='uid=1000'
    ** (gnome-mount:30260): DEBUG:   option='utf8'
    ** (gnome-mount:30260): DEBUG:   option='umask=077'
    ** (gnome-mount:30260): DEBUG:   option='exec'
    ** (gnome-mount:30260): DEBUG:   option='flush'
    Mounted /dev/sdb1 at "/media/KRASS"
    matt@Godzilla:/etc/PolicyKit$
    And you should all up and running!

    Hope this helps someone.

  2. #2
    Join Date
    Apr 2006
    Location
    USA: San Diego, CA
    Beans
    3
    Distro
    Hardy Heron (Ubuntu Development)

    Re: USB drives not automounting, possible solution!

    Thanks man, that helped me fix a very annoying problem.

    Shawn

  3. #3
    Join Date
    Aug 2005
    Location
    Norfolk, UK
    Beans
    389
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: USB drives not automounting, possible solution!

    My camera, 3 usb sticks and two mobile phones do not mount automatically. They did before I updated to Ubuntu 8.04

    Can some expain the fix above please, I'm not sure what PolicyKit is or what I need to change.

  4. #4
    Join Date
    Jun 2006
    Location
    Vigo, Spain
    Beans
    311
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: USB drives not automounting, possible solution!

    I don't understand this fix either. I just executed the commands in the second code textbox, the pendrive got mounted. Then I unmounted it, extracted it and plugged it back again. No automount.
    Last edited by sicofante; September 22nd, 2008 at 10:23 PM.

  5. #5
    Join Date
    Jun 2007
    Beans
    16,510

    Re: USB drives not automounting, possible solution!

    The 'fix', if that's what it turns out to be, is at the bottom of the linked page. I would read the whole paragraph. Personally I wouldn't use it unless one was willing to deal with unexpected results should they occur.

    While you shouldn't have to do this and it may have no effect, you could try this, ( no harm possible

    Go to system -> administration -> authorizations. Scroll down to volumes and choose 'mount file systems from removable drives'. In the box click 'grant', from the drop down in 'select user' choose your username.

  6. #6
    Join Date
    Aug 2005
    Location
    Norfolk, UK
    Beans
    389
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: USB drives not automounting, possible solution!

    already did that off my own bat when looking around my system for a fix. it did not work, which is why i came online for a solution.

    the linked page to me is just a wiki page with history about something called PolicyKit

  7. #7
    Join Date
    Jun 2007
    Beans
    16,510

    Re: USB drives not automounting, possible solution!

    Configuration

    To allow HAL to automount removable drives such a thumbdrives, edit /etc/PolicyKit/PolicyKit.conf and add the following between the <config></config> tags:

    <match action="org.freedesktop.hal.storage.mount-removable">
    <return result="yes" />
    </match>

    Without this you will receive an error similar to org.freedesktop.Hal.Device.PermissionDeniedByPolic y: org.freedesktop.hal.storage.mount-removable no <--(action,result) when you "plug in" your thumb drive.

    You then must upgrade your util-linux to the latest version or HAL automounting will fail with the following error FAT: Unrecognized mount option "uhelper=hal" or missing value. Instructions for building the latest version of util-linux can be found the development CLFS books.
    Code:
    <match action="org.freedesktop.hal.storage.mount-removable">
        <return result="yes" />
    </match>

    To view your current file
    Code:
    gedit /etc/PolicyKit/PolicyKit.conf
    to edit use
    Code:
    gksudo gedit /etc/PolicyKit/PolicyKit.conf
    Note the formatting when using quote tags changes things a little, hence the code box or refer to link.

  8. #8
    Join Date
    Mar 2007
    Beans
    10

    Re: USB drives not automounting, possible solution!

    Thanks, editing the "System | Administration | Authorisations" (sudo polkit-gnome-authorization in terminal mode) does the trick fine. The changes are effective right away, no need to restart any service...

  9. #9
    Join Date
    Apr 2008
    Beans
    11

    Re: USB drives not automounting, possible solution!

    Hmm. neither solution worked for me. It seems like a lot of people are having this problem on Intrepid. Anyone else have any ideas?

  10. #10
    Join Date
    Jun 2007
    Beans
    1

    Re: USB drives not automounting, possible solution!

    I had this problem and found the cause was in /etc/hal/fdi/policy/gparted-disable-automount.fdi

    This was telling hal to not automount any hot-pluggable drives, which unfortunately meant USB thumb drives would not get mounted.

    Editing the file to allow automounting of removable drives (while still preventing automounting of non-removable, hotpluggable drives) solved things for me.

    Code:
    <deviceinfo version='0.2'>
      <device>
        <match key='storage.hotpluggable' bool='true'>
          <match key='storage.removable' bool='false'>
            <merge key='storage.automount_enabled_hint' type='bool'>false</merge>
          </match>
        </match>
      </device>
    </deviceinfo>
    Hal needed a restart after editing the file for this change to be picked up.

    Code:
    sudo /etc/init.d/hal restart

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •