Chinaunix首页 | 论坛 | 博客
  • 博客访问: 430096
  • 博文数量: 127
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 810
  • 用 户 组: 普通用户
  • 注册时间: 2013-07-02 20:51
文章分类

全部博文(127)

文章存档

2018年(6)

2015年(18)

2014年(33)

2013年(70)

分类: 系统运维

2013-07-07 17:37:09

  os启动的时候,会有个检查filesystem是否正确的操作,如果发现filesystem is inconsistent,就会自动执行fsck,导致filesystem inconsistent的最主要的原因是power off,就是我们说的硬关机。

    执行fsck的时候,如果发现无法对某个分区的filesystem进行check,fsck将会failed,然后系统进入repair filesystem模式,现象为:

Finding module dependencies;  modprobe:modprobe:can't locate module block-major-3 fsck.ext3Possibly non-existent or swap device? such device or address while trying to open /dev/hdb1 /boot: clena, 41/26104 files. 12679/104391 blocks[FAILED]

*** AN error occurred during the file system check *** Dropping you to a shell; the systm will reboot

*** when you leave the shell Give root password for maintenance

(or type Control-D to continue):

Login incorrect. (Repair filesystem) 1 #

此时,输入root密码,就会进入repair filesystem命令行,在这里可以通过暂时卸载错误的或不存在的挂载目录,来使的os正常启动,启动后可以重新对某个分区进行fsck或其他操作。这里有个问题是,在repair filesystem模式下,根分区是只读的,所以无法修改/etc/fstab来卸载某个挂载点,可以通过如下命令使其可写:

          (Repair filesystem) 1 # mount -o remount,rw /

然后就可以通过vim /etc/fstab来进行修改。

这里仅仅介绍了一些原理,具体不同的应用场景对应的操作方法参见《linux断电开机后进入repair system解决方法 

阅读(1176) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~