Teaching an old dog new tricks.

Holy shit, two in a row, I must have a fever!  Ok, not really.

I use mac-minis for my “home theaters”.  I have one in the living room, and one in the basement “play room”.  I use to, long time ago, use a hacked Xbox.  I ran XBMC on it, then HD became more prevalent and the Xbox couldn’t handle it, so I purchased my first mac mini.  I also started using NFS to mount external drives to the mac as my media drives to watch TVs/movies, etc.

Well, on reboot, unless you have it set up to auto mount the NFS drives, you have to manually mount them every time either the NFS server goes off line, the mac mini goes off line, etc.

The old way you use to auto mount NFS drives is via Disk Utility.  You’d put in your mount information and every time the box rebooted the NFS shares would re-mount for you, and then you’d also have your XBMC ( now Kodi ) auto start as well, and basically when you changed your TV Input to there, you have your XBMC screen and you can get right in to watching your show.

Around 10.8 or so of OS X ( OS Ten, not X by the way ) they removed the option for NFS auto mounting via Disk Utility.  Now, while OS X is built off of a *nix variant, you do have things such as /etc/auto_home, /etc/autofs, /etc/fstab, I really didn’t want to mess with them and potentially cause issues.  Plus the /Volumes directory is the automatic mounted directory, it’s what I already had my mount points set to in XBMC/Kodi, and while trivial to change, let’s be real, I’m super lazy.

So, I went with what most procrastinators do, I only dealt with it when it popped it’s head up.  Meaning I go in to XBMC/Kodi and I see that the volume isn’t mounted.  I’d pop open Remote Desktop, hit cmd-space, select Finder, hit cmd-k and go through a quick return, cmd-k, down arrow, quick return, then a cmd-tab to get back in to XBMC/Kodi…and I did this for a couple of years, because it’s just too much of an issue to figure out NFS for mac.

Or so I thought.  Lately, with the spurt of items I’ve ticked off my to-do list, namely setting up a VM Server, I figured … more out of the blue today … to look up how to do NFS mounting, and I found an article from 2011, of all times ( I hadn’t ever seen it before and I’ve looked quite a few times in the last four years for this ), on how to quickly and easily do this.  Here’s the kicker, it was a sort of as an aside comment, because the article is actually talking about setting up auto-mount to do what I wanted to do.

The difference between what he wanted and what I wanted is I want the volumes to be connected at all times, I didn’t want them to only be available when I wanted them.  That may work and not cause any issues, but it may, and I don’t feel like playing around with it.

Now, for how he did it, and how it completely boggled my mind.  In Mac OS, in side Preferences is User & Groups, and inside User & Groups, for your particular user are two items Password, and Login Items.  Login Items is where I’m looking at.  This is the thing where you stick things you want to automatically open up when the computer reboots/you log in ( I have only a default user and it auto logs in, so that is the one I’m looking at ).  But get this, it will also mount NFS drives, all I had to do was drag and drop the mounted volume in to my Login Items and that’s it.

Mind completely blown, why didn’t I think of trying to do this before?!  How have I been using a Mac, since way back in System 6/7 through Mac OS 10.10 and not known this?!  Completely ingenious, I’m still slightly flabbergasted at this.

Anyway, that’s how to auto mount an NFS volume in MacOS now.

**EDIT**

About a week later, and this may not be entirely accurate.  Damn.

Tags: , ,

Leave a Reply

You must be logged in to post a comment.