Home Operation and Maintenance CentOS centos6 startup process

centos6 startup process

Mar 31, 2020 pm 01:56 PM
centos6

centos6 startup process

centos6 startup flow chart:

centos6 startup process

1. POST power-on self-test

Load the BIOS hardware information and obtain the first boot device. Self-test is mainly to check whether the hardware device exists and can operate normally.

For example, the BIOS will check whether the CPU, memory and I/O devices can operate normally. If it is a personal computer, it may also check the monitor. As soon as the power is turned on, the CPU will automatically load the BIOS program on the ROM chip. This is how it is implemented. After the detection is completed, the hardware device is initialized.

2. MBR boot loading

When there is no problem with the hardware self-check in the first step, here is the BIOS as an example. The BIOS will go directly to the first step of the hard disk. sector, find the first 446 bytes, and load the MBR into the memory. The MBR will tell the program where to find the system grub boot in the next stage.

This stage belongs to the first stage of grub. The previous BIOS reads and executes the bootloader in the MBR of the boot device. The function of the bootloader is to provide a menu for the user to select the system or different kernel versions to start, because there may be more than one on a hard disk. operating system. Then the kernel version selected by the user is loaded into a specific space in RAM, then decompressed and expanded in RAM, and then system control is handed over to the kernel.

(Recommended tutorial: centos tutorial)

3. Load the system kernel kernel and execute system initialization information

When the Bootloader starts to read the operating system kernel file, it will decompress the kernel file and install it into the memory, and then start loading each device according to the functions provided by the kernel. Each operation here is completed by the kernel, and our kernel files are usually stored in the /boot directory and are files starting with vmlinux. As shown in the figure below:

[root@centos6 ~]# cd /boot
[root@centos6 boot]# pwd
/boot
[root@centos6 boot]# ls
config-2.6.32-696.el6.x86_64           lost+found
efi                                    symvers-2.6.32-696.el6.x86_64.gz
grub                                   System.map-2.6.32-696.el6.x86_64
initramfs-2.6.32-696.el6.x86_64.img    vmlinuz-2.6.32-696.el6.x86_64
initrd-2.6.32-696.el6.x86_64kdump.img
Copy after login

However, the kernel program has not been loaded to the disk at this time. How to read the kernel file? If you want to load the disk first, you need a disk driver, and the driver is on the hard disk, which will lead to an infinite loop. So we have to use something called a virtual file system to solve this problem. Similarly, this file system is also placed under /boot and is a file starting with initrd, as shown in the figure above.

Boot Loader can load the kernel and initrd, and then decompress the initrd into the root directory. Then the kernel can load the driver on this virtual root file system, then release the root file system, and finally start the normal startup process. .

4. Start init

For CentOS6, the init configuration file is: /etc/inittab, /etc/init/*.conf, that is, upstart will The configuration file is split into multiple files. The files ending with conf in the /etc/init/ directory are all upstart-style configuration files, while /etc/inittab is only used to set the default run level. The run level is set for the purpose of system operation or maintenance, and is divided into 0-6, with a total of seven levels:

     0:关机(shutdown);
     1:单用户模式(single user):不需要通过认证,登录进去之后为root用户身份;
     2:多用户模式(multi user):会启动网络功能,但不会启动NFS;
     3:多用户模式(multi user):为完全功能模式,提供文本界面;
     4:预留级别,目前无特别使用目的;
     5:多用户模式(multi user):为完全功能模式,提供图形化界面;
     6:重启(reboot),reboot;
Copy after login

Usually we use the default level 3 or 5, and pages of different levels can be switched. The switching method is: init[0-6], use the runlevel command to view the current running level.

5. User login

Recommended related video tutorials: linux video tutorial

The above is the detailed content of centos6 startup process. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What are the methods of tuning performance of Zookeeper on CentOS What are the methods of tuning performance of Zookeeper on CentOS Apr 14, 2025 pm 03:18 PM

Zookeeper performance tuning on CentOS can start from multiple aspects, including hardware configuration, operating system optimization, configuration parameter adjustment, monitoring and maintenance, etc. Here are some specific tuning methods: SSD is recommended for hardware configuration: Since Zookeeper's data is written to disk, it is highly recommended to use SSD to improve I/O performance. Enough memory: Allocate enough memory resources to Zookeeper to avoid frequent disk read and write. Multi-core CPU: Use multi-core CPU to ensure that Zookeeper can process it in parallel.

CentOS Containerization with Docker: Deploying and Managing Applications CentOS Containerization with Docker: Deploying and Managing Applications Apr 03, 2025 am 12:08 AM

Using Docker to containerize, deploy and manage applications on CentOS can be achieved through the following steps: 1. Install Docker, use the yum command to install and start the Docker service. 2. Manage Docker images and containers, obtain images through DockerHub and customize images using Dockerfile. 3. Use DockerCompose to manage multi-container applications and define services through YAML files. 4. Deploy the application, use the dockerpull and dockerrun commands to pull and run the container from DockerHub. 5. Carry out advanced management and deploy complex applications using Docker networks and volumes. Through these steps, you can make full use of D

What are the backup methods for GitLab on CentOS What are the backup methods for GitLab on CentOS Apr 14, 2025 pm 05:33 PM

Backup and Recovery Policy of GitLab under CentOS System In order to ensure data security and recoverability, GitLab on CentOS provides a variety of backup methods. This article will introduce several common backup methods, configuration parameters and recovery processes in detail to help you establish a complete GitLab backup and recovery strategy. 1. Manual backup Use the gitlab-rakegitlab:backup:create command to execute manual backup. This command backs up key information such as GitLab repository, database, users, user groups, keys, and permissions. The default backup file is stored in the /var/opt/gitlab/backups directory. You can modify /etc/gitlab

CentOS Backup and Recovery: Ensuring Data Integrity and Availability CentOS Backup and Recovery: Ensuring Data Integrity and Availability Apr 04, 2025 am 12:02 AM

The steps for backup and recovery in CentOS include: 1. Use the tar command to perform basic backup and recovery, such as tar-czvf/backup/home_backup.tar.gz/home backup/home directory; 2. Use rsync for incremental backup and recovery, such as rsync-avz/home//backup/home_backup/ for the first backup. These methods ensure data integrity and availability and are suitable for the needs of different scenarios.

How to optimize CentOS HDFS configuration How to optimize CentOS HDFS configuration Apr 14, 2025 pm 07:15 PM

Improve HDFS performance on CentOS: A comprehensive optimization guide to optimize HDFS (Hadoop distributed file system) on CentOS requires comprehensive consideration of hardware, system configuration and network settings. This article provides a series of optimization strategies to help you improve HDFS performance. 1. Hardware upgrade and selection resource expansion: Increase the CPU, memory and storage capacity of the server as much as possible. High-performance hardware: adopts high-performance network cards and switches to improve network throughput. 2. System configuration fine-tuning kernel parameter adjustment: Modify /etc/sysctl.conf file to optimize kernel parameters such as TCP connection number, file handle number and memory management. For example, adjust TCP connection status and buffer size

Centos stops maintenance 2024 Centos stops maintenance 2024 Apr 14, 2025 pm 08:39 PM

CentOS will be shut down in 2024 because its upstream distribution, RHEL 8, has been shut down. This shutdown will affect the CentOS 8 system, preventing it from continuing to receive updates. Users should plan for migration, and recommended options include CentOS Stream, AlmaLinux, and Rocky Linux to keep the system safe and stable.

Centos shutdown command line Centos shutdown command line Apr 14, 2025 pm 09:12 PM

The CentOS shutdown command is shutdown, and the syntax is shutdown [Options] Time [Information]. Options include: -h Stop the system immediately; -P Turn off the power after shutdown; -r restart; -t Waiting time. Times can be specified as immediate (now), minutes ( minutes), or a specific time (hh:mm). Added information can be displayed in system messages.

How to check CentOS HDFS configuration How to check CentOS HDFS configuration Apr 14, 2025 pm 07:21 PM

Complete Guide to Checking HDFS Configuration in CentOS Systems This article will guide you how to effectively check the configuration and running status of HDFS on CentOS systems. The following steps will help you fully understand the setup and operation of HDFS. Verify Hadoop environment variable: First, make sure the Hadoop environment variable is set correctly. In the terminal, execute the following command to verify that Hadoop is installed and configured correctly: hadoopversion Check HDFS configuration file: The core configuration file of HDFS is located in the /etc/hadoop/conf/ directory, where core-site.xml and hdfs-site.xml are crucial. use

See all articles