Linux-grub START Process

Source: Internet
Author: User

One, Linux The system consists of the kernel and root boot files, and the kernel and the root are each tasked with different tasks.

First introduce the kernel and root files, root files are generally stored in the/lib64, mainly by the library files, programs composed

The library also contains: function sets, procedure calls, function calls

For everyone to explain the function and composition of the kernel:

The kernel is mainly composed of:

(1) Core document:/boot/vmlinuz-version number-issue number (directory name)

Ramdisk :

centos5/boot/initrd- version number-release number. IMG

centos6/boot/initramfs- version number-release number. IMG

The following is a detailed command to use, here just to display kernel file parameters with #ls/boot.

#ls –lh/boot/vmlinuz-2.6.32-504.e16.x86_64 View File Size

#file/boot/vmlinuz-2.6.32-504.e16.x86_64 View File Types

As shown in 9.5-1:

650) this.width=650; "title=" 9.5-1.jpg "src=" http://s3.51cto.com/wyfs02/M00/72/AA/ Wkiom1xqtvxcwexgaad5tyn8qng781.jpg "alt=" Wkiom1xqtvxcwexgaad5tyn8qng781.jpg "/>

(2) module file storage location/lib/modules/version number-the release number (also the directory), 9.5-2 shows:

The reference command is #ls/lib/modules/2.6.32-431.el6.x86_64/

Where the kernel metadata in the kernel, we look at, where the part of the circle is the module file.

650) this.width=650; "title=" 9.5-2.jpg "src=" http://s3.51cto.com/wyfs02/M02/72/A7/ Wkiol1xqt6ea8tpiaaihtmzzxni411.jpg "alt=" Wkiol1xqt6ea8tpiaaihtmzzxni411.jpg "/>

Note: The kernel does not drive the hard drive, the kernel needs to install the hard drive, we need external auxiliary mechanism, the drive required on the hard disk to boot to the virtual hard disk file, give the memory of the virtual driver, 9.5-3:

650) this.width=650; "title=" 9.5-3.jpg "src=" http://s3.51cto.com/wyfs02/M00/72/A7/ Wkiol1xqt-wtvbttaadw9-b0ll8174.jpg "alt=" Wkiol1xqt-wtvbttaadw9-b0ll8174.jpg "/>

Second, let's talk about it for the next moment.

(1) Centos system start-up process

A,post : Power-on self-test;

ROM : CMOS (Chip)- à controlled by the CPU

BIOS : Basic input/output system (boot hardware driver)

Rom+ram Value Priority Rom->ram Sequencing

b,boot sqeuence : Boot order hard disk, CD-ROM, U disk, etc.

Bootloader : Boot loader, program

Function: Provide a menu, select the System or kernel version to start, then install the selected kernel in the specified memory space to unzip the deployment, and then transfer the leadership to the kernel.

Windows : Ntloader

Linux :

LILO : Linux Loader

GRUB : Grand Unformbootloader (Support Windows Linux Interactive Start )

Grub 0.x:grub Legacy

Grub 1.X:GRUB2

View Grub version information, viewing commands #rpm –q Grub as shown in 9.5-4:

650) this.width=650; "title=" 9.5-4.jpg "src=" http://s3.51cto.com/wyfs02/M02/72/AA/wKiom1XqthqTL-cPAABlEQ_ Cmie840.jpg "alt=" Wkiom1xqthqtl-cpaableq_cmie840.jpg "/>

C , MBR (master boot Record) :

446 : bootloader ( loader )

- : Disk partition table (FAT)

2 : 55AA ()

D,grub ( master boot Record )

#ls/boot/grub View Grub Parameters 9.5-5 as shown:

650) this.width=650; "title=" 9.5-5.jpg "src=" http://s3.51cto.com/wyfs02/M02/72/A7/ Wkiol1xqugocestbaaewix5yvho643.jpg "alt=" Wkiol1xqugocestbaaewix5yvho643.jpg "/>

bootloader : 1st Stage Loading

1.5 stage to help grub identify file systems

Disk : 2nd stage Read Partition

E, Kernel:

after the permission is obtained, it initializes itself, loading the hardware driver "kernel to load the root file read-only". Then run the /init file:/sbin/init

Init Program Type:

sysv:init CentOS 5 Standard -- configuration file /etc/inittab

Upstart : Init CentOS 6-- configuration file /etc/inittab,/etc/init/*.conf

Systemd : Virtual initialization, fast boot apple mechanism CentOS 7--

configuration file /usr/lib/system/system,/etc/system/system

Kernel: ramdisk- à Ramfs Change Evolution

Centos 5 : INITRD Tool Program: MKINITRD

Centos 6 : Initramfs Tool Program: Mkinitrd,dracut

Therefore, the system initialization flowchart is:

Post->bootsequence->bootloader->kernel->rootfs->init


Linux-grub START Process

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.