The startup process of Linux operating system--student homework

Source: Internet
Author: User

First of all, it is not urgent to start the process, first of all, the Linux operating system related knowledge

One: Linux components: Kernel + root (/) file system

1) Kernel:

The location of the CENTOS6 location is "vmlinuz-2.6.32-573.12.1.el6.x86_64" in the/boot directory

"2.6.32" is the version number; "573.12.1" is the release number. The kernel is responsible for core memory management, process management, network protocol stack, file system, driver, security function. The Linux kernel is a single-core design, but he supports multi-modular dynamic loading and unloading. That is, do not shut down the case can be put on the loading module. The Linux module files are stored in the/lib/modules directory. It has the same version number and release number as the kernel file.

[[email protected] lib]# ls modules/2.6.32-573.12.1.el6.x86_64

2) root (/) file system

In fact/This symbol does not exist at all. So how do we know what a root file system is? In fact, we consider the provisions. For example, we can think of this as a root, as long as we include/bin/sbin/boot/etc/dev/lib these files in a directory.

3) Computer motherboard

Computer motherboard in the factory, the manufacturers to the motherboard wrote a program, stored in the motherboard rom inside. The BIOS that we are familiar with. The BIOS is in English "Basic Input Output System" abbreviated Words , the Chinese name is "basic input and output system" after translation. In fact, it is a set of cured to ComputerinsideMotherboardpreviousROMChipon theprogram , it holds the most important basic input and output program of the computer, the post-boot self-test program and the system self-launcher program, which can read and write the specific information of the system Setup from CMOS. Its main function is to provide the lowest, most direct hardware setup and control for the computer .

Two All right, that's it. We can continue to talk about the start-up process. First of all, let's first say what the difference between the system start and not start is what it looks like. First of all, when the shutdown, all the files, including the kernel, and the file system is written, is silent performance for burning on the hard disk symbols, the image is that they are sleeping. In the start of the system, the first is the kernel process is activated state, that is, they are called into memory, CPU hardware in the power of the drive over and over again to write the process in the kernel. The kernel can also be used by the driver, any time any call to calculate the various files including the hardware files under Dev. And we have to say that the start-up process, that is, understand how the computer from the static state, after the power to achieve a variety of functions of the working state.

Step A: When we press the power button, the motherboard is plugged in. After the motherboard is powered on, the BIOS program on its own ROM starts to detect if the interface of each hardware is properly connected. such as memory, CPU, network card, and so on. If there is hardware failure, the general board will make audible alarm. With a laptop, I used a desktop computer 11 years ago, which is often heard. Most of this is because the dust affects the memory-bar reads.  650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0063.gif "alt=" J_0063.gif "/>--this process is called Power Self test. Test (POST)

B Step: Because the hard disk on the motherboard, so in fact, the hard disk is also early power, that is, has turned up. So, when the motherboard self-test, the next step is to find the device may be equipped with boot loader, such as hard disk, CD, u disk. So, when we use a CD-ROM, or a USB flash drive to install the system, will be advanced BIOS to the CD-ROM, or USB drive to the beginning of the detection position. Suppose we have now installed the system, this is a normal boot operation. So, the first general we will put the hard disk in the first place to be detected. When the motherboard detects our "0 cylinder, 0 head, and one sector" =MBR, it initiates the boot program we wrote to the MBR. If it's a phone, it's usually the Lilo boot program. Of course, we're talking about a Linux server or a virtual machine. MBR sector writes are generally the Grub boot program.

C Step: Because the MBR sector only 446 bytes can be used, not enough grub to complete boot operating system tasks to use. So when grub is activated, the first thing he does is boot the GRUB program outside of the MBR sector. GRUB2 This program is stored in the boot directory. In this way, grub is freed from the limitations of the MBR sector and can provide richer and more powerful functionality. But his main role is to boot the kernel.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/79/16/wKiom1aIqEGz4ZJeAAAha7qbLAU018.png "style=" float: none; "title=" Image 026.png "alt=" Wkiom1aiqegz4zjeaaaha7qblau018.png "/>

He will eventually give the user a choice to start the operating system interface 1

Step d: When the operating system is selected, the kernel of the operating system takes over the power stick from the grub hand. Kernel after power, first detect all the recognizable hardware, (e-step) and load the hardware's drive device. Then mount the root file system as read-only. and run the first application:/sbin/init Since then, the machine has officially entered the working state.

Step e; This step is not necessary, but most of them will be. The kernel encountered a problem before loading the hardware driver. Because the root file system is on disk (although the boot partition is also on disk, he has been driven by grub boot). To read the root file system, you first have to drive the disk. The load driver must have a root file system. It was as if I had to ask for the key, but my key was locked in the house. So at this point, we need to find the lock company, to get a false key, open the door, get the real key, we will regain control of our own home. And who is this "unlocking company"? That is also in the boot partition with the RAMDisk CENTOS6 called Initramfs-2.6.32-573.12.1.el6.x86_64.img. If your is not a CENTOS6 system, then you can find the. img End file in the boot directory. He will create a temporary root file system, which is only for disk, load disk drive. It is only the door, until you get the real key. When there is a driver, you can load the real root directory, the Rhizoids directory will automatically give way.

OK, another job is finished ... Read a spell, sleep "mony-mony-home."

The startup process of Linux operating system--student homework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.