LINUX无法启动,启动rescue mode无法mount文件系统

rachel99 2008-11-07 03:38:18
上周末停电,这周重新开机的时候linux进入不了linux了,具体症状如下。

启动参数
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img

使用以上参数启动后报出以下错误。VFS: Mounted root (ext2 filesystem).
Red Hat nash version 3.4.42 starting
Loading jbd.o module
Journalled block Device driver loaded
Loading ext3.o module
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
hda: dma_initr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_initr: error=0x40 { UncorrectableError }, LBAsect=213069,
sector=4224
end_request: I/O error, dev 03:02 (hda), sector=4224
JBD: IO error reading journal superblock
EXT3-fs: error loading journal.
mount: error 22 mounting ext3
pivotroot: pivot_root (/sysroot, /sysroot/initrd) failed:2
umount /initrd/proc failed:2
Freeing unused kernel memory: 132k freed
Kernel panic: No init found. Try passing init= option to kernel


当我把kernel参数设成
kernel /vmlinuz-2.4.20-8 ro hda=noprobe root=LABEL=/
时,启动时报出
LABEL=/
是不正确路径

再把kernel参数设成
kernel /vmlinuz-2.4.20-8 ro hda=noprobe root=/dev/hda1
或者
kernel /vmlinuz-2.4.20-8 ro hda=noprobe root=/dev/hda2
或者
kernel /vmlinuz-2.4.20-8 ro hda=noprobe root=/dev/hda3
时,报错说hda1-3都不是正确的路径
VFS: Cannot open root device "hda1"("hda2","hda3") or 03:01
please append a correct "root=" boot option
Kernel panic: VFS: Uable to mount root fs on 03:01

选择进入rescue mode时,自动搜索安装的linux以后报出如下错误
Error mounting file system on hda2: Invalid argument
按下OK
you don't have any linux partitions. press return to get a shell.
the system will reboot automatically when you exit from the shell.

然后自动进入sh-2.05b#命令行
输入fdisk -l
device boot start end blocks id system
/dev/hda1 * 1 13 104391 83 linux
/dev/hda2 14 14816 1189XXXX 83 linux
/dev/hda3 14817 14946 1044225 82 linux swap

看上去引导用的是hda1, 但是为什么rescue mode时说无法加载hda2的文件系统呢。

真愁人啊,是不是硬盘坏了?还是启动时设置的参数不对呀。。。急死人了。
是不是能有好心人麻烦帮忙确定下下状况。
在此多谢了

(^_^)!
...全文
3517 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
rachel99 2008-11-10
  • 打赏
  • 举报
回复
我可以用debugfs的灾难模式(-c)进入/dev/hda2查看里面的文件。
但是似乎问题就出在无法加载这个partition的系统文件导致/dev/hda2无法加载,有什么办法能直接恢复文件系统而不损坏里面的文件吗?
有谁来帮帮我呀,谢谢拉
butchroller 2008-11-10
  • 打赏
  • 举报
回复
唉,这种意外掉电的确是很郁闷的事情。
butchroller 2008-11-10
  • 打赏
  • 举报
回复
这位兄弟和楼主是一样的问题,仅供参考(#24):
http://ubuntuforums.org/showthread.php?t=637404&page=3
guoli0813 2008-11-10
  • 打赏
  • 举报
回复
回自称为妹子的楼主

对于你说的问题,我猜想的fstab损坏,对于这中猜测,楼下正解,我要说的重点是:

互做备份,最好是两块硬盘,做raid1,或者三块做raid5,当然硬盘越多越好啦

做软raid或者硬raid都可以,

都是生产机了,什么都要留后路。
rachel99 2008-11-10
  • 打赏
  • 举报
回复
多谢butchroller
我试了试tune2fs -f -O ^has_journal /dev/hda2
返回了
The needs_recovery flag is set. Please run e2fsck before clearing the has_journal flag.
但是我使用e2fsck总是返回
/: Attempt to read block from filesystem resulted in short read while reading block 528

/: Attempt to read block from filesystem resulted in short read while reading journal superblock

fsck.ext3 /: Attempt to read block from filesystem resulted in short read while checking ext3 journal for /

的错误,是不是文件系统没救了呀。。。各位救救我啊,谢谢啦

short read while reading 528有没有办法修好呀
xxgamexx 2008-11-08
  • 打赏
  • 举报
回复
joyself为什么每次回复都这么快呢?
butchroller 2008-11-07
  • 打赏
  • 举报
回复
如果是超级块的问题,则程序返回后,备用超级块被启用,磁盘恢复正常。如果提示下面的问题:
e2fsck: Attempt to read block from filesystem resulted in short read while checking ext3 journal for
/dev/hda1
说明问题不是出在超级块,出自日志文件系统的日志。此时可以安全地删除ext3文件系统的日志:

tune2fs -f -O ^has_journal /dev/hda1

这样就删除了/dev/hda1文件系统上的日志,这时可以重新尝试挂载分区,必要的话可以重建日志系统(使用tune2f
s -j /dev/xxx)。

http://bbs.zsu.edu.cn/bbstcon?board=Problem&file=M.1199431217.A
rachel99 2008-11-07
  • 打赏
  • 举报
回复
是不是block 528也坏了呀,我怎么这么倒霉。。。
rachel99 2008-11-07
  • 打赏
  • 举报
回复
谢谢楼上的回答,小妹我感觉也是这样的,hda2的文件系统有问题了所以没法加载。
看了你给我的链接用了
mkfs.ext3 -n /dev/hda2
看到了在处于32768的超级快。
使用fsck.ext3 -b 32768 /dev/hda2命令来恢复

返回和刚才一样的如下信息
/: Attempt to read block from filesystem resulted in short read while reading block 528

/: Attempt to read block from filesystem resulted in short read while reading journal superblock

fsck.ext3 /: Attempt to read block from filesystem resulted in short read while checking ext3 journal for /

这是为什么呀。。。
butchroller 2008-11-07
  • 打赏
  • 举报
回复
hda1没问题,损坏的是hda2的文件系统。
butchroller 2008-11-07
  • 打赏
  • 举报
回复
参考这个:
http://www.enet.com.cn/article/2008/0218/A20080218158104.shtml

rachel99 2008-11-07
  • 打赏
  • 举报
回复
谢谢楼上,我试了试以下命令

fsck -t ext3 /dev/hda2
以及
fsck -a /dev/hda2
都返回同样的东西

WARNING couldn't open /etc/fstab: No such file or directory
/: Attempt to read block from filesystem resulted in short read while reading block 528

/: Attempt to read block from filesystem resulted in short read while reading journal superblock

fsck.ext3 /: Attempt to read block from filesystem resulted in short read while checking ext3 journal for /

我觉得问题出在不能mount /dev/hda2的数据上。。。(每次试图mount都会说invalid argument)是不是数据坏啦。。。呜呜呜。。。
还有找不到/etc/fstab文件。。。这个文件是不是也在/dev/hda2里面呀。
请各位大哥帮帮我,很无助。。。

谢谢



joyself 2008-11-07
  • 打赏
  • 举报
回复
看看能不能用fsck修复。

看大小不像hd1,应该是hd2才对

19,615

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧