本人有一次安裝軟件失敗,再次重啓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報錯了。