After disabling SELinux, machine not booting up - Unable to load SELinux Policy. Kernel Halt!

Support for security such as Firewalls and securing linux
musikbyg
Posts: 3
Joined: 2011/11/04 13:54:58

After disabling SELinux, machine not booting up - Unable to load SELinux Policy. Kernel Halt!

Postby musikbyg » 2011/11/04 14:13:14

Hello!

I changed the configuration for SELinux to disable it, and now I can't get into my Linux box, is in a virtual machine setup and I am very nervous I have lost
all the configurations made so far. Here is a snapshot of the screen:

[img align=left]http://www.affirmativeyou.com/virtual%20machine%20Linux.bmp[/img]

My CentOS 5.7 system will not boot ... I receive a:

Unable to load SELinux Policy. Machine is in enforcing mode. Halting now. Kernel Panic – not syncing : Attempting to kill init!

Then the boot process just stops and does nothing.

Question: Is there a way to recover form this and how do I recover?

Please help.

Thank You

User avatar
TrevorH
Forum Moderator
Posts: 16247
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: After disabling SELinux, machine not booting up - Unable to load SELinux Policy. Kernel Halt!

Postby TrevorH » 2011/11/04 15:16:46

From the grub boot menu you should be able to hit Esc and get a list of the kernels that are available to boot. You can edit the command line parameters for these using grub. First thing to try is to append

Code: Select all

enforcing=0


to the end of the current list of parameters. If this fails then try appending selinux=0 instead.

How did you try to disable SELinux to get into this problem in the first place?

musikbyg
Posts: 3
Joined: 2011/11/04 13:54:58

Re: After disabling SELinux, machine not booting up - Unable to load SELinux Policy. Kernel Halt!

Postby musikbyg » 2011/11/04 15:38:04

I was trying to install the famous Bacula, and one of the instructions I found online said that I needed to disable SElinux temporarily in order to get it to work.
I did, and now I can't get past that error message.
I edited the /etc/selinux/config to a "permissive" state, and now I'm in this mess.

I tried what you suggested, and it didn't work.
Any other suggestions?

Thanks!

musikbyg
Posts: 3
Joined: 2011/11/04 13:54:58

Re: After disabling SELinux, machine not booting up - Unable to load SELinux Policy. Kernel Halt!

Postby musikbyg » 2011/11/04 16:06:01

I was able to get it back up, THANK YOU

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

After disabling SELinux, machine not booting up - Unable to

Postby pschaff » 2011/11/07 01:49:25

For the sake of readers of this thread and future forum searchers please share your solution.

It is also not clear exactly what you changed to break the system. The usual approach is to just enter "setenforce 0" as root to temporarily disable SELinux by changing to Permissive mode. After performing any required operations then "setenforce 1" (or a reboot) will restore Enforcing mode.

For a permanent change one would use the GUI tool or edit /etc/sysconfig/selinux and change the line "SELINUX=enforcing" to "SELINUX=permissive" or "SELINUX=disabled" (not recommended).

I would have expected the GRUB argument to be "selinux=0".

User avatar
TrevorH
Forum Moderator
Posts: 16247
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: After disabling SELinux, machine not booting up - Unable to load SELinux Policy. Kernel Halt!

Postby TrevorH » 2011/11/07 02:02:33

I would have expected the GRUB argument to be "selinux=0".


That disables selinux, 'enforcing=0' should bring it up in permissive mode.

DangerDane
Posts: 14
Joined: 2014/12/05 09:52:36

Re: After disabling SELinux, machine not booting up - Unable

Postby DangerDane » 2014/12/28 15:34:40

I am having the issue of getting the same error, but I am not wanting to disable SELinux and hasn't changed anything on the system.

centfelgen
Posts: 1
Joined: 2016/02/09 08:12:42

Re: After disabling SELinux, machine not booting up - Unable

Postby centfelgen » 2016/02/09 08:42:00

Hello,I have the same error with a Vmware-host running Centos7.
After disabling Selinux, my machine does not boot anymore.
During boot I can only choose
CentOs Linux 3.XXXXXXXXXX (core )with debuging
CentOs Linux 3.XXXXXXXXXX (core)
CentOs Linux 7 (core) with Linuxe 3.XXXXXXXXXX
CentOS Linux 7 (Core) with Linux 0 rescue.

In Centos 7 I don’t find how to append enforcing=0


If I choose CentOS Linux 7 (Core) with Linux 0 rescue, the Machine tells me
“Failed to load SELinux policy”
What can I do to start the machine?


Return to “CentOS 5 - Security Support”

Who is online

Users browsing this forum: No registered users and 0 guests