This document is intended to brief us about the Linux booting procedure.
The /etc/inittab file is used to set the default run level for the system. Applications/services that are started by init are located in the /etc/rc.d folder. Within this directory there is a separate folder for each run level, eg rc0.d, rc1.d, and so on.
There are 7 Runlevel in linux 0 to 6 explained below,
0 - /etc/rc.d/rc0.d - This is system HALT - this run level will shutdown the system.
1 - /etc/rc.d/rc1.d - This is single user mode - booting with this runlevel will boot with basic command line interface without loading network modules/graphics. Doesn't allow non-root login.
2 - /etc/rc.d/rc2.d - This is multi-user mode - When booting with runlevel 2, network module is not loaded.
3 - /etc/rc.d/rc3.d - This is multi-user mode with network - Boots with network modules and allows multi user modules. System will be booting normally.
4 - /etc/rc.d/rc4.d - This is still undefined/not usable can be user defined.
5 - /etc/rc.d/rc5.d- This is similar to the init level 3 which boots with X11 graphic interface.
6 - /etc/rc.d/rc6.d - This is reboot - When runlevel 6 is called it will reboot the system.
Init is the program that bring up all the other processes. It runs as a daemon and Process ID for Init is 1. This is the first process to run on a linux/unix machine.
You can provide which Runlevel the system will boot with as a kernel boot parameter.
No comments:
Post a Comment