Help Center/ Elastic Cloud Server/ Troubleshooting/ Remote Login/ Remote Login Errors on Linux/ What Do I Do If "Failed to load SELinux policy, freezing" Is Reported When a Linux ECS Is Started?
Updated on 2026-07-07 GMT+08:00

What Do I Do If "Failed to load SELinux policy, freezing" Is Reported When a Linux ECS Is Started?

Symptom

When a Linux ECS is started, the error message "Failed to load SELinux policy, freezing." is displayed, as shown in the following figure.

Possible Causes

SELinux is enabled in the current OS.

This document applies to CentOS. If SELinux is enabled on CentOS, this problem may be triggered.

Solution

  1. After the Linux ECS is started, press e when the kernel option is displayed to enter the kernel editing mode.

  2. Locate linux16 and add the following content after LANG=en_US.UTF-8. Note that there is a space after UTF-8.
    init=/bin/sh

  3. Run the following command to boot into single-user mode:

    Ctrl+X

  4. Run the following command to change the system file permission to read/write (rw):

    mount -o remount,rw /

  5. Go to the /etc/selinux directory.

    cd /etc/selinux

  6. Run the following command to edit the config file:

    cat config

  7. Change the setting to SELINUX=disabled, then save and exit.

  8. Restart the ECS.