本人有一次安装软件失败,再次重启centos时报Failed to load SELinux policy. Freezing,然后一直在系统装载这是因为selinux设置不合理或者安装其他软件失败导致。
解决办法:
1. 在开机界面选择启动的内核时,选择完毕后按e键进入编辑界面。
2. 找到linux16 那一行,在language 后面 也就是LANG=zh_CN.UTF-8,加上空格,再加上selinux=0。
3. 按 ctrl + x 启动,此时可以正常启动登录界面。
4. 登录后,需要编辑selinux配置文件正常关闭selinux:
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
以后重启就没有selinux报错了。