Linux boot process
* Load BIOS, check hardware information;
* Read and execute the boot loader of the MBR in the first boot device;
* Run grub boot load kernel;
* Kernel boot/sbin/init program;
* Init system initialization: Determine the default runlevel, trigger RunLevel events, run/ETC/RC.D/RC, execute/etc/rc.d/rc.local, load terminal or X-window interface.
Linux Run Level
-Default of 7 operating levels:
* 0--Off the machine
* 1--Single user mode
* 2--CLI Multi-user (network not supported)
* 3--CLI Multi-user full mode
* 4--unallocated
* 5--gui Multi-user mode
* 6--Restart
Switching the Run level
-grep ': Initdefault '/etc/inittab
[[email protected] fdq]$ grep ': Initdefault '/etc/inittab
Id:5:initdefault:
-runlevel//View current Run level
-init n//switch to the specified run level
Initializing the configuration script
-/etc/rc.d/rc.sysinit--Executed by the/etc/init/rcs.conf call; set hostname, network parameters, character set, SELinux status, file system, etc.
Other initialization configurations
-/etc/rc.d/rc--Executed by the rc.conf call, and the corresponding service is loaded and terminated according to the run-level parameters.
-/ect/rc.d/rc.local--Executed by the RC call, save the user-defined command to run automatically after power-on.
Other major profiles
-Which terminals are enabled:/etc/init/start-ttys.conf
-which services are enabled and closed at each runlevel:/etc/rc.d/rcx.d/*
-whether to enable console Ctrl+alt+delete
Restart:/etc/init/control-alt-delete.conf
1-1-3] Linux startup process