Maybe in the near future, Linux will replace Windows and become its position. Linux is becoming more and more popular in today's society. Do you know about Linux systems? Are you an application of Linux? This article introduces you in detail how to start a Linux system, which plays a certain role in learning how to start a Linux system.
To sum up, the entire linux boot process.
◆ 1: after starting the power supply, the first step of the host is to query BIOS (full name: 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 displayed on X terminal)
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.
◆ Mount/proc. This file is a special file with a size of 0 because it is in the memory. It is best not to delete the content.
◆ According to the kernel boot result/proc/sys/kernel/modprobe. Start detection of peripheral devices.
◆ Load the User-Defined module/etc/sysconfig/modules /*. Modules
◆ Read/etc/sysctl. The conf file sets the kernel.
◆ Set the time, terminal font, hard disk LVM or RAID function, and perform disk detection with fsck.
◆ Record the boot status to/var/log/dmesg. (You can run the dmesg command to view the result)
◆ 7: OK. Next, start the system service. Different run-levels may start different services. To/etc/rc. In the d directory, different levels have different directories. For example, if the 3 mode is enabled, there will be rc3. D directory, which stores the service. In this example, start indicates that the instance is started, and kill indicates that the instance is not started. A number indicates the startup sequence. The smaller the number, the earlier the startup.
Note that they are all connected to etc/rc. D/init. D/related files in the directory. Therefore, you can use "/etc/rc" to manually start a service. D/init. D/start a service. On the contrary, we can also send a service ln (link command) to different run-level directories. Remember to add S or K + numbers.
◆ 8: after reading the service, the Host reads/etc/rc. D/rc. Local file. Therefore, if you need to start the system, you can write a script or command here. It doesn't have to be as troublesome as above. It is also convenient to delete it later.
In this way, the system can finally start shell with peace of mind. We have handed over control. We can do whatever we want. It is best to develop a good habit. Do not Log On As A root user at ordinary times. Learn how to boot a Linux system and learn about Linux.
- Describes how to create a log server in Linux and vro.
- Linux practical command-pv: MPS queue Viewer
- Compile dtAgeiaPhysX in 64-bit Linux
- Battle: Linux Desktop Mint 8 and Windows 7
- Simple Theory Linux ReiserFS system analysis features and results