In Linux, By default after kernel panic, Linux waits for a system admin to restart or power cycle server.. We can change this behavior and set to reboot automatically when a kernel panic occurs.. For that, we have to change the value set on “kernel.panic” kernel parameter.

Now we have to check the current value on this kernel parameter in Linux server:

[root@myserver ~]# cat /proc/sys/kernel/panic
[root@myserver ~]# sysctl -a | grep kernel.panic
kernel.panic = 0


To make the Linux server automatically reboot after a kernel panic, we have to set a value greater than 0. The value should be the number of seconds to wait before automatic reboot of the server. 

For example , if you set value 60 , then the server will wait for 60 seconds before automatic reboot after the kernel panic. To make this change permanent, edit /etc/sysctl.conf and set it there.

[root@myserver ~]# echo “10” > /proc/sys/kernel/panic

[root@myserver ~]# cat  /etc/sysctl.conf |   grep kernel.panic 
kernel.panic = 10