5

I've added the following line to my /etc/fstab:

server:/srv/homes /home nfs rsize=8192,wsize=8192,timeo=14,intr,hard,auto 0 0

As you can see, /home needs to be mounted during the boot or users won't have an access to their home directory.

Unfortuately, Ubuntu seems to push mounting to the background and therefore /home is mounted approximately one minute after login screen appears. How can I make it wait for successful mount?

PS. I'm running Ubuntu 12.04

  • 1
    I would try adding remote-filesystems, emitted by mountall.conf, to the "starts on" conditions of lightdm.conf. – enzotib Apr 26 '12 at 15:31
  • @enzotib sadly this won't work, because mountall will emit remote-filesystems immediately, and then mountall-net will finish the job, and emit mounted events for specific mountpoints – Josip Rodin Feb 1 '17 at 15:16
3

In lightdm's upstart job (/etc/init/lightdm.conf), add a mounted event so it looks a bit like this:

start on ((filesystem
           and runlevel [!06]
           and started dbus
           and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
                or stopped udev-fallback-graphics))
           and mounted MOUNTPOINT=/home
          or runlevel PREVLEVEL=S)
3

I was experiencing a similar problem after upgrading to 12.04 and solved it by adding the nfsvers=3 option to the fstab entry for the NFS mount. The NFS filesystem was being exported using version 3 and there appears to be a problem in Ubuntu 12.04 and 11.10 with detecting that since version 4 is tried first. See the following bug report: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/891825

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.