Friday, January 05, 2007

How to Reboot a Workstation using init, shutdown

Here are a few ways to gracefully reboot a Sun workstation.

#init 0 -- This will bring the system down to the PROM level. You will have to manually type in "boot" to get the system to return to init 3 (usually normal operating state).
#init 6 -- This will take your workstation to init 0 and then automatically reboot to init 3 (usually normal operating state).

If you want to gracefully shutdown the system, you can use this command.

#init 5 -- This will bring the system down to the PROM level and then power the workstation down.

If you want to warn your users prior to reboot, use the shutdown command. This example will reboot in 60 seconds and will boot using init 6 state.

#cd /
#shutdown -y -g60 -i6

1 comment:

lordmac said...

Be careful with the command shutdown and always check which one you are using. There are to shutdown commands in Solaris. The first one, well documented is placed in /usr/sbin/shutdown and the second one with no documentation is here: /usr/ucb/shutdown. With the second one you can use "-h now" to halt and "-r now" to reboot.