DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Customizing UNIX system startup

About system states

Once powered up, the system operates in one of eight system states--software configurations of the system under which only selected groups of processes exist. (System states are also known as ``init states,'' ``run states,'' ``run levels,'' or ``run modes.)''

You can change from one system state to another with the init(1M) or shutdown(1M) (which calls init) commands. For details about these commands, see their reference manual pages.

``System states'' shows the states in which your system can operate.

System  
State Description
0 Shutdown state. In this state, you can safely turn off the computer's power.
1 Administrative state. Filesystems required for multiuser operations are mounted, and logins requiring access to multiuser filesystems can be used. When the system comes up from firmware mode (state 5) into state 1, only the console is active; multiuser (state 2) services are unavailable. When the system is going from state 2 to state 1, some services are stopped and some processes are killed; otherwise, the system continues operating as it did in state 2.
s or S Enter single-user state. When the system changes to this state as the result of a command, the terminal from which the command was executed becomes the system console. (The terminal device is linked to /dev/syscon.)
This is the only system state that does not require the existence of a properly formatted inittab file. If this file does not exist, then by default, the only legal system state that init can enter is the single-user state.
The set of filesystems mounted and the list of processes killed when a system enters state s are not always the same; which filesystems are mounted and which processes are killed depends on the method used for putting the system into state s and the rules in force at your computer site. The following paragraphs describe state s in three circumstances: when the system is brought up to s with init; when the system is brought down (from another state) to s with init; and when the system is brought down to s with shutdown.
When the system is brought up to s with init, the only filesystems mounted are / (root), /var, and /stand. (Two filesystem types, /proc and /dev/fd, are also mounted.) Filesystems for users' files are not mounted. With the commands available on the mounted filesystems, you can manipulate the filesystems or transition to other system states. Only essential kernel processes are kept running.
When the system is brought down to s with init, all mounted filesystems remain mounted and all processes started by init that should be running only in multiuser state are killed. Because all login-related processes are killed, users cannot access the system while it is in this state. In addition, any process for which the utmp file has an entry will be killed. This last condition ensures that all port monitors started by the SAC will be killed and all services started by these port monitors, including ttymon login services, will be killed. (The SAC is a daemon that maintains the port monitors on a server computer in the state specified by the system administrator.) Other processes not started directly by init (such as cron) remain running.
When you change to s with shutdown, the system is restored to the state in which it was running when you first booted the computer and came up in single-user state, as described above.
2 Multiuser state. In this state, filesystems are mounted and multiuser services are started. Multiuser is the default state upon powerup if the NFS package has not been installed.
3 Networking state. Used to start the Network Filesystem (NFS), mount remote resources, and offer your resources automatically. Networking is the default state upon powerup if the NFS package has been installed. Even if the Unlimited User Upgrade package is not installed on your computer, the system will initialize to state 3 by default and will allow up to two users.
5 Firmware state. For the Intel386 family of processors, init 5 or shutdown -i5 only brings the computer to the shutdown state (state 0). Refer to your computer manufacturer's documentation for information on how to access the firmware (BIOS) for your computer.
6 Stop and reboot the operating system to the state defined by the initdefault entry in /etc/inittab. If necessary, configure a new bootable operating system before the reboot. (The rc6 procedure is invoked for this.)
Q or q Re-examine the /etc/inittab file.

System states


NOTE: In addition to these defined states, you can define system state 4 or system state a, b, or c. System state 4 is provided strictly for your convenience; it is not used in the delivered operating system. Similarly, system states a, b, and c are pseudo-states that can be used to run certain commands without changing the current system state. Process those /etc/inittab file entries assigned the a, b, or c system state. These states are supported by init but, like system state 4, are not used in the delivered system.

As delivered, the system enters the default system state on powerup. Filesystems are mounted, daemons started, and system services are made available. These activities are performed by the rc2(1M) script. Networking is started by the rc3(1M) script.


CAUTION: Some system administration tasks, however, should never be performed except in single-user state. For example, never change your system's configuration while users are accessing it because data may be lost. By changing the system to single-user state, you can be sure you are the only person logged on to the system and, therefore, that it is safe to perform critical system administration tasks, such as changing the system configuration.


Next topic: System state directories
Previous topic: System state 3 processes

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004