Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: How to recover from a launchctl config error System 10.4
I just had a little problem occur with the use of launchctl. I was looking to reduce the amount of memory used on my system, and found a server process (bfobserver) that was using a great deal of real memory. On checking, I found in the developer's Read Me that this process is not needed if you are not using xgrid compilation. Great. I will stop it from starting. I used launchctl to change its startup via launchd with the following command:
sudo launchctl unload -w \
/System/Library/LaunchDaemons/com.apple.dnbobserver.plist
The problem was I accidentally put a space between /System/Library/LaunchDaemons/ and com.apple.dnbobserver.plist. The result was a wild card to launchctl for that directory, and caused all of the daemons listed to be killed and all the daemon startups were disabled. This meant that the system was now unusable, and a reboot just ended in a blue screen.

To fix this, I had to come up in single user mode (Command-S on startup). Remount the root file system read/write, compare all of the LaunchDaemon entries with my other system, and then re-enable them. This was a time consuming and stupid mistake, but easily done.

[robg adds: Hopefully nobody else will need this hint, but just in case...]
    •    
  • Currently 2.50 / 5
  You rated: 3 / 5 (6 votes cast)
 
[12,806 views]  

10.4: How to recover from a launchctl config error | 9 comments | Create New Account
Click here to return to the '10.4: How to recover from a launchctl config error' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: How to recover from a launchctl config error
Authored by: fungus on Nov 15, '06 02:57:32PM

I did this very same thing. Although in my defense I copied and pasted the code from another site that had the space in there.

I don't want all of those running, and I know that they aren't all enabled by default. Does anyone know which ones should be enabled by default?

FYI: the culprit that prevents your machine from booting is com.apple.nibindd.plist



[ Reply to This | # ]
10.4: How to recover from a launchctl config error
Authored by: BryanD on Nov 15, '06 04:16:40PM
So you're less likely to have these kind of problems, use the very nice (free) program Lingon to maintain your launch services entries.

[ Reply to This | # ]
10.4: How to recover from a launchctl config error
Authored by: dave.conradie on Apr 22, '07 11:33:05PM

You saved my life with this one. I got caught (also after an unchecked copy n paste) and just about had a heart attack before I found yoru post with the workaround. Thanks.



[ Reply to This | # ]
10.4: How to recover from a launchctl config error
Authored by: nclark42 on Jun 16, '07 12:10:29AM
this hint saved my life, i was considering doing an "archive and install," which would have been a huge PITA.

i assume we're all referring to the same thread on xcode-users:

http://lists.apple.com/archives/xcode-users/2006/May/msg00671.html

and i also assume that none of us read the rest of this thread:

http://lists.apple.com/archives/xcode-users/2006/May/msg00836.html

"Beware! Do not copy and paste this into Terminal. There should not be a space between /System/Library/LaunchDaemons/ and com.apple.dnbobserver.plist. It could completely hose your system."

*sigh*

anyway, once i figured out what the problem was, it was pretty easy to fix... i didn't edit the files, i just copied them off another system onto a usb hard drive and then plopped them back in place.

anyway, thanks for the help guys :-D

-n

[ Reply to This | # ]
10.4: How to recover from a launchctl config error
Authored by: Sijmen on Dec 20, '07 06:07:58AM

I've got no idea how to fix this problem. I'm a noob when it comes to the command line. Can someone explain how one enables launchctl after this screw up?



[ Reply to This | # ]
10.4: How to recover from a launchctl config error
Authored by: Sijmen on Dec 20, '07 06:48:59AM

Okay, here what I did:
Booted up in single mode(press S after chime)
A whole list of errors passed my screen. When I got the command line I typed:
'launchctl load -w /System/Library/LaunchDaemons/'
Turned the machine off(by pressing the power button for 5 seconds)
Booted the system and everything was running again. And by everything I mean EVERYTHING! Every daemon in /LaunchDaemon was running. With Lingon and Blackle I turned of the ones I would never use and presto!
My PB is fine again :)



[ Reply to This | # ]
10.4: How to recover from a launchctl config error
Authored by: TigerKR on Dec 27, '07 04:53:46AM

HURRAY!!!!!

My server is saved from my fat fingers!

Thank you macosxhints friends again!



[ Reply to This | # ]
10.4: How to recover from a launchctl config error
Authored by: TigerKR on Dec 26, '07 09:35:24PM

If this works, I'm going to be very grateful. I have a borked 10.4.11 server sitting in blue screen mode burning money.



[ Reply to This | # ]
10.4: How to recover from a launchctl config error
Authored by: kauihou on Jan 18, '08 04:05:21AM

Thanks so much. I have been working on this for 5 hours and was just about to wipe and rebuild till I found your help.

Everything is right in my world again.

Thanks.

J



[ Reply to This | # ]