Centos7 notes | operating system startup process, Linux users and permissions

Centos Service Manager: systemd and init run in parallel. (Systemctl and service)

MBR (Master Boot Record) only occupies 446 bytes, and the other 64 bytes are Disk Partition Table (DPT)

**1.1 Operating system startup process: **

1.1.1 Centos6 startup process

(1) Load BIOS

(2) Read MBR (Master Boot Record)

(3) GRUB boot

(4) Load Kernel

(5) Set the run level (init0-init6)

(6) Load rc.sysinit (linux system initialization)

(7) Load the kernel module

(8) Start the run-level program

(9) Read the rc.local file

(10) Execute /bin/login program

1.1.2 Centos7 startup process

The startup process of CentOS7 and CentOS6 is similar, except that the init program is changed to systemd, so I will explain in detail the startup process after systemd

1.1.3 uefi or BIOS initialization, start post POST

1.1.4 Load mbr to memory

1.1.5 GRUB stage

1.1.6 Load kernel and inintamfs module

1.1.7 The kernel starts to initialize, use systemd to replace the init program before centos6

(1) Execute initrd.target

Including mounting the system in the /etc/fstab file, after mounting at this time, you can switch to the root directory

(2) Switch from the initramfs root file system to the disk root directory####

(3) systemd executes the default target configuration####

On the surface of centos7, there is the concept of "run level". In fact, it is to be compatible with previous systems. Each so-called "run level" has a corresponding soft connection point. The default startup level is /etc/systemd/system/default. target, according to its point, you can find which mode the system will enter:

· 0 ==> runlevel0.target, poweroff.target

· 1 ==> runlevel1.target, rescue.target

· 2 ==> runlevel2.target, multi-user.target

· 3 ==> runlevel3.target, multi-user.target

· 4 ==> runlevel4.target, multi-user.target

· 5 ==> runlevel5.target, graphical.target

· 6 ==> runlevel6.target, reboot.target

(4) systemd executes sysinit.target

Is it familiar? Yes, it is called rc.sysint program on CentOS6, which initializes the system and basic.target prepares the operating system

(5) systemd starts the local and server services under multi-user.target####

(6) systemd executes /etc/rc.d/rc.local #### under multi-user.target

1.1.8 Systemd executes getty.target and login service under multi-user.target

Getty.target is also familiar to us. It is the systemd object that starts the terminal. If at this step, the system has not been designated to start the graphical desktop, you can end here, if you want to start the graphical interface, you need to start the desktop program on this basis

1.1.9 systemd executes services required by graphical

CentOS6, 7 startup difference

System startup and server daemon process manager, which is different from centos5's Sysv init, centos6's Upstart (made by Ubuntu). Systemd was first proposed by an employee of Redhat. After the kernel is started, all services and everything will be systemd. Takeover, the kernel is only used to manage hardware resources, which is equivalent to the kernel being emptied, so Linus is very dissatisfied with Redhat.

1.2 Linux users and permissions

Root is also called super administrator. Only users with Uid of 0 can be called super administrators.

LinuxCentos6 users are divided into three types, as follows:

LinuxCentos7 users are divided into three types, as follows:

Linux user regulations

Recommended Posts

Centos7 notes | operating system startup process, Linux users and permissions
CentOS system startup process
Linux centos system boot process
Linux notes (1): CentOS-7 installation
Linux Network Foundation (CentOS7)
Linux (centos7) build gitlab
Linux Centos7 install jdk1.8
CentOS (linux) install PostgreSQL
Ubuntu Linux study notes
Linux CentOS 7 installation tutorial
Centos 7 install JDK (Linux install jdk)
Centos7 notes | operating system startup process, Linux users and permissions
Centos7.6 operating system installation and optimization record
Do you know the CentOS system startup process?
Do you know the CentOS system startup process?
Linux notes (1): CentOS-7 installation
Centos system process management
Ubuntu and RHEL dual Linux operating system installation tutorial
The difference between CentOS and Ubuntu in Linux system
Know Linux and install CentOS
Centos6 system boot loading process
CentOS8 Linux 8.0.1905 installation process (illustration)
CentOS 7.X system installation and optimization
Install Centos7 operating system in Docker
001. Installation of enterprise-level CentOS7.6 operating system
Linux CentOS6 compile and install Pyt
Graphic KVM to install CentOS7.6 operating system
Tomcat installation and configuration under CentOS 7 (Tomcat startup)
Install mysql8.0.13 version under Linux CentOS7 system
Linux install Docker and run Ubuntu system