![]() |
Automatically Reboot on Panic(An alternative - which will also catch hard locks, and some types of resource starvation - is to use the NSLU2's hardware watchdog e.g. see OpenSlug.Watchdog). This is derived from http://gentoo-wiki.com/TIP_Kernel_Panic_Reboot I have not tested this yet myself, but it was felt to be interesting enough to add here; if this works for you please remove this disclaimer This page only explains how to automatically reboot on a panic. If you want to automatically reboot after a power failure you'll need to make a hardware modification. See ForcePowerAlwaysOn Checking if automatic reboot is enabledTo check if Automatic Reboot is enabled try this:
The returned value is the time the kernel will wait before it reboots. If it is 0 or lower, it won't reboot by itself. Default the value is 0. Enabling kernel panic rebootTo set the kernel to reboot do this command (as root):
Where 5 is replaced with the number of seconds to wait till reboot after a kernel panic. To check the time was set right do this:
and the value 5 (or whatever value you picked) should be returned. Making it permanentTo make it more permanent do this (again as root):
Alternately, you can add a kernel parameter to your boot loader:
This has the advantage of rebooting after a panic even if the panic happens before there is a chance for the system to interpret /etc/sysctl.conf (such as an attempted boot with a bad initrd) |