1. System guiding process
Step 1: firmware fireware (CMOS/BIOS) -- POST some self-check (not related to the operating system)
This step mainly checks whether hard disks and other hardware work properly.
CMOS: is solidified on the motherboard, detailed: http://school.cfan.com.cn/news/cfannews/2007-06-06/1181111816d66664.shtml
BIOS: BIOS is the firmware operation interface.
CMOS is used to save hardware parameter information, while BIOS is used to modify these parameters. Simply put, BIOS is used to set CMOS parameters, the parameters and results set by BIOS are saved in CMOS, that is, "we modify the CMOS parameters through the BIOS setup program". For example, when we need to modify the system startup sequence, we use the BIOS to set "optical drive> hard drive> soft drive" to start in sequence, so the data in this startup sequence is saved in CMOS.
Hwclock hardware clock (fixed in firmware)
We can see that my system clock is different from the hardware clock. Next we will modify the system clock and hardware clock.
If hwclock is correct
You can use hwclock-help to view parameters.
Step 2: BootLoader (GRUB) -- load the kernel
MBR (mast boot record): Located in the first sector of the first cylindrical Disk
For MBR details see: http://blog.csdn.net/hbrqlpf/article/details/3007863
Detailed information about the system kernel is recorded in the/etc/grub. conf configuration file. Let's take a look.
The system kernel version is 2.6.18.
2: indicates the main version number.
6: indicates the next version number (odd number indicates the test version number)
18: Last Version
The Kernel File Path root = LABEL =/rhgb quiet initrd/initrd-2.6.18-128.e15.img is also documented later
Step 3: After loading the Kernel (Kernel)-driver hardware
Start Process (init)
The system starts the init process first. After the process is started, it reads the inittab file and runs the default running level to continue the boot process. In Linux, init is the first process that can exist. Its PID is always 1, but it must be responsible for a more advanced function: the Kernel scheduler (Kernel scheduler) with a PID of 0 to obtain the CPU time.
Orphan process: if a child process still exists after the parent process dies, the child process is called an orphan process (after the system detects the orphan process, init is used as the parent process ).
Zombie Process: A child process is called a zombie process if its parent process does not know its death.
Step 4: Read the execution configuration file/etc/inittab
0: Indicates shutdown.
1: indicates the single-user mode (only the root account, similar to the Windows security mode, with no graphical interface)
2: multi-user mode on the Character interface, no NFS service
3: multi-user mode on the Character interface with NFS service
4: to be used (Custom Level)
5: Graphical multi-user mode (default system level)
6: restart
View the running level of the current system)
Switch the running level (init level)
2. inittab file profiling
1. All entries in the inittab are in the following format:
Id: run-levels: action: process
Id: identifier, generally two-digit letter
Run-level: Specifies the running level. You can specify multiple
Action: Specifies the running status
Process: Specifies the script/command to run.
2. Common Values of action
Initdefault: Specifies the running level of the default system startup (for example, you can modify the running level 2 in it and enter the character interface after the system starts)
Sysinit: the system starts and runs the specified command in process.
Wait: Execute the command in process and wait until it is finished before executing other commands
Once: Execute the command in process without waiting for it to end
Ctrlaltdel: Press ctrl + alt + del to execute the command specified by process
Powerfail: When a power error occurs, run the command specified by process without waiting for it to end.
Powerokwait: Execute the process specified command when the power supply is restored
Respan: once the process command is terminated, it is re-run.
3. Various levels of service program scripts
The/etc/rc. d/init. d directory contains service program scripts of various running levels.
/Etc/rc. d/rc [0123456]. d respectively stores the symbolic links of the corresponding running-level service program scripts and links them to the corresponding scripts in the init. d directory.
K indicates killing the process.
S indicates starting the script process.
The numbers after K and S represent the execution sequence.