Table of Contents Previous Chapter Startup/Shutdown.


9 Startup/Shutdown.

9.1 Boot Phases.

This example of the output of System V style ps will help identify these processes.

9.2 Starting a boot.

9.3 BSD single-user mode vs. multi-user mode.

9.4 System V run levels.

# who -r
. run-level 2 Mar 5 15:32 2 0 S
Table 6: System V Run Levels 
Run Level  Names and Uses                                                                    
0          Powerdown state; conditions where it is safe to turn the power off.               
1          Administrative state.                                                             
s or S     Single-user mode.                                                                 
2          Multi-user mode; Normal operating state for isolated,                             
           non-networked systems.                                                            
3          Remote File Sharing (RFS) state. Alternative state for networking use. (Normal    
           multi-user state for OSF/1; other Sys V may use state 2).                         
4          User-definable state. (Also not normally used; state 2 used instead).             
5          Firmware state; Used for some types of maintenance on some systems.               
6          Shutdown and reboot state; used to reboot the system from some other running      
           state (s, 2, 3 or 4) to state 0 then immediately back to normal operating state.  

9.5 Initialization scripts.

The initialization scripts, usually written in Borne shell (BSD, System V) or Korn shell (AIX) perform the following tasks:

9.6 BSD rc files.

Here is an example of a BSD style /etc/rc.local file.

9.7 System V initialization files.

Here is an example of a simple initialization file, the /etc/init.d/lp file.

9.8 OSF/1 initialization files.

9.9 System V initialization

This diagram shows the process of initialization under System V style Unix.

9.10 Shutting down

(WARNING! Never just turn the computer off!)

# shutdown +60 "Shutting down for weekly backups"
# shutdown now "There's water coming through the ceiling"
# shutdown -g60 -iS
# shutdown -g0 -i0 -y

9.11 System crashes.

9.12 System won't boot.

Table of Contents Next Chapter