Linux 启动报错 unexpected inconsistency;RUN fsck MANUALLY


意外停电一次,CentOS启动时报如下错误:

unexpected inconsistency;RUN fsck MANUALLY
An error occurred during the filesystem check
Propping you to shell the system will reboot
when you leave the shell
Give root password for mantennance



解决方法如下:
1、按提示,输入root用户的密码,进入命令行界面



2、查找根目录以及boot所在分区并记录:
# mount |grep "on /"


3、修复文件系统
# fsck -y /dev/sda2

这里的/dev/sda2就是步骤2中读取到的

-y 选项指定检测每个文件是自动输入yes


4、修复boot分区
(其实可以直接reboot,如果重启后仍然报错则执行此步骤)
# fsck -y /dev/sda1


5、修改auditd日志文件的权限
(这一步和步骤4一样,如果重启报错才需执行此步骤)
# chown root.root /var/log/audit/audit.log
# chmod 600 /var/log/audit/audit.log



6、重启
# reboot

注:fsck扫描文件系统时一定要在单用户模式、修复模式或把设备umount后进行


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章