Sunday, 29 June 2014

Boot Failure after Latest Kernel Update - "warning: selinux targeted policy relabel is required"

warning: selinux targeted policy relabel is required

When rebooting the server due to kernel upgrade we may face below error due to "SELinux is in permissive mode, the operation would have been denied but was permitted due to permissive mode."

Error:

Warning -- SELinux targeted policy relabel is required. Relabeling could take a very long time, depending on file system size and speed of hard drives.

Reason:

SELinux is preventing access to files with the label, file_t.

Fix:

We have done below steps to overcome the issue,

> Login the server through KVM

> Enter into single user mode.

> Edit the file: "/etc/selinux/config" as below

SELINUX=permissive

to

SELINUX=disabled

> exit from single user mode

Now the box will boot-up normally. :) !!!

2 comments:

  1. Once rebooted, can one turn SELinux back on? Does it then boot okay, or should one just wait for "a very long time" for the relabeling to proceed?

    ReplyDelete
  2. Hello Jess H. Brewer,

    Disabling SELinux would be a temporary solution or the troubleshooting way to identify whether the SELinux causing the issue. You can try Relabeling a File System Using init,

    https://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-fsrelabel.html

    https://www.centos.org/forums/viewtopic.php?t=19623

    Thanks.

    ReplyDelete