Kernel Panic Upon Reboot After Changing SELINUX

Mindwatering Incorporated

Author: Tripp W Black

Created: 06/22/2013 at 04:13 PM

 

Category:
Linux
Kernel

Issue:
You needed to disable SELINUX, so you edited the etc/selinux/config file and changed SELINUX to "disabled" or "0". You probably followed the command to touch a file in the root directory structure.
Upon reboot, the following occurred:
Kernel panic not syncing attempted to kill init!

Solution:
Your distro of Linux does NOT like what you changed. This is easily fixed:

1. Boot your installation DVD.
2. Choose the rescue mode.
3. Take the default language and other questions until you see an option for Console/Terminal. Take the option, choose the option to mount the local disk, and continue.
4. Several times it will tell you the path to the disk file system (e.g. /mnt/sysimage/).
5. When you finally get to the terminal window, enter the following:
# cd /mnt/sysimage/etc/selinux
# vi config
(click a to insert at the cursor, click the delete key once to delete a character, watch as delete key quickly twice deletes a line. click esc and then :wq and enter to save)
Change the SELINUX from disabled to 0, or from 0 to disabled. Make sure the type field stays the same, if you accidentally changed it, too, change it back to targeted.
Save the change, and reboot.
# reboot

You should be able to watch it boot. Only difference from normal is that the machine will likely say that it has to set permissions on all the whole drive and you will watch dots while it does its thing.


previous page

×