CentOS Boot Process

Source: Internet
Author: User

CentOS Boot Process

To start CentOs, follow these steps:

I. POST power-on self-check

Post on self test (post on self test) first checks Each device, finds the device with a boot record, finds the Boot Record read into the operating system, and gives the system control to the Boot Record.

Ii. MBR Guidance

MBR (Master Boot Record), MBR records are generally in the disk 0 track 1 sector, a total of 512 bytes, the first 446 bytes are BootLoader, the last 4*16 bytes are used to store the partition information, and the last two bytes are used to verify the information.

Iii. GRUB kernel Loading

GRUB (GRand uniied Bootloader) is the first 446 bytes of MBR and is a type of Booloader. It is used to select the kernel to be started.

4. Start the init process

The init process is the first process started by the system. Other processes are controlled by the process fork. PID = 1.

1. Read the/etc/inittab and select the default level.

On my machine, the file content is as follows:
Id: 5: initdefault:
Indicates the multi-user mode. The graphic mode is supported.

2. Execute the initialization system script.

This script is in/etc/rc. d/rc. sysinit.

3. Run the script in/etc/rc. d/rcX. d /.

Because the default level I selected here is 5, all scripts under rc5.d will be read to control the services started or disabled when the system starts.
The scripts here are roughly divided into two types, starting with S and starting with K.
S: indicates that
K: indicates that the instance is not started at startup.
FILE command format, for example:
S01sysstat S boot start 01 boot sequence sysstat start Script Name
You can use chkconfig to link the script to auto-start upon startup.
Chkconfig-add SRC_SCRIPT add service
Chkconfig-del SRC_SCRIPT Delete Service
Chkconfig SRC_SCRIPT {on | off}
-Level 2345 specifies the default level

4. Run the/etc/rc. d/rc. local script.

This is the last script started during the startup process, and then the/bin/login user will be executed.

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.