How To Auto Reboot Linux box after a kernel panic Error in Linux

Posted: June 11, 2013 in Auto Restart Kernel panic Error, Troubleshooting

  1. What is kernel panic?
    When the kernel can’t load properly or “freaks out” and fails to boot properly or crashes(see edit credit at the bottom).
  2. Why it occurs?
    Hosed updates, failing hardware, unsupported hardware, failed or missing drive or partition (see edit credit at the bottom)
  3. How can I understand kernel panic occurred?
    Watch boot prompts(turn off quiet kernel parameter) OR your machine fails to boot
  4. What effect it has on system?
    Failure to boot or system crash
  5. Does it only occur in Linux?
    No, all unix-like operating systems can have kernel panics. It’s the equivalent of a Windows Blue Screen of Death
  6. How can I prevent it?
    It normally doesn’t happen. Test updates and troubleshoot the problem. Use stable instead of development branches.

If you want the server to get rebooted automatically after kernel hit by a pain error message, try adding panic=N to /etc/sysctl.conf file.

It specify kernel behavior on panic. By default, the kernel will not reboot after a panic, but this option will cause a kernel reboot after N seconds. For example following boot parameter will force to reboot Linux after 10 seconds.





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.