INIT(8)

NAME
init - the mother of all processes

SYNOPSIS
init

DESCRIPTION
init is the last stage of the boot process. It normally runs the automatic reboot sequence as described in the inittab(5), and then puts the system into multi-user operation by launching appropriate getty(8)'s so that people can log in. init may be passed parameters from the boot program to prevent the system from going multi-user and to instead execute a single-user shell without starting the normal daemons. The system is then quiescent for maintenance work and may later be made to go to multi-user by exiting the single-user shell (with ^D).

Upon receipt of a SIGHUP signal (sent either by the kill -HUP 1 or telinit q command), init will re-read the inittab(5) file. When a program is removed from the inittab(5), init will send a SIGHUP signal to the controlling process for the session associated with the line. For any new programs in the inittab(5), init executes the command specified in third field.

init will terminate multi-user operations and resume single-user mode if it runs out of processes to run or is sent a user defined signal 2 (USR2), for example, kill -USR2 1. If there are processes outstanding that are deadlocked (because of hardware or software failure), init will not wait for them all to die (which might take forever), but will time out after 30 seconds and print a warning message.

init will start multi-user operations if sent a user defined signal 1 (USR1), for example, kill -USR1 1.

init will cease creating new processes and allow the system to slowly die away, if it is sent a terminal stop (TSTP) signal, i.e. kill -TSTP 1.

init will terminate all possible processes (again, it will not wait for deadlocked processes) and reboot the machine if sent a terminate (TERM) signal, i.e. kill -TERM 1. This is useful for shutting the machine down cleanly from inside the kernel or from X when the machine appears to be hung.

When init is sent a quit signal (QUIT), it will do the same, except it will then halt the machine instead of rebooting it.

When shutting down the machine, init attempts to put the machine into runlevel r or h , and will try to run any programs for that runlevel before actually halting or rebooting the machine.

The role of init is so critical that if it dies, the system will reboot itself automatically. If, at bootstrap time, the init process cannot be located, the system will panic with the message

DIAGNOSTICS

process %s respawning too fast; disabled for %d minutes
    A process being started is exiting quickly each time it is started.

Init will sleep for 5 minutes ,

then continue trying to start the process .

out of memory parsing inittab
    init ran out of resources. This message will probably be followed by the system grinding to a complete stop in a somewhat less than graceful fashion.

"default inittab format error!"
    This is a catastrophe - init could not read the inittab(5) file, then discovered that the default inittab was garbled as well.

Sending processes the %s signal
    init is simply telling you what it's doing while changing runlevels.

out of memory insert_to_registrying %s
    Is another case where init has run out of resources. It means that the need(8) registry cannot be written to, and processes like rc(8) will not be able to properly record their state. The system will probably keep running, but will be unable to properly shut down.

process %d will not die -- trying drastic measures
    A process did not die when sent a hangup (HUP) or a terminate (TERM) signal, so init needs to try and kill it outright with a kill signal (KILL).

RUNLEVELS

b   When init starts, it does processes for this runlevel before it proceeds on to multiuser or singleuser. The b runlevel is for things like filesystem checks and mounting the filesystems that the systems really really wants for operation.

s   Single-user -- typically a one-time shell, exited with ^D

h   This halts the system.

r   This reboots the system.

m   Normal multiuser, with all needed daemons and gettys running.

SEE ALSO
inittab(5), rc(8), halt(8), reboot(8), shutdown(8), telinit(8)