“Failed to load selinux policy, freezing” in CentOS/RHEL 7

Hey!!! Have you faced such problem during boot.

Image result for failed to load selinux policy freezing

Here is how you can resolve it.
Step1: During boot disturb the normal boot and use “e” to edit the kernel before booting
Step2: Disable selinux by using the following keyword selinux=0 by the end of linux16 line.

Step3: Now boot the system using ctrl+x, This will disable selinux and boot the system.
Remember this is only a temporary solution, To fix it permanently after booting reinstall the following package
#yum reinstall selinux-policy-targeted -y
This will fixed it permanently
Verify it by rebooting

 

13 Comments

  1. Taher

    November 28, 2019 at 7:10 pm

    Great solution this solved my problem.Thanks musab

  2. Steve Chu

    April 15, 2020 at 11:05 pm

    This is exactly what I was looking for. Thank you so much for posting it!

    1. Musabuddin Syed

      January 5, 2021 at 11:47 am

      thanks a lot steve, i’m happy you found it useful

  3. ling

    July 3, 2020 at 10:10 am

    why i can’t find the “linux16” line? my system is centos8.

    1. Musabuddin Syed

      January 5, 2021 at 11:44 am

      he ling, its because it is “linux” instead of linux16 in centos8. pl make change near line starting with “linux” in centos8.

  4. Ryan

    January 27, 2022 at 9:29 am

    Thank you!!! The error happened after an os update. Not even a configuration change. This worked right away.

    1. Musabuddin Syed

      April 22, 2022 at 2:39 am

      youre most welcome

  5. Vignesh G

    April 17, 2022 at 2:57 am

    Thank you so much!!!

    1. Musabuddin Syed

      April 22, 2022 at 2:38 am

      appreciate

  6. asn the first

    July 4, 2022 at 9:01 am

    Good guide. Helped me out a week ago, when a colleague had been fighting with a VM for 3 hours.
    The effects of the (re-)installation of selinux-policy-targeted may cause a delay in the server completing the reboot.
    Speaking from experience: do check the console messages, as a premature reboot due to impatience/ confusion won’t help. Finally, the server will reboot after applying the SELinux policy. This is logical, but don’t be surprised when it happens.

  7. prashant

    August 1, 2023 at 5:30 am

    it worked for me, Thank you

    1. Musabuddin Syed

      December 6, 2023 at 4:09 pm

      Most Welcome Dear

Leave a Reply to Musabuddin Syed Cancel