CentOS Operating system Boot process

Source: Internet
Author: User

1, Hardware boot boot

Power on, BIOS power-on self-test, find boot media, found in boot media mbr.mbr is the first sector of the first partition of the boot media (such as a hard disk), with a size of 512 bytes. The first 446 bytes are bootloader (CentOS is grub), followed by 64 bytes is the partition table, the last 2 bytes is used to verify, we call it 55AA.

2. Grub Boot Program

When the MBR is found, the boot program for GRUB is found. Grub boot is divided into two stages stage1 and Stage2,stage1 are directly inside the bootloader, stage2 relatively large is placed in the file system inside. For new file systems (such as EXT4), Stage2 is not recognized, so the Stage2 file system can be identified by means of an intermediate bridge stage1_5. After Stage2 executes, it parses the configuration file grup.conf to find the location of the kernel and kernel image (INITRD).

3. Kernel Boot Stage

After the kernel and kernel images (INITRD) are found, the control is taken over, the kernel contains only the most basic hardware drivers, and the other hardware drivers are in INITRD. So INITRD released into memory, temporarily formed a read-only file system, in this read-only file system, the kernel to execute the temporary file system inside the init process, load a variety of hardware drivers, the completion of the kernel again mount the real root filesystem, the kernel has taught the controller/sbin/ Init process.

4. System initialization phase

/sbin/init process is the parent process of all other processes of the system, after taking over the control of the system, first read the/etc/inittab file to execute the corresponding script to initialize the system, such as setting up the keyboard, font, loading module, setting up the network and so on. Mainly include

1) Execute the System initialization script (/ETC/RC.D/RC.SYSINIT), basic configuration of the system, mount the root file system and other file system in read and write mode, and make the operation level determination and the corresponding service start up.

2) Execute the/ETC/RC.D/RC script, which defines the order in which the service starts with K after S, and the service status of each run level is placed in the/ETC/RC.D/RC*.D (*=0-6) directory, all files are pointed to/etc/ INIT.D a symbolic link to the corresponding file.

3) Execute user-defined bootloader/etc/rc.d/rc.local

4) After completing all the system startup tasks, Linux will start the terminal or X-window to wait for the user to log in.


This article is from the Linux Technical Exchange blog, so be sure to keep this source http://9678130.blog.51cto.com/9668130/1769698

CentOS Operating system Boot process

Related Article

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.