www.LinuxHowtos.org

edit this article

Make your machine automatically reboot on kernel panic

Usually a linux system can be run months without reboot and crashes. Some people report even years of uptime.
But from time to time, some sort of kernel panic may happen.
If that machine is out of reach, you have some kind of trouble to reboot it. But there is a nice feature build into the kernel: it enables you to reboot after a timeout when a kernel panic happens.
All you have to do is add the kernel parameter panic=X to your boot line in your bootloader (linux, grub, or others).
X is the timeout in seconds. The kernel waits X seconds and reboots. A value of 0 means the feature is disabled (default).

If you enable the auto reboot, make sure you check your uptime and logs from time to time to see if there was a reboot lately.

You can also change that value on a running system without reboot. Just run

echo X>/proc/sys/kernel/panic

Remeber: this setting gets reset after a reboot (kernel panic or manual)


rate this article:
current rating: average rating: 1.5 (60 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back