Linux: Using automount to mount NFS on the fly

My home network has an NFS server that I like to mount on my laptop. When I take my laptop to work, the boot hangs trying to find the now non-existent NFS server. The solution that I found was to use automount to mount that directory on demand. When I'm at work, I don't try an access that folder.

If you want to mount your NFS server at /mnt/nfs_server/ Put the following in your /etc/auto.master:

/mnt/nfs_server /etc/auto.master.d/server.autofs

Then create /etc/auto.master.d/server.autofs that has your actual NFS information in it:

* -rw server.domain.com:/home/share/


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 18.191.237.228
To prevent spam please submit by clicking the kitten: