Linux system startup process

Source: Internet
Author: User


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

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.