Failed to load SELinux policy. Freezing due to modification of SELinux by centos7

The reason for the error
Configuration closed SELinux, as a result, wrong operation, should be modified in the configuration file/etc/SELinux/config “SELinux” the value of the parameter, SELinux = enforcing original configuration SELinux = disabled right
but mistakenly “SELINUXTYPE” as “SELinux”, set up SELINUXTYPE parameters:
# SELINUXTYPE = targeted the original configuration This don’t need to modify.
SELINUXTYPE = disabled errors
Error
Failed to load SELinux policy. Freezing error caused the machine to never start
Solutions:

    When rebooting, on the boot page, select the kernel you want to boot and press E to enter the GRUB editing page. Find the linux16 one line, behind the language Is LANG = zh_CN. Utf-8, the blank space with selinux = 0 or enforcing = 0 (note: I am join selinux = 0 effect.) Then Ctrl + X launches, and you see the familiar login screen. Modify the SELinux configuration file to properly close SELinux ~! 4. Modify SELinux configuration file to properly close SELinux ~!

    vim /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

After the modification is complete, restart. Check to see if an error is reported. Over.


Read More: