LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1695|回复: 4

booting fsck problem[己解決]

[复制链接]
发表于 2008-2-29 20:21:50 | 显示全部楼层 |阅读模式
fsck 1.40.6 (09-Feb-2008)
fsck.ext3: Bad magic number in super-block while trying to open /dev/hda9

/dev/hda9:
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

fsck died with exit status 8

開機后遇到fsck的問題,怎麼解決?
我的fdisk內容如下:
debian:/# fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbdbebdbe

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1275    10241406    7  HPFS/NTFS
/dev/hda2            1276        7295    48355650    f  W95 Ext'd (LBA)
/dev/hda5            1276        5099    30716248+   7  HPFS/NTFS
/dev/hda6            5100        6374    10241406    7  HPFS/NTFS
/dev/hda7   *        6375        6860     3903763+  83  Linux
/dev/hda8            6861        7266     3261163+  83  Linux
/dev/hda9            7267        7295      232911   82  Linux swap / Solaris

我的/hda7 應該是mount /  ,/hda8應該是/home  
或者相反,忘了。。。
而/hda9應該是swap,但是現在在gnome里用系統->系統管理->Disk 卻查出

/hda7變成swap 汗呢。。。3.7G的swap分區
/hda8是 /
/hda9是/home...   300MB的/home ,裝什麼呢。。。。
現在/home文件夾里是沒有任何文件...我的所有用戶資料都不見了,現在只能用root登陸。。。。開機出現fsck問題后,就變成這樣了....
发表于 2008-3-1 01:27:28 | 显示全部楼层
很明显,你是文件系统的文件遭到破坏,提示superblock被损害,使用提示的命令还原你损害的superblock就ok了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-1 09:40:28 | 显示全部楼层
我试过这个命令
e2fsck -b 8193 /dev/hda9
不行....
回复 支持 反对

使用道具 举报

发表于 2008-3-1 09:50:33 | 显示全部楼层
你用带diskman之类的修复光盘启动电脑,检查你的硬盘分区情况看看是否是分区表坏了还是磁盘坏了,别乱折腾,否则数据全失。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-1 10:52:31 | 显示全部楼层
終于解決了,謝謝大家!

Solution:
----------------------------------------------------
問題可能的起因:
機子里是有兩個系統,一個是Debian,一個是WinXP,由于我重裝了XP,把硬盤啟動塊資料給刪了,所以裝了XP后,用Debian安裝盤引導進 / ,重裝grub,
然后,開機引導系統就會出現這個錯誤 (fsck 錯誤號8)
fsck 1.40.6 (09-Feb-2008)
fsck.ext3: Bad magic number in super-block while trying to open /dev/hda9

/dev/hda9:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

fsck died with exit status 8
----------------------------------------------------
解決辦法: 修改fstab
我的機子/dev/hda7原來是mount /
/dev/hda8 mount /home
/dev/hda9 mount swap

不知道為什麼,重裝grub后,發現原來的fstab文件會是這個樣子
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda8       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda9       /home           ext3    defaults        0       2
/dev/hda7       none            swap    sw              0       0
/dev/hdb        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/hda1                /mnt/c                        ntfs         nls=utf8,umask=222,user        0         0
/dev/hda5                /mnt/d                        ntfs        nls=utf8,umask=222,user        0        0
/dev/hda6                /mnt/e                        ntfs        nls=utf8,umask=222,user        0        0
后來手動改了配置,變為
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda7       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda9       none                        swap    sw                                0                0
/dev/hda8                /home                        ext3        defaults                0                2
/dev/hdb        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/hda1                /mnt/c                        ntfs         nls=utf8,umask=222,user        0         0
/dev/hda5                /mnt/d                        ntfs        nls=utf8,umask=222,user        0        0
/dev/hda6                /mnt/e                        ntfs        nls=utf8,umask=222,user        0        0
就搞好了,現在一切正常!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表