1.centos6 啟動流程
https://www.runoob.com/linux/linux-system-boot.html

2.centos7 啟動流程
見下圖
3.centos6 和centos7區(qū)別
https://www.processon.com/view/link/5bffde0ae4b0f012f2382181

enforcing=0 init=/bin/bash
4.運行級別
Centos6
0? ? ? 關機
1? ? ? 單用戶模式 (超級權限 必須面對實體硬件)
2? ? ? 暫未使用
3? ? ? 字符界面(黑框)
4? ? ? 暫未使用
5? ? ? 圖形界面
6? ? ? 重啟

# 臨時性的操作
[root@oldboy ~]# runlevel #查看級別
N 3
#N 表示上一次是什么級別
#3 當前系統正在運行的級別
[root@oldboy ~]# init 3 #切換到3級別上
#永久操作 vim /etc/inittab
Centos7
0 關機
1 單用戶模式 (超級權限 必須面對實體硬件)
2 暫未使用
3 字符界面(黑框)
4 暫未使用
5 圖形界面
6 重啟
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#查看當前的運行級別
[root@oldboy ~]# systemctl get-default
multi-user.target
#修改系統下次啟動時候的運行級別
[root@oldboy ~]# systemctl set-default multiuser.target
2. systemd
systemctl start nginx
systemctl stop nginx
systemctl restart nginx
systemctl reload nginx
systemclt status nginx
systemctl enable nginx #下一次開機啟動nginx,于當前無關
systemctl disable nginx #下一次開機不啟動nginx,于當前無關

[root@oldboy ~]# #關機
shutdown -h now
poweroff
halt
init 0
systemctl poweroff
[root@oldboy ~]# #重啟
reboot
shutdown -r now
init 6
systemctl reboot
4.單用戶模式 (超級權限 必須面對實體硬件)
能正常引導進入系統
1.配置文件錯誤導致無法啟動
2.忘記ROOT密碼 ( 快照 | 單用戶修改)
https://mp.weixin.qq.com/s/1f-zCq8j4gL3xiB3AV9K3A 忘記root密碼
5.救援模式 系統無法正常進入 比如沒有內核 比如grub被修改 比如系統崩潰
沒有內核文件,只能使用救援模式進入
系統崩潰, 要保留重要的數據的時候
grub菜單出現問題, linux windows