Translating boot sequence into Chinese is the guiding sequence and Starting sequence. It is an important knowledge point for learning Linux and a basic knowledge point. Take notes.
Linux boot sequence:
1. Load BIOS (hardware information)
Load BIOS (hardware information), BIOS:Basic Input Output System (Basic Input Output System), yesA group of hard drives solidified on a ROM chip on the motherboard of the computerProgramIt stores the most important computer input and output programs, system settings, post-boot self-check programs, and system self-start programs. For details, see Baidu encyclopedia.
2. Read MBR's config to find out the OS
Read the MBR configuration to find the operating system to be started. MBR: Master Boot Record (the Master Boot Record of the hard disk) consists of three parts: the Main Boot Program, the hard disk partition table, and the hard disk effective mark.
3. Load the kernel of the OS
Load the kernel of the operating system. Note that there is a procedure to select an operating system. Grub (the grand uniied bootloader ),Is the implementation of the multi-boot specification, which allows you to have multiple operating systems in the computer at the same time, and select the operating system you want to run when the computer starts. Grub can be used to select different kernels on the operating system partition or to pass startup parameters to these kernels.
4. INIT process starts...
Start the first process init
5. Execute/etc/rc. d/sysinit
After the INIT process starts, it will execute the sysinit command under the/etc/rc. d directory.
6. Start other modules (ETC/modules. conf)
Other modules can be used only after these modules are loaded, such as the network and optical drive.
7. Execute the run level scripts
Run level: After the Linux kernel is started, subsequent start operations are performed hierarchically. It can be started at any level, and there is no direct relationship between each level, and the programs started between different layers are different.
Run level:
0)-system shutdown status/Etc/rc. d/rc0.d/
1)-single-user working status/Etc/rc. d/rc1.d/
2)-Multi-user status (no NFS)/Etc/rc. d/rc2.d/
3)-Multi-user status (with NFS)/Etc/rc. d/rc3.d/
4)-the system is not in use/Etc/rc. d/rc4.d/
5)-graphic interface/Etc/rc. d/rc5.d/
6)-The system is shut down normally and restarted./Etc/rc. d/rc6.d/
8. Execute/etc/rc. d/rc. Local
Run the/etc/rc. d/rc. Local script. RC. Local scripts are mainly used for self-startup.
9. Execute/bin/login
Run/bin/login to display the system logon interface.
10. Shell started...
We can simplify this step by the following steps:
1. BIOS Initialization
BiOS Initialization
2. Boot Loader
1st stage-small, resides in MBR or Boot Sector
2nd stage-loaded from boot Partition
3. kernel Initialization
Kernel Initialization
4. init starts and enter desired run level by executing:
Initialize the startup and run the following command to execute the run level
/Etc/rc. d/rc. sysinit
/Etc/rc. d/RC and/etc/rc. d/RC ?. D/
/Etc/rc. d/rc. Local
X Display Manager if appropriate
Based on the six concepts of bios, MBR, grub, kernel, init, and run level, some people divide the startup step into these six parts. For Linux Startup, you only need to carefully understand these six concepts.
Refer:
Shangxuexiang technology is a simple and pleasant Linux video tutorial
Red Hat rh133 official tutorial
6 stages of Linux boot process