Automatic reboot after a Kernel Panic

By default after a kernel panic, Linux kernel just waits there for a system administrator to hit the restart or powercycle button.  This is because of the value set on “kernel.panic” parameter.

To disable this and make the Linux OS reboot after a kernel panic, we have to set an integer N greater than zero to the paramter “kernel.panic”, where “N” is the number of seconds to wait before a automatic reboot.

For example , if you set N = 10 , then the system waits for 10 seconds before automatic reboot. To make this permanent, edit /etc/sysctl.conf and set it.

This helps in preventing manual intervention after a kernel panic. Setup some kernel dump or netdump to capture the kernel crash debug information.

Leave a Reply