Article Title: Notes for interpreting Linux boot. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
To tell the truth, I have always looked down on boot. I can press the power supply and then slide back to use it. Why should I consider this process. However, later I found that if I did not learn linux, it would be a huge obstacle for future study. Therefore, you must learn it several times. Online boot describes many linux boot processes. However, if you do not write it again in your mind, you can only know about it. In order to achieve the unity of man and sword, the sword is both me and me. Review it.
To sum up, the entire linux boot process.
· 1: After the power supply is enabled, the first step of the host is to query the BIOS (basic input/output system) information. Understand the hardware status of the entire system, such as CPU, memory, video card, and nic. Well, windows computing and it are one. No.
· 2: Next, the Host reads the boot loader from MBR (the first sector of the hard disk. This is important. It is said that troubleshooting will take this test and give a bad loader and ask you to correct it. Windows does not support the partition format of linux. Therefore, use windows boot. Ini cannot find the linux system. Generally, windows and linux are installed first, and grub is used as the boot loader. Two words: worry-free! Because linux is not as stingy as windows. Grub supports windows partition format.
· 3: After the Host reads the boot loader, it will read the information and know who is waiting for it. If the host wants to access the linux system, read to the linux core is loaded into the memory in the/boot file directory. Start the next analysis journey.
· 4: OK. Who is the first running program? Is the/sbin/init program. If you don't believe it, you can use the top program to check whether the PID is 1 or not. It is the ancestor of all things. I am short for it as the nvwa Niang (not like Adam and Eve ).
· 5: init first looks for the start level (run-level ). Because the startup levels are different, the running scripts (that is, services) are different. The default levels include the following:
0-halt (direct system shutdown)
1-single user mode (single user mode, used for system maintenance)
2-Multi-user, without NFS (similar to 3 mode, but NFS service is missing)
3-Full multi-user mode (Full mode, but text mode)
4-unused (system reservation function)
5-X11 (similar to 3 mode, but X terminal display)
6-reboot (reboot)
(Do not select 0 or 4 or 6. Otherwise, the system is improved)
· 6: OK. After the system knows its startup level, the next step is not to start the service, but to set the host runtime environment first. The read file is/etc/rc. D/rc. Sysinit file. Which environments should I set?
· Set the network environment/etc/sysconfig/network, such as the host name, gateway, IP address, and DNS.
[1] [2] Next page