LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: jsoso

修改 /etc/fstab 文件后,进不了系统了!

[复制链接]
发表于 2004-7-27 00:13:12 | 显示全部楼层
把你的fstab贴出来。
 楼主| 发表于 2004-7-27 01:06:27 | 显示全部楼层
郁闷!

我刚才又进了一遍rescue模式
明明我已经把原先的挂载明了删除了,可是它在文件的后面还存在。
又把他们删除了一遍,保存后,我又进入看了看。
确实是删除了!
但是出现这样的情况
/dev/.......................(最后一行我省略写了)



~
~
~
~
中间空出来3行(我原来输入的命令是3行的)
我把这三行填充 ~ 然后保存退出
再次进入却发现空出来的三行往下移了,事这种情况
/dev/.............................
~
~
~


~
~

再进系统时和上次出现的错误不一样,而是这样的:

提示fstab有多少行错误
eABEL=/.
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 filesysyem (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.ext3:No suck file or directory while trying to open eASEL=/
                                                       [FAILED]
*** An error occured during the file system check
*** Dropping you to a shell,the system wile reboot
*** when you leave the shell.
Give root password for maintenance
( or type Control-D to Continue):
我输入密码后提示:
bash: id: command not found
bash: id: command not found
bash: id: command not found
bash: [ : too many arguments
(Repair file system) 1 #
我随便输入几个字符 如 aaa  提示:
bash : aaa : command not found



我准备再进一次rescue模式看看

原本 输入 chroot /mnt/sysimage 能进入的
现在 输入 chroot /mnt/sysimage 后 提示
chroot:Cannot execute /bin/sh:no such file or directory

郁闷,我可不想再重装Linux了(我都重装10多遍了)

今天要睡了,下次再说吧!



home_king大哥说要看看我的fstab
可是我现在都进不去了!
发表于 2004-7-27 02:33:52 | 显示全部楼层
用rh9光盘引导进入rescue模式后,不要配置网络,
#mount
看看已经挂载上的所有分区
#chroot /mnt/sysimage
先把/etc/fstab文件里挂载win分区的行都注释了。等进了linux再说。
发表于 2004-7-27 08:10:12 | 显示全部楼层
看来我没有给兄弟解释清楚:sorry

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 filesysyem (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>

超级块可能出问题了
按照提示信息修复的方法
进入rescue模式后,在出现提示信息
不要建立网络连接,
The rescue environment will now attempt to find your Red Hat
Linux installation and mount it under the directory
/mnt/sysimage.  You can then make any changes required to your
system.  If you want to proceed with this step choose
'Continue'. You can also choose to mount your file systems
read-only instead of read-write by choosing 'Read-only'.
If for some reason this process fails you can choose 'Skip'
and this step will be skipped and you will go directly to a
command shell.

不要自动加载,选择“skip”,
然后ctrl+alt+f2,进入vc2,
使用如下命令:
mount -o ro /
fsck -b 8193 /dev/hda
exit
重启之后,应该可以正常进入rescue模式,
此时再次出现上述信息时,可以选择“continue”
然后chroot /mnt/sysimage
修改/etc/fstab
注意:
vi的使用方法──
vi /etc/fstab --> 打开文件
"i" 进入编辑,在当前位置插入
"ESC"  退出编辑
"Shift+:" vi的命令模式,其中wq写入并退出,q!退出不保存,
建议把你自己所添加的挂载win分区的行都注销(行首添加#号)
保存后退出。

重启进入linux后,请把你的/etc/fstab贴上来,看看什么错误。
 楼主| 发表于 2004-7-27 22:54:16 | 显示全部楼层
多谢了!
我进入VC2后,输入命令  mount -o ro /
提示 : mount : Cannot read /etc/fstab : No such file or directory
输入命令:fsck -b 8193 /dev/hda
提示   : fsck 1.32 (09-Nov-2002)
Warning:couldn't open (后面的我忘记了)
fsck 1.32 (09-Nov-2002)
fsck.ext2: Bad magic number in superblock while trying to open /dev/hda
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 filesysyem (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>

我再次进入时发现提示'挂载系统时出错,某些分区可能已经被挂载在 /mnt/sysimage 之下。(上次用命令chroot时出错,不知是不是这个原因)
我试了一下输入命令
mkdir /temp
然后输入
mount -t ext3 /dev/hdXY /temp
提示:mounting /dev/hdaXY on /temp failed:No such file or directory

我输入mount命令 显示如下:
rootfs on / type rootfs(rw)
/dev/root.old on / type ext2(rw)
/proc on /proc type proc(rw)
/dev/pts on /dev/pts type devpts(rw)
none on /tmp/ramfs type ramfs(rw)
/proc/bus/usb on /mnt/source type iso9660(ro)
/tmp/cdrom on /mnt/runtime type cramfs(ro)
/dev/hda5 on /mnt/sysimage/boot type ext3(rw)
none on /mnt/sysimage/dev/pts type devpts(rw)
/dev/hda12 on /mnt/sysimage/home type ext3(rw)
/dev/hda1 on /mnt/sysimage/mnt/WinC type vfat(rw)
/dev/hda5 on /mnt/sysimage/mnt/WinD type vfat(rw)
/dev/hda6 on /mnt/sysimage/mnt/WinE type vfat(rw)
/dev/hda7 on /mnt/sysimage/mnt/WinF type vfat(rw)
none on /mnt/sysimage/proc type proc(rw)
/dev/hda14 on /mnt/sysimage/tmp type ext3(rw)
/dev/hda9 on /mnt/sysimage/usr type ext3(rw)
/dev/hda11 on /mnt/sysimage/usr/local type ext3(rw)
/dev/hda10 on /mnt/sysimage/var type ext3(rw)

然后就是———还进不去系统!

我的‘网络配置’也跳过了!
进VC2时‘自动加载’也跳过了啊!
发表于 2004-7-27 23:21:15 | 显示全部楼层
你mount后,现在的结果说明还是正常的,现在
#chroot /mnt/sysimage
看看是什么结果?
发表于 2004-7-27 23:24:23 | 显示全部楼层
先按7dehao兄说的,
chroot /mnt/sysimage
看看能否进入文件系统。
有什么结果贴上来。
 楼主| 发表于 2004-7-27 23:35:08 | 显示全部楼层
输入chroot /mnt/sysimage
提示:
chroot:Cannot execute /bin/sh:no such file or directory

我想前一步中提示提示'挂载系统时出错,某些分区可能已经被挂载在 /mnt/sysimage之下‘
这样是不是挂载一次后他就自动存在了?
因为我前两次输入命令 chroot 时都能正常进入,现在却进不了了!

郁闷,是不是我的是盗版光盘的原因?
晕,我的是14块钱买了6张光盘!
发表于 2004-7-27 23:53:33 | 显示全部楼层
估计问题比较严重,最后再确认一下你进入recuse的方式:
用第一张光盘引导,看到boot:后输入linux rescue,回车就如rescue模式,不要配置网络,看到#提示符
#df -Th 看看各个分区的情况
#mount 看看mount的情况
#chroot /mnt/sysimage  切换系统的/分区
如果以上步骤的命令没有错误的话,如果还是不能正常切换的话,那么建议还是重装系统吧
发表于 2004-7-28 09:43:29 | 显示全部楼层
可以确认是超级块损坏
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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