记一次Linux无法启动|emergency mode|紧急模式
启动提示“welcome to emergency mode!after logging in ,type “journalctl -xb” to view system logs,“systemctl reboot” to reboot ,“systemctl default” to try again to boot into default mode。“
然而,我以为没有启动。其实输入密码就可以进去。
但是进入的是紧急模式,需要修复。基本上引导不进去都是自己挖的坑,也就是自己在某事某刻修改了某个与启动相关的文件或参数。
红字部分就是我改的内容
[root@localhost ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu Aug 6 23:41:00 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=5de73753-b6ff-4dfa-a0cd-e92cac8ea131 /boot xfs defaults 0 0
/dev/mapper/centos-home /home xfs defaults,acl 1 1
/dev/mapper/centos-swap swap swap defaults 0 0
正常应该这样,按照这个还原回去就行
[root@localhost ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu Aug 6 23:41:00 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=5de73753-b6ff-4dfa-a0cd-e92cac8ea131 /boot xfs defaults 0 0
/dev/mapper/centos-home /home xfs defaults 0 0
/dev/mapper/centos-swap swap swap defaults 0 0