Technical article 105009

My system hangs on the way to multiuser mode.

OpenServer 5.0.0

Written · Last revised

Problem

After typing <Ctrl>D to enter multiuser mode, the system hangs on the way up to multiuser mode.

Cause

The most frequent causes of these types of hangs are:

* disabled console ttys * a missing system file * a corrupted system file * a syntax error in a user-defined or non-SCO start up script * an NFS filesystem that is trying to mount but is unavailable on the server of origin.

Solution

If interrupting the system does not free the hang, power the
machine down.  When you power the machine on again, fsck will
be cleaning the root filesystem.  When the control-D prompt
appears, enter the root password to enter System Maintenance mode.

The two potential causes for hangs on the way to multiuser mode that you can check for quickly are disabled ttys or missing software.

Check to ensure that all of your console ttys are enabled.  To do
this, examine the /etc/inittab file.  tty entries in this file
should have a "respawn" entry if they are enabled.  If the tty has
been disabled, you'll find "off" in the field.  Disabled ttys will
prevent the system from going all the way up into multiuser mode.
For example:
ttys disabled:

co1:1:off:/bin/sh -c "sleep 20; exec /etc/getty tty01 sc_m" c02:2:off:/etc/getty tty02 sc_m c03:2:off:/etc/getty tty03 sc_m c04:2:off:/etc/getty tty04 sc_m

ttys enabled:

co1:1:respawn:/bin/sh -c "sleep 20; exec /etc/getty tty01 sc_m" c02:2:respawn:/etc/getty tty02 sc_m c03:2:respawn:/etc/getty tty03 sc_m c04:2:respawn:/etc/getty tty04 sc_m

If you find that one or more of the ttys has been disabled,
run the enable command to place the tty in the mode where
it will accept logins.  For example:
# enable tty02

To ensure that basic system software is present on the system, run either fixperm or the verify function of Software Manager, depending on which version of the operating system you are running.

For SCO UNIX Operating System Version 4.x and SCO Open Server
Release 3.0 products, run fixperm, from the root directory,
to verify software completeness.  For example:
# cd /
# fixperm -cs /etc/perms/*
For SCO OpenServer Release 5, run the verify option of Software
Manager.  For example:
scoadmin -> software manager -> software -> verify software
choose "Normal system state (quick)" and "Broken/missing symbolic
links"

If the verification process turns up a missing piece of system software, replace it from your last good backup, or from the original installation media, using custom.

At this point, try to enter multiuser mode by typing <Ctrl>D at
the system prompt.  If the system still hangs, then there is
probably a syntax error or corrupt file.
When corrupt files or syntax errors in start up scripts are the
source of the problem, turn on a trace in the system start up
files, power cycle the machine, and watch the trace output to see
where the source of the problem is.  This process can take a while.
When the system is going from maintenance mode (where the control-D
prompt is displayed) to multiuser mode, it executes a series of
shell scripts found in the /etc/rc2.d directory.  Generally, these
scripts are executed one after another.  On SCO OpenServer 5
systems, scripts that begin with the letter "P" are executed
simultaneously.
When you turn the trace on, commands that are executed during system
startup (from the scripts in /etc/rc2.d which are normally silent)
are echoed to the screen.  When the system hangs, you can then tell
which script was executing and what command was being run.
To turn the trace on, edit the /etc/rc2 file, in system maintenance
mode, using the editor of your choice.  Add 'set -x' to the top of
the file.  For example:
# vi /etc/rc2
#       "Run Commands" executed when the system is changing to init state 2,
#       traditionally called multiuser.
# Begin SCO_BASE
set -x
PATH=/etc:/bin:/usr/bin
export PATH
exec < /dev/console > /dev/console 2>&1         # input and output from console
bootlog=/etc/bootlog

Once you have corrected the syntax error or replaced the corrupt binary that was causing the system to hang, turn the trace off by editing the /etc/rc2 file and removing the set -x line in the file.

From the Xinuos technical article database, record 105009. Reproduced with permission. The original is at www.sco.com/ta/105009, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.