By default after a kernel panic Linux just waits there for a sysadmin to hit the restart or powercycle button.  This is because of the value set on "kernel.panic" parameter.

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

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.

[root@linux23 ~]# echo "10" > /proc/sys/kernel/panic
0
[root@
linux23 ~]# grep kernel.panic /etc/sysctl.conf
kernel.panic = 10
[root@linux23 ~]#

0 comments

Disclaimer

All the information presented on this blog is provided on the basis of as is and is meant for reference purpose only without any expressed or implied warranty. Use of the information and its application in any form is sole discretion and responsibility of the user. unixfoo.blogspot.com is not responsible for any damage or loss arising out of use of information presented here. This web site has links to external web sites and unixfoo.blogspot.com is not responsible for the contents at those sites.