Dots across screen at bootup

Q: When I boot up, I am seeing a mess on the startup screen, something linke this:

HP-UX Start-up in progress
_________________________

Configure system crash dump
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
………………………………………………………………………… OK

Removing old vxvm files

What’s wrong?

A: This is a known problem with badly written start/stop (also known as rc) scripts. In HP-UX, there are 4 required values for rc scripts: startstop, start_msg and stop_msg. When HP-UX changes run level, boots up or shuts down, the first thing that is run is /sbin/rc. This script needs to identify the longest start/stop message from all the scripts (actually symlinks) in the /sbin/rc?.d directories. The messages are stored in an array with trailing dots added to make each line the same length. Then, depending on the return code from the script, the text [OK] or [N/A] or [FAIL] will be returned.

Now if a script is badly written and there is no response to either start_msg or stop_msg, then the array is filled with dots. Or worse, the script returns a string with multiple lines. The fix is easy — just verify the length of the start and stop messages for every S* and K* script in the rc directories, something like this:

# TEXT=”$(/sbin/rc2.d/S730cron start_msg)”
# echo “len=${#TEXT}: $TEXT”
len=18: Start clock daemon

# TEXT=”$(/sbin/rc1.d/K270cron stop_msg)”
# echo “len=${#TEXT}: $TEXT”
len=17: Stop clock daemon

You’ll need to check the scripts just before the long row of dots. This can be a lot of work for multiple systems so you can use the script below to show any errors in the rc script messages. The script is called rcmsgck and it runs like this:

# rcmsgck
Start scripts:
/sbin/rc0.d:
K-scripts = 7
len=16 – K400utmpd
len=18 – K480syncer
len=28 – K650kl
len=22 – K800killall
len=45 – K850kcshutdown
len=20 – K900localmount
len=61 – K930vxvm-daemon-kill

/sbin/rc1.d:
S-scripts = 16
len=28 – S080crashconf
len=23 – S090sw_clean_vxvm
len=44 – S091vxvm-nodes-check
len=42 – S092vxvm-startup
len=51 – S093vxvm-reconfig
len=18 – S100localmount
len=16 – S320hostname

and so on. You can shorten the list to just errors with -q:

# rcmsgck -q
Start scripts:
/sbin/rc0.d:
K-scripts = 7
/sbin/rc1.d:
S-scripts = 16
K-scripts = 86
–>len=00 – K705ramdisk <– stop_msg too short (less than 5)

/sbin/rc2.d:
S-scripts = 103
–>len=00 – S295ramdisk <– start_msg too short (less than 5)
K-scripts = 13

/sbin/rc3.d:
S-scripts = 17

/sbin/rc4.d:

No S or K scripts found

In this case, an HP-supplied rc script has been incorrectly written (ramdisk). This script only returns a message when there is file called /etc/ramdsktab. The design rules for rc scripts are that a start and stop message is ALWAYS provided, simply to indicate the beginning of the script tasks. Whether the correct files or start/stop procedures can be run successfully is signaled by the return code for start or stop, not for the messages.

You can download a copy of rcmsgck from:

ftp://ftp.sourcedirect.com/pub/tools/rcmsgck

– See more at: http://serviceitdirect.com/blog/dots-across-screen-bootup#sthash.OF4CjZj0.dpuf


Tags: