Linux system startup process
One of the features of the Linux kernel: use buffering and caching to speed up access to files on disk
System initialization process (Kernel level): Post-->bootsequence (BIOS)-->bootloader (MBR)-->kernel (RAMDisk)-->rootfs (readonly)-- >/sbin/init
Kernel functions: Process management, memory management, network protocol stack, file system, driver, security function
Part:
Core file:/boot/vmlinuz-version-release
RAMDisk
CentOS 5:/boot/initrd-version-release.img
CentOS 6,7:/boot/initramfs-version-release.img
Mount the real root file system after exiting
A temporary root file system is loaded after the kernel is started (where only a specific driver is created, and is built dynamically)
Module file (drive):/lib/modules/version-release
(/lib/modules/3.10.0-229.el7.x86_64/kernel/kernel[fs])
The start-up process for the CentOS system
POST
(Power-on self-Test) (Code on the motherboard read-only ROM:CMOS:BIOS:Basic Input and Output system to detect the existence of each hardware)
Rom+ram
-->boot Sequence:
In order to find each boot device, the first device that has a boot program is the device to be used for this boot
Bootloader: Boot loader, program
Windows:ntloader
Linux:
Lilo:linux Loader
Grub:grand Uniform Bootdoader
Grub 0.x:grub Legacy
Grub 1.X:GRUB2
Function: Provides a menu that allows the user to select the system to be launched or a different kernel version: Load the user's selected kernel into a specific space in RAM, unzip, expand, and then transfer control of the system to the kernel;
--Mbr:master Boot Record
512bytes:
446bytes:bootloader
64bytes:fat partition Table
2BYTES:55AA indicates that the MBR is valid or invalid
-->grub:
Bootloader: The first stage
Partition: Phase 1.5, filesystem-driven (role? )
Partition:/boot/grub Second Stage
-->kernel:
Self-initialization:
Detect all devices that can be identified
Load the hardware driver (it is possible to load the driver with RAMDisk)
Mount the root file system in read-only mode
The first application running the user control:/sbin/init
-->init Program Type:
CentOS 5:SYSV Init
Configuration file:/etc/inittable
CentOS 6:upstart
Configuration file:/etc/inittable
/etc/init*.conf
CentOS 7:SYSTEMD
Configuration file:/usr/lib/systemd//etc/systemd/system/
This article from "My Heart _ Sunny" blog, please be sure to keep this source http://wyg11.blog.51cto.com/11253863/1783115
Linux system startup process