Tag Archives: Linux No access to the system error

[Solved] Linux No access to the system error: Failed to load SELinux policy. Freezing

Cause of error

SELinux is shut down by configuration, resulting in misoperation

The value of the "SELINUX" parameter in the configuration file /etc/selinux/config should be changed to
# SELINUX=enforcing Original configuration
SELINUX=disabled Correct

However, "SELINUXTYPE" is mistaken for "SELINUX" and the SELINUXTYPE parameter is set as follows
#SELINUXTYPE=targeted Original configuration This does not need to be changed.
SELINUXTYPE=disabled Error

Wrong result

After restart, the machine will report a failed to load SELinux policy. Freezing error, which causes it to fail to start all the time

Solution:

1. On the startup page, select the kernel you want to start and press e to enter grub edit page

2. Find the line linux16 in lang = zh_ Cn.utf-8 space plus SELinux = 0 or forcing = 0 (Note: I joined SELinux = 0 to take effect.)

3. Then start with Ctrl + X to see the familiar login interface

4. Modify SELinux configuration file and close SELinux properly

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 modification, restart