Reboot a Solaris system

Contributor Icon Contributed by qmchenry Date Icon July 23, 2003  
Tag Icon Tagged: Solaris

The process of shutting down a Solaris system is critical. Using the init program to restart a system causes Solaris to perform a sequence of steps to shutdown services gracefully. The reboot command bypasses the runtime control scripts and can compromise data integrity. The sync commands synchronize the filesystem, flushing buffered data to disk.


As superuser:

sync; sync; init 6

Previous recipe | Next recipe |
 
  • illumin8
    Sync is no longer necessary in any modern version of Unix (Solaris and Linux included). If you're a system administrator, you should learn proper use of the init command, which allows you to change runlevels. Here are a few different uses of init:

    # init 6 - reboots the system
    # init 5 - halts the system (turns power off)
    # init 0 - sends you to runlevel 0, which is the "ok" prompt (OpenBoot PROM)
    # init 1 - sends you to single user mode, useful for installing patches.
  • Anonymous
    umm.. but I believe

    shutdown -h 5 -g 60 -y

    That will shut it down cleanly and power it off.

    "shutdown" includes sync and all that graceful fun stuff.

    Sincerely
    Craig Fourie
  • Troy
    Hi anybody,
    can't reboot my E450, sure i'm root . But any of these init 6, reboot, or halt commands returns me (after some seconds) to the shell prompt.

    any idea? thx. Troy
  • flexinfo
    Try this:

    /sbin/uadmin 2 0

    That will shutdown the node without the execution of the init kill scripts...

    btw what version of solaris / kernal patch level are your using?
  • Anonymous
    Hopefully you've sorted this by now, but use shutdown -i6 -g0 -y to reboot if none of the others work, though I can't think why they shouldn't.
blog comments powered by Disqus