fstab的修复 不需要disk的方法

 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

在作quota的时候把fstab改坏了,要求或者是用ctr+d或者输入passwd。进入shell了又报fstab文件是readonly的,于是在网上搜索了很多方法,这个方法可以用的,我的linux是fc6。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值