search

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

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;

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
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
CentOS in Action: Server Management and Web HostingCentOS in Action: Server Management and Web HostingApr 18, 2025 am 12:09 AM

CentOS is widely used in server management and web hosting. Specific methods include: 1) using yum and systemctl to manage the server, 2) install and configure Nginx for web hosting, 3) use top and mpstat to optimize performance, 4) correctly configure the firewall and manage disk space to avoid common problems.

CentOS: A Community-Driven Linux DistributionCentOS: A Community-Driven Linux DistributionApr 17, 2025 am 12:03 AM

CentOS is a stable, enterprise-grade Linux distribution suitable for server and enterprise environments. 1) It is based on RedHatEnterpriseLinux and provides a free, open source and compatible operating system. 2) CentOS uses the Yum package management system to simplify software installation and updates. 3) Support advanced automation management, such as using Ansible. 4) Common errors include package dependency and service startup issues, which can be solved through log files. 5) Performance optimization suggestions include the use of lightweight software, regular cleaning of the system and optimization of kernel parameters.

What Comes After CentOS: The Road AheadWhat Comes After CentOS: The Road AheadApr 16, 2025 am 12:07 AM

Alternatives to CentOS include RockyLinux, AlmaLinux, OracleLinux, and SLES. 1) RockyLinux and AlmaLinux provide RHEL-compatible binary packages and long-term support. 2) OracleLinux provides enterprise-level support and Ksplice technology. 3) SLES provides long-term support and stability, but commercial licensing may increase costs.

CentOS: Exploring the AlternativesCentOS: Exploring the AlternativesApr 15, 2025 am 12:03 AM

Alternatives to CentOS include UbuntuServer, Debian, Fedora, RockyLinux, and AlmaLinux. 1) UbuntuServer is suitable for basic operations, such as updating software packages and configuring the network. 2) Debian is suitable for advanced usage, such as using LXC to manage containers. 3) RockyLinux can optimize performance by adjusting kernel parameters.

Centos shutdown command lineCentos shutdown command lineApr 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.

Difference between centos and ubuntuDifference between centos and ubuntuApr 14, 2025 pm 09:09 PM

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

Centos configuration IP addressCentos configuration IP addressApr 14, 2025 pm 09:06 PM

Steps to configure IP address in CentOS: View the current network configuration: ip addr Edit the network configuration file: sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 Change IP address: Edit IPADDR= Line changes the subnet mask and gateway (optional): Edit NETMASK= and GATEWAY= Lines Restart the network service: sudo systemctl restart network verification IP address: ip addr

How to install centosHow to install centosApr 14, 2025 pm 09:03 PM

CentOS installation steps: Download the ISO image and burn bootable media; boot and select the installation source; select the language and keyboard layout; configure the network; partition the hard disk; set the system clock; create the root user; select the software package; start the installation; restart and boot from the hard disk after the installation is completed.

See all articles

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools