fstab 坏了,查到的修复方法,回去试试

第一种方法:关盘启动

1。用安装光盘或者硬盘安装的方式进入安装界面,在shell 中输入 linux rescue

2。然后根据提示选择语言和键盘格式


3。选择是否配置网卡一般系统到了要rescue了,网络也就不需要了,所以可以选择否跳过网卡配置,当然你如果需要也可以选择是,具体设置过程和安装时一样。

4。选择是否然让系统查找硬盘上的RHEL 系统,选择继续。

5。硬盘上的系统已经被找到并挂载在/mnt/sysimage 下

6。按提示chroot /mnt/sysimage
chroot 之后你就可以已经在你的要被拯救的系统下了。

grub挂了的,grub-install /dev/hdxx
配置文件改错的,vi /etc/fstab  vi /etc/inittab ..................
软件包被毁的 rpm  -F xxx.rpm

你可以vi /etc/fstab --->; 把文件恢复即可!
完成修复工作后,exit命令退出chroot,exit退出rescue shell 系统重启

 

第二种方法 grub启动

1. Boot up your computer, select the line in GRUB that should boot Linux, but don't boot it.
2. Instead, press the 'e' key to enter edit mode. Go to the line that begins with "kernel", edit it, and add " init=/bin/sh" (don't ignore the space before init) to the end of that line. The keys necessary to do that are explained by GRUB.
3. Go ahead and boot.
4. When the system is ready for input, enter these commands (end each command with ENTER). If any command returns an error, abort and report back here.

Code:

export PATH=/bin:/sbin:/usr/bin
mount -n -o remount,rw /
vi /etc/fstab
mount -n -o remount,ro /
sync
reboot -fw

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值