This older method of system initialization is still in wide use. Moreover, for compatibility reasons, much of its functionality is incorporated into upstart and systemd.
The method described on this page originated in a Unix version from AT&T Bell Labs, called "System V" where the "V" is Roman-numeral 5. "System V" is often abbreviated "SysV" and so that is what we use to distinguish this mechanism from the upstart and systemd mechanisms.
After the Linux kernel initialization is completed, the init script executes the program /sbin/init.
/sbin/init reads the file /etc/inittab which determines a series of scripts to be run to complete the initialization process:
0 = halt
1 = single-user mode
6 = reboot
Runlevels 2-5 are used for various forms of multi-user mode; the exact meaning of these runlevels differs among distros.
The initial runlevel is specified in /etc/inittab.
(The processing in this step can also be rerun by the system administrator after the boot process is finished in order to change the run level from the previously set level to a new run level. The administrator does this by running the command /sbin/init X (where X is the runlevel as above). Note that this program (/sbin/init) is the same program that runs during system initialization. If /sbin/init is run as process ID 1 then it does all of the processing described on this page. If run as any other process ID it simply sends a signal with the new runlevel to process ID 1 (the "real" init process) which runs the RC scripts as described in this step. In the case of the system administrator resetting the runlevel, the first step is to run the scripts in the directory /rc.d/rcX.d (where X is the old runlevel) whose name begin with "K". Each of these scripts is passed the parameter, "stop". These are actually symbolic links to files in /etc/rc.d/init.d.) This stops the programs that were running at the previous run level.
Next the scripts in the directory /rc.d/rcX.d (where X is the new runlevel) whose name begin with "S" are run. Each of these scripts is passed the parameter, "start". These "S" files are also symbolic links to files in /etc/rc.d/init.d. This starts the programs that are to run at the new run level.
Note: It would be wasteful or even harmful to stop and then restart a program that is needed on both the old and new runlevels. For that reason, this condition is detected and the stop and start steps are skipped programs that are on both runlevels.
Next: Login