CentOS 6 Startup process details

  • 2020-06-12 11:42:18
  • OfStack

CentOS 6 startup process details

1. POST(Power On Selt Test) Self-test on power:

First of all, press the power button to check whether the hardware device can operate normally, such as cpu, memory, hard disk and other hardware devices. Of course POST is not tested by the hardware (and the hardware doesn't either!). This software is the basic input/output system of BIOS(Basic Input Output System). It is installed on the CMOS chip. Power on means to add power to CMOS, and then start the BIOS program.

2. MBR(Master Boot Record)

After the hardware is initialized by BIOS, Boot Loader in MBR is read, Boot Loader is a piece of software, it has the function of providing menu, directly loading kernel information and relevant control conversion, MBR only has 512bytes, of which the first 446bytes stores Boot Loader, 46bytes stores partition table information, and 2bytes is the partition symbol bit. 446bytes is not enough to install Boot Loader. In fact, before MBR, 446bytes only installed Boot Loader's smallest main program, namely stage1, because Boot Loader is divided into stage1, stage1.5 and stage23 stages. stage1.5 is stored in the subsequent sector of MBR and is mainly used to interact with the file system of the partition where stage2 is located. stage2 loads all files, configuration files, and environment parameter information in the hard disk partition /boot directory.

3. Kernel, initrd/initramfs:

/ boot directory contains vmlinuz initramfs kernel related files, such as Boot Loader read/boot directory all files, configuration files with the environmental parameter information, extract the kernel loaded into memory, starting test according to the kernel function, each equipment load, the detection and BIOS self-checking, execution to this, the follow-up work is done by the kernel (because Boot Loader have vmlinuz, initramfs loaded into memory), there is no loading disk kernel this time, Because no disk drivers, the kernel through/boot directory of the virtual file system, namely initramfs, simulating a rootfs (root file system), load the required core modules, in the process of start loading after release rootfs (root file system), and mounted in a read-only way the real root file system, start the normal boot process.

4, Init:

After the kernel, hardware and driver are loaded, the kernel will execute the first executable program of user space /sbin/init. The main function of init program is to prepare the software running environment, including the system host name, network configuration, file system format and other service configuration.

Init profile:

CentOS 6: Adopt Upstart's way, its characteristic is the communication between daemons depends on D-ES106en, therefore, can basically realize similar parallel startup, configuration file: /etc/inittab, /etc/init/*.conf

Thank you for reading, I hope to help you, thank you for your support to this site, if you have any questions can leave a message or to the site community discussion exchange, common progress!


Related articles: