Objective:
As a qualified operation and maintenance personnel, the system start-up process we need to keep in mind, this article does not delve into, only a general understanding of the CentOS6 start-up process.
A picture to show you how the CentOS6 started.
650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160314/1457914609577772.png "title= "1457914609577772.png" alt= "Blob.png" style= "white-space:normal;"/>
Note: Image magnification looks better
Detailed steps in each stage
Post: A simple test of the BIOS on each hardware when the computer is powered on, testing the integrity of each hardware
Bootsqunce: After the power-on self-test according to the user's own manually set the interface or BIOS default settings in turn check firstboot,secondaryboot ... Whether the defined interface can boot the system
Mbr:master boot record, the master boot recording, is the first sector of the hard disk, and the MBR contains important information such as bootloader, partition table, etc.
Bootloader: Boot program, through the MBR found in the Bootloader to boot the system, CentOS6 Bootloader is Grub Legacy, in fact, here Bootloader is just the Bootloader of Stage1, We'll show you later.
KERNEL-->INTRAMFS: Select the kernel through bootloader, after the kernel is self-extracting, the decompression Initramfs loads the additional driver and mounts it as a root partition in read-only mode.
The/sbin/init:init program is the system initialization program, has the vital function, can provide the setting system time, detects the load file system and so on, we will explain in detail later, after the system initialization completes the switch root partition
Mingetty-->login:mingetty is responsible for starting the virtual terminal and then invoking the login program for the user to log into the system
The bootloader in CentOS6
CentOS6 default to use Grub legacy for bootloader, a picture takes you to understand the boot process of grub simply
650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160314/1457915978488640.png "title= "1457915978488640.png" alt= "Blob.png" style= "font-family: ' italics ', ' italics _gb2312 ', Simkai;font-size:20px;white-space: normal; "/>
Note: Image magnification looks better
Detailed steps in each stage
The bootloader in the STAGE1:MBR partition is only 256 bytes, which obviously does not directly drive our kernel, in fact the bootloader in the MBR is just the stage1 (first stage) of the Grub legacy and can boot to the presence of the GRUB legacy partition
Stafe1_5:stage1 does not know the drive of the partition where the grub legacy resides, so there are some common file system drivers in the sector behind the MBR that can be stage1 booted into Stage2
Stage2: The location of the real grub core file, which contains the Grub legacy configuration file, can be stage2 by the real loading kernel
Init program in CentOS6
in fact, in the CENTOS6 init program is not the traditional sysvinit (SYSV UNIX init), the use of upstart instead of SYSV, but CentOS6 for the convenience of the administrator's operation, upstart many features are not highlighted, For example, the start-up service should be initctl start JOB in the native upstart system, but CentOS6 is not supported because the service startup script in CentOS6 is still provided in the original SYSV, so we use SYSV The init diagram is about the CENTOS6 system initialization process.
650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20160314/1457917617175729.png "title= "1457917617175729.png" alt= "Blob.png" style= "font-family: ' italics ', ' italics _gb2312 ', Simkai;font-size:20px;white-space: normal; "/>
Note: Image magnification looks better
Detailed steps in each stage
/sbin/init: Kernel self-extracting load Ramfs starts init start system initialization
/ETC/RC.D/RC: Get the corresponding RunLevel and configuration by reading/etc/inittab and/etc/init.d/
/etc/rc.d/rc.sysinit: Initializes the system by initializing the script, for example: Setting the system time, detecting the automatic Mount file system, activating Udev and SELinux ....
/etc/rc.d/rc*.d/: In the corresponding running level of the directory, start the S Start program, close the K-Start program
Mingetty-->login: Start virtual terminal after initialization, then call login program for user login
Summarize:
Although the writing is not particularly detailed, but can give you a general understanding of the CentOS6 start-up process, the Grub legacy part will take the time to write a corresponding blog detailed description.
This article is from the "The Anyisalin blog" blog, please be sure to keep this source http://anyisalin.blog.51cto.com/10917514/1750754
Talk about CentOS6 's startup process.