Friday, September 9, 2011

Unable to load SELinux Policy. Machine is in enforcing mode. Halting now.

Followed by:

kernel panic - not syncing: Attempted to kill init!

It's simple. At grub screen, press "a" to change kernel parameters and add "enforcing=0". Next, you can add this to /etc/grub.conf to do this automatically.

This happened after enforcing SElinux on both CentOS5 and RHEL6.1.

[update] It all happened after changing SELINUXTYPE in /etc/sysconfig/selinux to "strict" on CentOS and "mls" in RHEL. The problem is that selinux-policy-strict was missing on CentOS, and so was selinux-policy-mls in RHEL. You'll have to install them first before modifying /etc/sysconfing/selinux. After that, reboot once with "enforcing=0 autorelabel" and after that a reboot with no other parameter, and should be ok.

No comments:

Post a Comment