当CentOS操作系统崩溃,无法正常启动时,可以通过救援模式或者紧急模式进行系统登录。
启动CentOS, 当出现下面界面时,按e进入编辑界面。
在编辑界面里,加入参数:systemd.unit=rescue.target ,然后Ctrl-X启动进入救援模式。
在编辑界面里,加入参数:systemd.unit=emergency.target, 然后Ctrl-X进入紧急模式。
救援模式与紧急模式可以相互切换:
Switch to Emergency mode(target)
To switch to Emergency target, simply run following command as root:
# systemctl emergency
Broadcast message from root@geeklab on pts/1 (Mon 2016-08-17 00:44:58 EDT):
The system is going down to emergency mode NOW!
Switch to Rescue mode(target)
To switch to rescue target, simply run following command as root:
# systemctl rescue
Broadcast message from root@geeklab on pts/0 (Mon 2016-08-17 00:22:44 EDT):
The system is going down to rescue mode NOW!
参考:https://www.thegeekdiary.com/centos-rhel-7-how-to-boot-into-rescue-mode-or-emergency-mode/