centos7 修改selinux 开机导致 faild to load SELinux policy freezing 错误

centos7 修改selinux 开机导致 faild to load SELinux policy  freezing 错误。
之前把selinux关闭了,这次想打开selinux,于是修改了 /etc/selinux/config 文件,然后重启时,就开不了机了。

出现错误:faild to load SELinux policy  freezing,查了一些资料,完善方案。
1.重启时在启动页面 按 E, 进入 grub 编辑页面;
2.找到 linux 那一行,在最后 language 后面,空格 加上 selinux=0 或者 enforcing=0
3.然后 ctrl + x 重新运行,即可了
4.重新启动之前,ls /etc/selinux 发现多了一个 config~的文件,,应该就是这个文件的问题了,把 config~文件删除;
5.reboot重新启动
注:Reboot一下,或者直接关虚拟机的电源,再次启动虚拟机,这个时候又提示failed to load seliinux policy。那岂不是还得重新设置?难道就不能把这个启动项保存?

解决步骤如下:
找到这个启动项的地址/boot/grub2/grub.cfg的配置文件;修改这个配置文件,并加上enforcing=0,问题解决。

原文地址:https://www.cnblogs.com/tangtianfly/p/6547364.html