Home › Forums › OS X Server and Client Discussion › Questions and Answers › Single-user mode w/network & sshd
- This topic has 1 reply, 1 voice, and was last updated 17 years, 3 months ago by
mdecheser.
-
AuthorPosts
-
July 23, 2009 at 10:16 pm #376695
mdecheser
ParticipantHello everyone, this is my first post to the community, and I’m hoping to not rehash an already answered question.
I want to have the ability to run Applejack on a remote server via SSH without being at the console.
I know how to set the server to restart in single-user mode:
nvram boot-args="-s"I’d love to be able to SSH to the server and kick off the Applejack script. I have succeeded in getting the server to start networking, obtain a DHCP IP address (or even claim the IP it’s manually configured to claim) and even SSH out of the server, but I’m unable to SSH *to* the server. I have been using the following home-rolled script to perform these functions:
#/bin/bash launchctl load /System/Library/LaunchDaemons/com.apple.kextd.plist sleep 5 launchctl load /System/Library/LaunchDaemons/com.apple.notifyd.plist sleep 3 launchctl load /System/Library/LaunchDaemons/com.apple.configd.plist sleep 2 launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist sleep 2 launchctl load /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist launchctl load /System/Library/LaunchDaemons/ssh.plistIn addition to the fact that I’m not able to SSH to the server after running this script, I receive a persistent error sent to stdout at the console:
kextd_watch_volumes: couldn't set up diskarb sessionsEventually, the server will seize.
My assumption is that I’ll need a script that will, at a minimum, perform fsck -fy, mount -uw /, start network services and SSHD. As long as the box is reachable, I can conceivably fire off Applejack manually, then reset NVRAM setting to boot back to Normal mode. I’m assuming everyone here knows that Applejack will only run in single user mode.
I have considered use of a LoginHook to script the fsck/mount/start services steps. I believe those only function when booting into aqua. I have also been researching SystemStarter, but my initial attempts to use this have been so far unsuccessful.
Notes: This server is brand new hardware, reinstalled OSX 10.5.6 from DVD out of the box. For now, the hardware is local, but I am establishing exactly how much hands-on support I’ll need when this server is racked in a remote location.
Can someone shed some light on this? Is single user mode with SSHD even possible?
Thanks in advance!
July 28, 2009 at 5:38 pm #376732mdecheser
ParticipantPerhaps I can ask the question in a different way.
I know it’s possible to start networking in single user mode.
Is it possible to start sshd for root-only inbound connections? Or does the very use of sshd imply multi-user?
I know many people have been reading this thread. Any enlightenment would be most appreciated. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.