Kernel panic – not syncing: Attempted to kill init! CentOS 6.2

Just installed CentOS 6.2 into a VMWare environment and rebooted and got:

Kernel panic – not syncing: Attempted to kill init!

The cause was I had edited /etc/selinux/config to disable selinux but edited the wrong settting:

This is the mistake I made

# 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=enforcing
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=disabled

This is what it should have looked like

# 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=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

 

8 Comments

  1. Hi. I found a funny answer, see below:

    1. Reboot your VM or PC.
    2. Press key ESC.
    3. Select the Kernel for running and press key e for edit it.
    4. Insert selinuex=0 at end of kernel parameter line and press enter key.
    5. Press b key for boot.

    Is a possible solution but I don’t found anyone more with the same problem, or thread on internet.

    Thanks for read…

    Reply
      • Ok. I can edit selinux config file and correct the error made before.

        Reboot……………………………………………………………..

        Perfectly!!!!

        Thanks

        Reply
    • thank´s men.

      Reply
  2. Thanks so much for this nice posting. It works very well for me after messing with selinux. You guys are genius.

    Reply
  3. How did you determine that selinux was the problem? I have a similar issue, at least the error is similar (but not using VMWARE). thank you

    Reply
    • I determined that seLinux was the problem because it was the last thing I mucked around with before the problem appeared.

      Reply
  4. Superb!!!! This saved my 4 hours of re-configuring the server.

    Thanks.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>