fsck 修复ext3文件系统(用于linux系统时间不对,文件系统信息有错引起的die with exit status等的一些问题)

有时候我们用虚拟机装了linux,可是我们做开发的人员,系统时间可能出于一些特殊要求调整过(例如保持一些特殊软件不过期,需要锁定时间等等),这样linux的系统时间久不准了,如果时间不准,会造成ext 文件系统的信息业不准,开机的时候出现错误。
Press enter for maintenance
(or type Control-D to continue):
有die with exit status xx等错误
这些其实都是因为系统时间对造成的。

例如提示:

dev/sda1:problem in fsck die with exit status 4

Failed ( code 4)

An automatic file system check (fsck) of the root filesystem failed
A maintenance will now be started.
After performing system maintenance,press control-D to terminater the maintenance shell and restart the system.
give root password for maintenance(or type control-D to continue)


提示使用root进行maintenance或ctrl-D重启,Ctrl-D重启后还是出现同样的错误信息。
解决的方法如下:

输入root密码,登陆成功后
运行 fsck -y /dev/sda1
这个过程可能比较漫长。各个系统不一样,或者需要耐心等候。
修复好后,再reboot
上一篇:iOS逆向工程之Hopper+LLDB调试第三方App


下一篇:无法解析的外部符号 _WinMain@16 fatal error LNK1120: 1 个无法解析的外部命令