Menu

#48 Jörg: automated single user mode into AppleJack at startup?

Some_future_release
open
2
2012-10-09
2006-10-12
No

I do remote administration on Macs by ssh. It would be
great if there was an option "reboot the machine. Do an
"applejack BIGBANG reboot". Leave a logfile. I relogin
10 minutes later and look at the log.
I would not dare the remove VM files on a running
machne remotely. :-)

Thanks a lot,
Jörg

Discussion

  • Kristofer Widholm

    Logged In: YES
    user_id=583959

    Implementing this would necessitate modifying the startup
    sequence of Mac OS X. If you know of a safe way to do this,
    please post it here. As it is, this scares me, much as I
    would love to be able to do this. But I don't know how to
    enter single user mode programmatically on reboot. I only
    know you have to hold the cmd+s key down.

    Again, if you know of a safe, easily reproducible and
    reversible way to hard-code "startup in single user mode
    next time, but only once" into the Mac boot sequence, I
    would love to know it.

     
  • Nobody/Anonymous

    Logged In: NO

    I would like to second this request. The ability to reboot
    a remote machine and run an applejack auto reboot would be
    phenomenal.

     
  • Nobody/Anonymous

    Logged In: NO

    If its possible to set the machine to boot into single user
    mode after every reboot with something like nvram
    boot-args="-s" couldn't you then automate the running of
    Applejack and finish and reset nvram boot-args=" "? The
    question is how can you make applejack autolaunch once
    single-user mode has started?

     
  • Kristofer Widholm

    Logged In: YES
    user_id=583959

    These are interesting suggestions, and I would like to be
    able to do it. Starting applejack up automatically is not a
    problem, as it could require just a temporary modification
    of the /var/root/.profile which gets loaded when the single
    user mode z shell gets loaded.

    However, modifying the nvram on a remote machine would need
    to be industrially tested, and I am only a solitary
    developer with three computers available for testing.

    In addition, if something goes wrong I would end up spending
    all my time trying to offer support. I already spend at
    least 8 to 10 hours a week interacting with AppleJack users,
    and I don't have any more time or resources to devote to it.

    If a company wanted to offer AppleJack support, I think
    rolling in this feature would be interesting. I just think
    the potential fallout of bugs and the like is quite enormous.

    The other thing to point out is that if you really want to
    run a non-interactive series of tasks on remote Macs, you
    can just write a shell script to do what you want. All the
    interactive stuff in AppleJack is just unnecessary overhead
    from a sysadmin's perspective, so why not just write a shell
    script that would reboot into itself, clear all caches
    everywhere (if that's what you want), reset the nvram again,
    and reboot a second time?

     
  • Kristofer Widholm

    Logged In: YES
    user_id=583959

    Another thing to consider is what to do about Macs with
    locked-down nvram settings? This is very common in IT dept
    rollouts of Mac OS X.

     
  • Nobody/Anonymous

    Logged In: NO

    This is exactly what I was wishing for as well. I hope you can figure out how to safely run "applejack AUTO restart" on a remote machine.

     
  • Kristofer Widholm

    Logged In: YES
    user_id=583959
    Originator: YES

    I would love to be able to add this feature, but I am wondering a few things. How is the remote machine connected? SSH? Remote Desktop?

    Also, I would like to avoid having to load networking in single user mode since doing so could make AppleJack unusable if its the networking that is causing the computer's problems in the first place.

    Maybe one of you can post some example scripts of how you currently run commands on remote machines?

    Thanks.

     

Log in to post a comment.