Monday 21 April 2008

How to perform system shutdown (Solaris)

The commands avaliable to the root user for dogin system shutdown procedures include:
- /sbin/init (using run level S,0,1,5 or 6)
- /usr/sbin/shutdown (using run level S,0,1,5 or 6)
on both command will execute the rc0 kill srcipts.
# init S
Shut down the system to single-user mode (either run level S or 1)
# init 0
Shutdown the system.On SPARC display the ok prompt,On X86/64 display "Press any key to reboot"
# init 5
Shut down the system and turn it power off.
# init 6
Shut down the system and then reboot to multi-user mode.
note : halt,poweroff and reboot command don't execute the rc0 kill script.

In oder to boot the system to a specific milestone
SPARC platform
ok> boot -m milestone=[mile_stone]
X86/64 platform
edit system boot menu multiboot
grub edit> kernel /platform/i86pc/multiboot -m milestone=[mile_stone]

Recovery /etc/system file
If boot process fail because of an unusable /etc/system file.
SPARC platform
ok> boot -a
x86/64 platform
grub edit> kernal /platform/i86pc/multiboot -a
Both platform on menu "Name of system file [/etc/system] : " use your backup /etc/system or /dev/null

Clear boot-archive
If your system shutdown not properly such as power off system without shutdown solaris.
clear boot-archive
# svcadm clear system/boot-archive
# init 6

Solaris Troubleshooting : http://www.princeton.edu/~unix/Solaris/troubleshoot/index.html , http://www.sun.drydog.com/faq/7.html

No comments: