Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3298393
  • 博文数量: 258
  • 博客积分: 9440
  • 博客等级: 少将
  • 技术积分: 6998
  • 用 户 组: 普通用户
  • 注册时间: 2009-05-03 10:28
个人简介

-- linux爱好者,业余时间热衷于分析linux内核源码 -- 目前主要研究云计算和虚拟化相关的技术,主要包括libvirt/qemu,openstack,opennebula架构和源码分析。 -- 第五届云计算大会演讲嘉宾 微博:@Marshal-Liu

文章分类

全部博文(258)

文章存档

2016年(1)

2015年(4)

2014年(16)

2013年(22)

2012年(41)

2011年(59)

2010年(40)

2009年(75)

分类: 系统运维

2013-02-17 11:38:47

  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解决方法 

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