打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
启动时出现错误an error occurred during the file system check dropping you to a shell

启动时候出现错误。

好好的系统突然启动时出现了

***an error occurred during the file system check
***Dropping you to a shell;thesystem will reboot
***when you leave the shell.
Give root password for mainteance
(or type Control -D for normal startup)

是文件系统出了错误。用fsck进行回复,刚开始使用-a选项,没有成功,后来仔细看了出错提示,

解决方法,root密码

于是检查逻辑卷,提示:

# fsck.ext3 -f /dev/mapper/test-test 
e2fsck 1.38 (30-Jun-2005)
fsck.ext3: Attempt to read block from filesystem resulted in short read while trying to open /dev/mapper/test-test
Could this be a zero-length partition?

 

然后,查看了一下这个逻辑卷的信息:

# mkfs.ext3 -n /dev/mapper/test-test 
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
6553600 inodes, 13107200 blocks
655360 blocks (5.00%) reserved for the super user
First data block=0
400 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424

 

然后,尝试了一下,用备用超级块来修复:

# fsck.ext3 -b 163840 /dev/mapper/test-test 
e2fsck 1.38 (30-Jun-2005)
fsck.ext3: Attempt to read block from filesystem resulted in short read while trying to open /dev/mapper/test-test
Could this be a zero-length partition?


结果仍然报错。那就再试试重启lvm服务吧,执行

/etc/init.d/lvm stop

/etc/init.d/lvm start

然后再执行:

# fsck.ext3 -b 163840 /dev/mapper/test-test 
e2fsck 1.38 (30-Jun-2005)
ext3 recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
/dev/mapper/test-test: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/mapper/test-test: ***** FILE SYSTEM WAS MODIFIED *****
/dev/mapper/test-test: 31/6553600 files (3.2% non-contiguous), 1823265/13107200 blocks

 

执行/etc/init.d/checkfs.sh start,也可检查、修复文件系统。


执行

(Repair filesystem)# fdisk -l    查看所有的/dev

之后依次 :
(Repair filesystem)#fsck -y /dev/sda2
(Repair filesystem)#fsck -y /dev/sda3
(Repair filesystem)#fsck -y /dev/sda4
(Repair filesystem)#fsck -y /dev/sda5


说可以尝试用不带-a或-p的fsck,过程中会让你选择几个yes/no,是关于文件块修复的,都选yes就可以了,成功。

以后要养成正常关机的好习惯。。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
如何在 Linux 中减少/缩小 LVM 大小(逻辑卷调整)
Linux环境中使用Ext3文件系统
linux启动提示:contains a file system with errors, check forced.的解决方
Linux ext2/ext3文件系统详解 - 操作系统 - 蓝色理想
Linux配置启动挂载:fstab文件详解
How to edit and understand /etc/fstab
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服