系统文件损坏后进入紧急修复模式,无法进行维护工作
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。
give root password for maintenance
执行任何命令都会有以下(或相似)错误
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
1、查看运行日志,发现是/home目录挂载问题
journalctl -xb
2、退出日志模式
q
3、查看LVM分区下信息
ls -l /dev/mapper
4、查看挂载信息
cat /etc/fstab
5、修复挂载目录
xfs_repair /dev/mapper/centos-home
6、如果修复失败,请加-L参数,喝口水莫方
xfs_repair -L /dev/mapper/centos-home
7、修复完成,重启系统。
init
解决好了,可以愉快地玩耍了!
参考文献
http://chjbg35.blog.163.com/blog/static/130094302018284463941/