今天重启了一下客户的一个服务器,但是等了老半天就是启动不起来。

错误代码如下:

 

 
  
  1. ***an error occured during the filesystem check 
  2. ***droping you to a shell; the system will rebot 
  3. *** when you leave the shell 
  4. ***warniong -- SELinux is active 
  5. ***disableing security enforcement for system recovery 
  6. ***Run 'setinforce 1' to reeinable 
  7. Give root password for maintenance 
  8. (or type control-D to continue): 

 

现在的做法就是编辑/etc/fstab,把昨天加的那一条给去掉。

这个代码状态输入:root密码,然后回去。您就进去命令模式了。但是现在又出问题了,整个系统磁盘都是只读的,无法修改/etc/fstab,不过通过下面的命令执行之后就可以编辑了,然后保存 ➡ 重启,问题解决。

当然您可以通过光盘救援模式进去 修改/etc/fstab文件

注意:/etc/fstab 文件内 参数和参数之间 只能用空格隔开,不允许使用制表符Tab 键。

那条命令:

 
  
  1. mount -o remount,rw / 

 意思是重新以可读写方式挂载根分区,其实要看你的/etc/fstab在哪个分区了(绝大部分都是在根分区)