How to fix Failed to Load SELinux Policy error
-
- Posts: 14
- Joined: 2014/12/05 09:52:36
Re: How to fix Failed to Load SELinux Policy error
I suspect the IT people in charge hasn't actually attached the ISO image nor has set it up for DVD boot
Re: How to fix Failed to Load SELinux Policy error
Just because there is no follow-up on this and I encountered a similar problem:
I started up my virtual machine by editing grub (press 'e' when the grub menu appears), look for the line starting with 'linux16' and add 'selinux=0' as one of the parameters (without quotes). Press Ctrl-x to boot while skipping SELinux.
Once the system has started, 'yum reinstall selinux-policy-targeted' and reboot the system. Problem fixed.
Please note that it can take a while because the system needs to relable for SELinux to work correctly.
I had this problem on CentOS 7 after upgrading my VirtualBox host and vbox addons.
I used https://asafshoval.wordpress.com/2014/1 ... ing-linux/ as a reference together with this thread to resolve the issue.
Thanks for the suggestion to reinstall selinux, that did the trick. There's no need to start up from a boot cd/dvd, just edit grub like I did.
I started up my virtual machine by editing grub (press 'e' when the grub menu appears), look for the line starting with 'linux16' and add 'selinux=0' as one of the parameters (without quotes). Press Ctrl-x to boot while skipping SELinux.
Once the system has started, 'yum reinstall selinux-policy-targeted' and reboot the system. Problem fixed.
Please note that it can take a while because the system needs to relable for SELinux to work correctly.
I had this problem on CentOS 7 after upgrading my VirtualBox host and vbox addons.
I used https://asafshoval.wordpress.com/2014/1 ... ing-linux/ as a reference together with this thread to resolve the issue.
Thanks for the suggestion to reinstall selinux, that did the trick. There's no need to start up from a boot cd/dvd, just edit grub like I did.
Re: How to fix Failed to Load SELinux Policy error
Hi,
I having same problem. I receive "Failed to load SELinux policy, freezing".
I am using Finnix ISO to boot, but when I am looking for /etc/selinux/config, the configuration file is missing.
Thanks in advance!
I having same problem. I receive "Failed to load SELinux policy, freezing".
I am using Finnix ISO to boot, but when I am looking for /etc/selinux/config, the configuration file is missing.
Thanks in advance!
Re: How to fix Failed to Load SELinux Policy error
This would work on version 7 that is not HARDENED enough , This would allow you to login to the system, to disable SELINUX(because you cant get in with it running) and do your TROUBLESHOOTING once you get IN. please follow carefully:
1. reboot
2. on the load screen, select the kernel you are using, DON'T hit enter. but on your keyboard type "e"
3. find that line that starts with "linux16", on the end of that line insert "rd.break"
4. now you will be able to login and type commands from there, so type in "mount -o remount,rw /sysroot"
5. then type in --> "chroot /sysroot"
6. Set the selinux to disabled "sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' "
7. type in exit, exit
1. reboot
2. on the load screen, select the kernel you are using, DON'T hit enter. but on your keyboard type "e"
3. find that line that starts with "linux16", on the end of that line insert "rd.break"
4. now you will be able to login and type commands from there, so type in "mount -o remount,rw /sysroot"
5. then type in --> "chroot /sysroot"
6. Set the selinux to disabled "sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' "
7. type in exit, exit
Re: How to fix Failed to Load SELinux Policy error
That's a lot of steps when you could just append selinux=0 to the end of the kernel command line at the grub prompt and boot up once.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 3
- Joined: 2018/02/15 04:33:18
Re: How to fix Failed to Load SELinux Policy error
I just ran into this problem and used selinux=0 from GRUB to get into my system. Once there, I was able to determine the actual cause of the problem so I thought I would share. The cause of the problem was that when I modified /etc/sysconfig/selinux in order to disable SELinux, I accidentally did this:
When I should have done this:
Once I corrected this my system boots just fine. I hope this helps someone resolve their problem.
Code: Select all
SELINUXTYPE=disabled
When I should have done this:
Code: Select all
#SELINUXTYPE=targeted
SELINUX=disabled
Re: How to fix Failed to Load SELinux Policy error
We don't recommend disabling it at all. If you need to find out if selinux is responsible for a problem then running setenforce 0 as root will put it into permissive mode which will allow all access and log what it would have denied. From that info you can use the wiki page to either turn on a boolean to allow what was denied or create a custom policy - takes a few minutes.
Useful resources for SELinux: http://wiki.centos.org/HowTos/SELinux | http://wiki.centos.org/TipsAndTricks/SelinuxBooleans | http://docs.fedoraproject.org/en-US/Fed ... ced_Linux/ | http://www.youtube.com/watch?v=bQqX3RWn0Yw | http://opensource.com/business/13/11/se ... licy-guide
Useful resources for SELinux: http://wiki.centos.org/HowTos/SELinux | http://wiki.centos.org/TipsAndTricks/SelinuxBooleans | http://docs.fedoraproject.org/en-US/Fed ... ced_Linux/ | http://www.youtube.com/watch?v=bQqX3RWn0Yw | http://opensource.com/business/13/11/se ... licy-guide
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: How to fix Failed to Load SELinux Policy error
That's a real bug somehow.
I know that it's may not be secure to disable it but it may be done for practical and temporary purpose, even if Selinux can be disabled for a session time. I alos made some modifications in Selinux policies, and after a while, i decided to disabled it just for some days.
I wonder why there is the disable option if lead to freezing Centos ?
I know that it's may not be secure to disable it but it may be done for practical and temporary purpose, even if Selinux can be disabled for a session time. I alos made some modifications in Selinux policies, and after a while, i decided to disabled it just for some days.
I wonder why there is the disable option if lead to freezing Centos ?