automount doesn't work

Hi!

I did fresh install of GNOME 3 on FreeBSD 10.3-RELEASE (amd64)and everything works good except automount. When I insert CD or USB stick doesn't happened anything. User is member of "wheel" and "operator" group and in
/usr/local/etc/PolicyKit/PolicyKit.conf I have:
Code:
<config version="0.1">
  <match user="root">
   <return result="yes"/>
  </match>
  <define_admin_auth group="wheel"/>

  <match action="org.freedesktop.hal.storage-mount-removable">
  <match user="fernandel">
    <return result="yes"/>
  </match>
  </match>
  <match action="org.freedesktop.hal.storage-mount-fixed">
       <match user="fernandel">
    <return result="yes"/>
  </match>
  </match>
  <match action="org.freedesktop.hal.storage-eject">
  <match user="fernandel">
    <return result="yes"/>
  </match>
  </match>
</config>
In /etc/sysctl.conf is:
Code:
vfs_usermount=1

and it doesn't work - no cd no usb stick. It works before on the same version of FreeBSD but after problem with hard drive I did install FreeBSD again.

Thank you.
 
Use autofs() and automount() it's built in and works with everything.

Although from autofs man page alone it's not obvious what you need to do to get it running:

1. Add autofs_load="YES" to your boot.conf()
2. Add autofs_enable="YES" to your rc.conf()
3. Uncomment the /media -media -nosuid line in /etc/auto_master

This is independent of Xorg and any WM or DE. Stuff gets automounted to /media, One disadvantage is that it automounts EFI partitions... I'm sure there is a way to get it to exclude these but I couldn't be bother to figure it out.
 
It was MFC'd to 10-STABLE in August 2014. FreeBSD 10.1-RELEASE came out in November 2014. I'm quite sure those features have been imported long before 10.3.
 
free-and-bsd, you're welcome. I've been happily using it in 10.3-RELEASE, but only tested with fat-32 USB sticks so far.

Not an issue for me but I noticed that it appears to sort of lazily mount the actual file-system i.e although the mount point is created there is a delay on the first access.
 
free-and-bsd, you're welcome. I've been happily using it in 10.3-RELEASE, but only tested with fat-32 USB sticks so far.

Not an issue for me but I noticed that it appears to sort of lazily mount the actual file-system i.e although the mount point is created there is a delay on the first access.
Not even a CD/DVD? Just out of curiosity maybe ;)?
 
Hah, if I can find one I will try... not even sure my DVD drive works - I was considering replacing it with a toaster for better use of space, then again I've herd I need NetBSD for that :p
 
I would like to use autofs / automount too but automount doesn't seem to exist on my system (10.3-STABLE). Autofs loads in /boot/loader.conf, but the daemons aren't there and neither is /etc/auto_master.
 
ports-mgmt/psearch is a great tool for digging. psearch automount gives
Code:
sysutils/am-utils         The Berkeley Automounter Suite of Utilities
sysutils/automount        FreeBSD's devd(8) based automount solution
sysutils/automounter      Provides scripts to dynamically configure amd
sysutils/fusefs-afuse     File system automounting implemented in user-space using FUSE
May be one of them matches your requirements. On the other hand there should be /usr/sbin/automount from the base.
 
Sorry, I sent too fast and edited my answer after your reply. What gives whereis automount? I have it here on 10.3-STABLE.
EDIT: /etc/auto_master exists, too. Do you use a custom kernel?
 
Hmm, /usr/sbin/automount actually does exist, but no /etc/auto_master. There is an empty /etc/autofs/ directory. I have
Code:
autofs_enable="YES"
in /etc/rc.conf, but this has no effect because there are no automount scripts in /etc/rc.d/. There are no error messages when booting which is a bit weird because of the missing scripts in /etc/rc.d/.

I use a custom kernel which is just a generic kernel with all the stuff commented out my machine doesn't need.
 
Use autofs() and automount() it's built in and works with everything.

Although from autofs man page alone it's not obvious what you need to do to get it running:

1. Add autofs_load="YES" to your boot.conf()
2. Add autofs_enable="YES" to your rc.conf()
3. Uncomment the /media -media -nosuid line in /etc/auto_master

This is independent of Xorg and any WM or DE. Stuff gets automounted to /media, One disadvantage is that it automounts EFI partitions... I'm sure there is a way to get it to exclude these but I couldn't be bother to figure it out.

Before I reinstalled FreeBSD 10.3-RELEASE (amd64) I didn't have anything as you suggested and it works.
 
I use a custom kernel which is just a generic kernel with all the stuff commented out my machine doesn't need.
I have such a kernel, too. Is it possible that the file has been not handled by mergemaster by accident? On my system I have /usr/src/etc/auto_master. I would not wonder if this would be a template which should end up in /etc/. Here /usr/src/etc/auto_master and /etc/auto_master are similar.
there are no automount scripts in /etc/rc.d/
In /usr/src/etc/rc.d/ are all the mount scripts as well. Here they match to their counterparts in /etc/rc.d/. I am not sure how to re-trigger mergemaster. Since all related files in /usr/src/ are similar on my system it might be enough just to copy them to fix the issue. If not it can be made undone easily.
 
You can always run mergemaster(8) again after making sure that your sources at /usr/src match your system and double checking your /etc/src.conf that it contains what you want. Then just simply run (the options are what I prefer to use, they are safe to use even if you have modified files):

# mergemaster -Ui
 
Dear kpa,
I just tried it by moving /etc/auto_master to a safe place. mergemaster -Ui restored it. This is good to know. Thank you for the information.
 
I'll have to run mergemaster first I think (can't remember ever running it actually). On my current system I did a fresh install of FreeBSD 10.0 (STABLE), and upgraded it gradually to 10.3-STABLE now. Probably didn't use mergemaster because these were not major upgrades. Sources are still installed so I'll try to run mergemaster first. Thanks for all the help :).
 
Yeah but I thought it is only mandatory when upgrading to a new major version only. And iirc it requires editing in vi, which resulted in a big mess in my case in the past.
 
It's not usually needed when you're following a RELEASE version but on CURRENT and STABLE there can be changes to the configuration files now and then, especially on CURRENT. It doesn't use vi(1) but feeds the diffs to $PAGER for you to review them and select which version you want to keep or to perform a merge.
 
Back
Top