Wednesday, 24 April 2019

How to resolve SELinux misconfiguration error by Raj Gupta

If our EC2 server are giving the below error:-




audit(1313445102.626:2): enforcing=1 old_enforcing=0 auid=4294967295
Unable to load SELinux Policy. Machine is in enforcing mode. Halting now. 
Kernel panic - not syncing: Attempted to kill init!


Root Caused:-

SELinux has been enabled in error:
• Supplied kernel is not supported by GRUB (GRand Unified Bootloader)
• Fallback kernel does not exist


Solution:-

A.  If server is Amazon EBS-backed:-

1. Stop the failed instance. 
2. Detach the failed instance's root volume. 
3. Attach the root volume to another running Linux instance (later referred to as a recovery instance). 
4. Connect to the recovery instance and mount the failed instance's root volume.
5. Disable SELinux on the mounted root volume

On some systems, you disable SELinux by setting SELINUX=disabled in the /mount_point/etc/sysconfig/ selinux file, where mount_point is the location that you mounted the volume on your recovery instance.

6. Unmount and detach the root volume from the recovery instance and reattach it to the original instance. 
7. Start the instance

B. If server is Instance store-backed:-

Terminate the instance and launch a new instance.

1 comment:

  1. Hello everyone , here’s your opportunity for you to achieve your dreams of being a multi million dollar rich through trading , I once loss all I got through trading but was fortunate to come across a woman with great virtue and selfless heart (Mary ) i was introduce to her masterclass strategy while searching online which has revived me of all my losses and made me gain more and more . With her unique strategy you are entitled to daily signals and instant withdraw ,be rest assured of getting a refund of all your loss investment with any platform that has denied you in one way or the other in getting your money . Mrs Mary masterclass strategy is simply the best for beginners and those that are finding it difficult to succeed through trading she’ll help you with just a simple step . Email her ( maryshea03 @ Gmail .com) WhatsApp +1 562 384 7738 . Remember this is absolutely free!!!

    ReplyDelete