Solaris 8 boot scripts (/etc/rc?.d/*) can hang indefinitely with almost no feedback. Below are the methods that actually work on real Solaris 8 systems.
From the ok prompt:
ok boot -s
You land at the root shell (#) without most rc-scripts are not executed yet.
Now manually test the suspect script with full visibility:
# sh -v /etc/rc3.d/SxxProblemScript
or with tracing:
# sh -x /etc/rc3.d/SxxProblemScript 2>&1 | tee /tmp/debug.out
In single-user mode edit /etc/inittab and temporarily replace the initdefault line:
is:3:initdefault:
with
is:3:wait:/sbin/sh < /dev/console > /dev/console 2>&1
Reboot. init will stop after parsing inittab and give you a shell before any rc scripts run.
Then manually execute them one by one:
# for i in /etc/rcS.d/S*; do echo "=== $i ==="; sh -x $i start; done # for i in /etc/rc2.d/S*; do echo "=== $i ==="; sh -x $i start; done # for i in /etc/rc3.d/S*; do echo "=== $i ==="; sh -x $i start; done
When one hangs, Ctrl-C and debug it.
In single-user mode edit the suspect script and put at the very top:
exec > /tmp/SxxScript.log 2>&1 set -x echo "=== Started at $(date) ==="
Reboot normally. When it hangs again, boot boot -s, mount root if needed, and read /tmp/SxxScript.log – it shows exactly where it stopped.
ypwhich hangs)/etc/vfstab without bg,intr,soft when server is downroute add default … when gateway is unreachable/etc/rcS.d/S92volmgt starting vold (waits forever if RPC is broken)S69inet starting in.routed or in.rdisckeyserv, automount, or anything waiting for NIS/a (usually /dev/dsk/c0t0d0s0)/a/etc/rc?.d/# ps -ef | grep -vE "ps|grep" # tail -50 /var/adm/messages # grep yp /var/adm/messages # ypwhich # hangs? → NIS problem # mount -p # anything stuck? # netstat -rn # default route present?
99 % of Solaris 8 boot hangs are either NIS/ypbind or an NFS mount without proper timeout options.