Monday, February 04, 2013

Linux kernel panic init Not tainted

During the installation of a test server I suddenly got some strange messages while trying to switch between users. After a logout of the system I was unable to login as any user. In a last desperate attempt I rebooted the machine with the result that there was now directly after the machine started a kernel panic message. In my case the message consisted out of the following:

Kernel panic - not syncing: Attempted to kill init!
PID: 1, comm: init Not tainted 2.6.39-300.26.1.el6uek.i686 #1

This error can have many causes however in my case it turned out to be a typo while changing some settings to selinux when I wanted to disable it. To disable selinux under Oracle linux you will need to change the configuration file /etc/selinux/config and change the

SELINUX=enforced

into the line:

SELINUX=disabled

during this process I did make a typo resulting in the kernel panic. To resolve such a kernel panic you can boot into rescue mode with the install CD and mount your filesystem. After mounting the filesystem correct the mistake and reboot the machine again and you are good to go.




4 comments:

M.Smith said...

Well Kernel panics happen for a variety of reasons. Often due to hardware failure... You'll need to check out /var/log/dmesg and /var/log/syslog to get more info about what actually happened.

Smith!
Quality Web Programmer

rtt said...

M. Smith you are right but one way to reproduce this exact kernel panic at boot time (and the only time I've seen it) is if you mess up /etc/selinux/config in any, way shape or form.

Anonymous said...

Thanks Johna... much appreciated.. :)

Anonymous said...

Johan, thank you... didn't know SELinux could cause a Kernel Panic :-O