CentOS Boot Brief process

Source: Internet
Author: User
Tags network function

CentOS Boot process:

Post--boot sequence--boot Loader---Kernel (Ramdisk)---rootfs---switch-------/sbin/init




POST: Power-up

After the computer is power-up, the CPU looks for the code on the ROM, and the process scans the computer's hardware. If everything works, go to the next step


Boot sequence: Select partition boot

The BIOS (boot input/output System) is stored on the ROM, which boots the first boot-enabled device based on the BIOS settings.


Boot loader: Boot loader

The first sector that exists on the disk holds the MBR (Master Boot record byte) occupying 512 bytes, with the front 446 bytes holding the boot loader. Boot loader in Linux is often grub,

The working modes used by GRUB are:

1 stage:bootload, load to 2stage.

1.5 Stage: The sector behind the MBR, which provides file system driven 2nd: Located under/boot/grub, loads the kernel.

2 stage: Located in/boot/grub


Kernel: Kernel Load

Kernel is a single-core design that integrates all functions into one program.

Kernel is loaded into memory and expanded to access the file system with the help of RAMDisk

After the kernel expands, it initializes itself:

1. Detection of all recognized hardware devices (possibly with RAMDisk)

2. Load the hardware driver

3. Mount the file system in a read-only manner

4. Running/sbin/init


/sbin/init: Start init to finish the final work

1.init calls its configuration file/etc/inittable


[Email protected] rc3.d]# Tail-10/etc/inittab

# Default RunLevel. The runlevels used is:

# 0-halt (do not set Initdefault to this)

# 1-single User mode

# 2-multiuser, without NFS (the same as 3, if you don't have networking)

# 3-full Multiuser mode

# 4-unused

# 5-x11

# 6-reboot (do not set Initdefault to this)

#

Id:3:initdefault:


0: Shutdown shutdown

1: Single User root user mode, no authentication, maintenance mode;

2. Multi-user mode (multi user), will start the network function, but does not start the NFS Maintenance mode

3. Multi-user mode, full function mode, text interface

4: Reserved mode: Not currently used for special purposes, but accustomed to use with 3 level features

5. Multi-user mode, full function mode, graphical interface

6. Restart, reboot


Mode to switch: Init # (0-6)


2. Initialize the system/etc/rc.d/rc.sysinit

(1) Set the host name;

(2) Set welcome information;

(3) Activate Udev and SELinux;

(4) Mount all file systems defined in the/etc/fstab file;

(5) Detecting the root file system and re-mounting the root filesystem in read-write mode;

(6) Set the system clock, by reading the hardware clock implementation

(7) Set kernel parameters according to/etc/sysctl.conf file;

(8) activating LVM and soft raid devices;

(9) Activate swap device;

(10) Load drivers for additional devices; some do not load

(11) Cleanup operation, clear temporary files, etc.


3. Stop, close the corresponding level of service

Accept a runlevel number (0-6). Start or close the service that the service script under the/etc/rc.d/directory controls;

K* indicates the service to stop, the smaller the number needs to be closed first

S* indicates the service to be turned on, the smaller the number, the faster it starts.


4. Turn on the string terminal


CentOS Boot Brief 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.