Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Automount not automounting on startup

I was playing around with autofs maps at the weekend, and after one restart the /home and /net folders were viewable in the Finder. I reset auto_master to the default settings, restarted and those folders were still there (as folders, not as aliases/symlinks). I deleted these folders and restarted again. The folders reappeared. and are still visable.

Now, I can make these folders dissappear by typing automount -vc in Terminal (i.e. they start behaving as they're supposed to), but on restart... the folders reappear.

Question is, how do I make this work properly?

I also have access to a MacBook that doesn't have this problem. Typing ps axww on both machines reveals that the MacBook is running both autofsd and automountd, whereas my MacBook Pro is only running automountd. Therefore, I presume launchd is failing to start autofsd on startup, but I don't know how to make launchd behave, if that were possible. I've tried various launchctl commands (which I've forgotten) so I'm like a dwarf with no legs: a little stumped.

MacBook Pro 17" 2.33GHz, Mac OS X (10.6.2)

Posted on Nov 24, 2009 2:52 AM

Reply
12 replies

Nov 24, 2009 10:08 AM in response to Nerdilicious!

what do you get when you run {color:blue}sudo launchctl list | grep autofsd{color}? is there a job listed with an error code, or is there no listing at all? if the former, you might have bolluxed the conf file or the auto_master file (might be something trivial and annoying, like unexpected whitespace or improper permissions). if the latter, did you play with any of the launchd plist files?

Nov 25, 2009 1:27 AM in response to twtwtw

I'm not near my computer till this evening, but if I remember correctly I did run *launchctl list | grep autofsd* (I think I ran it under sudo) and it returned a blank, rather than an error. I haven't edited the plist files.

I did try *launchctl stop com.apple.autofsd* and *launchctl start com.apple.autofsd*, but these returned a 'not found' error of some description. However, the corresponding plist file is present in /System/Library/LaunchDaemons and is the same as on my girlfriend's MacBook (which works as expected). I have run Repair Permissions and the problem still persists.

Nov 25, 2009 9:21 AM in response to Nerdilicious!

Nerdilicious! wrote:
I'm not near my computer till this evening, but if I remember correctly I did run *launchctl list | grep autofsd* (I think I ran it under sudo) and it returned a blank, rather than an error.


'sudo' is necessary - launchctl wont report root processes to a normal user without it.

Nerdilicious! wrote:
I did try *launchctl stop com.apple.autofsd* and *launchctl start com.apple.autofsd*, but these returned a 'not found' error of some description. However, the corresponding plist file is present in /System/Library/LaunchDaemons and is the same as on my girlfriend's MacBook (which works as expected). I have run Repair Permissions and the problem still persists.


stop, start and remove are for jobs that are already loaded into launchd (start forces a single run, stop forces the process associated with a job to quit, remove removes an active job from launchd). what you'd want to use is 'load': *launchctl load '/System/Library/LaunchAgents/com.apple.autofsd.plist'*

Nov 25, 2009 4:41 PM in response to twtwtw

When I type *sudo launchctl load /System/Library/LaunchDaemons/com.apple.autofsd.plist* into Terminal, I get a "nothing found to load" error. However that plist file is there and has the correct size, ownership and permissions.

The plist file itself refers to /usr/libexec/autofsd - this file also exists and has correct size/ownership/permissions.

Just thought of something - I'll be right back...


... and here I am. I've just returned from Terminal and typed in the very same command as at the beginning of this reply, but this time with added force:

*sudo launchctl load -F /System/Library/LaunchDaemons/com.apple.autofsd.plist*

This has loaded autofsd (yay!) but It remains to be seen if it remains loaded after a restart. Let's see…

Nov 25, 2009 6:36 PM in response to Nerdilicious!

if the Force option works, that means that the plist has a Disabled key set to true. that is not the default on 10.5.8; if it's that way on your machine then either Apple has intentionally disabled it on 10.6.2 or you (or some process on your machine) accidentally disabled it. you can fix the problem (if it is a problem) by setting the Disabled key to false in the plist, but you should check to make sure it's not supposed to be disabled before you do that.

Message was edited by: twtwtw

Nov 26, 2009 4:05 PM in response to Nerdilicious!

I've compared the /System/Library/LaunchDaemons/com.apple.autofsd.plist file from my Mac with my girlfriend's and they are exactly the same:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.autofsd</string>
<key>KeepAlive</key>
<true/>
<key>Program</key>
<string>/usr/libexec/autofsd</string>
<key>ProgramArguments</key>
<array>
<string>autofsd</string>
</array>
<key>EnableTransactions</key>
<true/>
</dict>
</plist>

If my autofsd is perfectly OK (apart from the not-loading bit), then could the problem originate earlier in the startup process?

Jan 22, 2010 11:35 PM in response to Nerdilicious!

So there was little me. Stumped. What else could I do? I tried *sudo launchctl load /System/Library/LaunchDaemons/com.apple.autofsd.plist* again. I got the +nothing found to load+ error again. Futile? Why yes.

And no.

Because this time, I tapped this string into Google: *+launchctl +"nothing found to load"* and came across this blog entry: http://www.cuddletech.com/blog/pivot/entry.php?id=403

*Contained therein is the answer: use the -w switch with +launchctl load+.*

So to answer my question, type this into Terminal as an administrator:

*sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.autofsd.plist*

And this works! And, yes, it still works after rebooting or a power cycle.

Automount not automounting on startup

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.