“Failed to load selinux policy, freezing” in CentOS/RHEL 7
Hey!!! Have you faced such problem during boot.
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
Jake
August 15, 2019 at 12:26 amThank you!!!!
Taher
November 28, 2019 at 7:10 pmGreat solution this solved my problem.Thanks musab
Steve Chu
April 15, 2020 at 11:05 pmThis is exactly what I was looking for. Thank you so much for posting it!
Musabuddin Syed
January 5, 2021 at 11:47 amthanks a lot steve, i’m happy you found it useful
ling
July 3, 2020 at 10:10 amwhy i can’t find the “linux16” line? my system is centos8.
Musabuddin Syed
January 5, 2021 at 11:44 amhe ling, its because it is “linux” instead of linux16 in centos8. pl make change near line starting with “linux” in centos8.
Ryan
January 27, 2022 at 9:29 amThank you!!! The error happened after an os update. Not even a configuration change. This worked right away.
Musabuddin Syed
April 22, 2022 at 2:39 amyoure most welcome
Vignesh G
April 17, 2022 at 2:57 amThank you so much!!!
Musabuddin Syed
April 22, 2022 at 2:38 amappreciate
asn the first
July 4, 2022 at 9:01 amGood 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.
prashant
August 1, 2023 at 5:30 amit worked for me, Thank you
Musabuddin Syed
December 6, 2023 at 4:09 pmMost Welcome Dear