Centos – Server won’t boot, kernel panic – not syncing

centosinitinitramfskernellinux-kernel

After a reboot of a CentOS 6.2 server we are getting a kernel panic with the following error:

Kernel panic - not syncing: Attempted to kill init!
Panic occurred, switching back to text console

When passing init=option selinux=0 to the kernel at boot the server will boot without a problem. I have tried searching for what init=option does but I have not been able to find any recourses explaining it.

  • Could someone explain what this parameter does?
  • Also, as this is a production server are there any negatives/risks in running with the init=option?

I have tried to remake the initramfs via dracut which did not work and received the above error upon boot.

As this is a clustered server and the primary server should be identical I have copied the /boot drive from the other server but this did not solve the problem either. (The other server does not have this behavior)

Restoring /boot from backup did not work either.

Could you please help me investigate this problem

  • What causes this kernel panic?
  • How would you go about resolving this issue?
  • What logs (if any) would tell you more information?
  • As this is an older install, would an update/upgrade potentially fix this issue?

I would also like to add that the only other possible related issue was that the root disk which was raid mirrored failed and was replaced before this happened.

Thanks for your help!

Best Answer

Note to self, and everyone else:

Make sure you type disabled instead of disable when you give up and instead decides to disable selinux!

cat /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=TAKE_A_CLOSE_LOOK_AT_THIS_VALUE

A typo in the SELINUX value will cause a kernel panic.