红联Linux门户
Linux帮助

Linux下改错fstab后无法启动的解决方法

发布时间:2007-10-30 21:11:38来源:红联作者:kbopoeco
os: oracle enterprise linux 5

今天在系统里加了一块硬盘/dev/hda, fdisk, mkfs後, 修改了/etc/fstab. 不小心把/dev/hda1写成了/dev/hd1, 系统重启後显示

Checking filesystems
fsck.ext3:No such file or directory while trying to open /dev/hd1 [FAILED]

***An error occured during the file system check.
***Dropping you to a shell; the system will reboot
***when you leave shell. up to 100000000 @ 8000-d000
Give root password for maintenance
(or type Control-D to continue);

于是只能输入root的password进入, vi 打开/etc/fstab之后, 修改了/dev/hd1时, 提示
-- INSERT -- w10: Warning: Changing a readonly file

改完後保存的时候提示
"fstab" E212: Can't open file for writing
:w! 也没有用

看来是mount成readonly 了.
于是
root# mount -o remount,rw /

再试vi /etc/fstab, 就可以保存了.
文章评论

共有 0 条评论