NSLU2-Linux
view · edit · print · history

HowTo.AutoRebootOnPanic History

Hide minor edits - Show changes to markup

July 11, 2006, at 11:40 PM by dkg-debianorgfifthhorsemannet -- added kernel boot parameter option for making this setting permanent
Added lines 39-44:

Alternately, you can add a kernel parameter to your boot loader:

panic=5

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)

February 19, 2006, at 02:48 AM by t0ny -- Fixed an url -- haha small world/internet I started that other wiki article I fixed :P
Changed lines 6-7 from:

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

to:

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

February 18, 2006, at 02:13 PM by TimSmall --
Changed lines 3-5 from:

(An alternative (which will also catch hard locks) is to use the NSLU2's hardware watchdog e.g. see OpenSlug.Watchdog).

to:

(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).

February 18, 2006, at 02:12 PM by TimSmall -- Add Watchdog Reference.
Added lines 3-5:

(An alternative (which will also catch hard locks) is to use the NSLU2's hardware watchdog e.g. see OpenSlug.Watchdog).

February 05, 2006, at 04:16 PM by eFfeM -- added ref to HowTo/ForcePowerAlwaysOn
Added lines 5-6:

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

February 05, 2006, at 04:10 PM by repvik -- Remove bootloader blurb
Deleted lines 33-38:

Adding the following to your kernel parameters in your bootloaders configuration might also help:

panic=5

NOTE: Substitute 5 with the number of seconds to wait till reboot after a kernel panic.

February 05, 2006, at 04:07 PM by eFfeM -- creation
Added lines 1-39:

Automatically Reboot on Panic

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

Checking if automatic reboot is enabled

To check if Automatic Reboot is enabled try this:

cat /proc/sys/kernel/panic

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 reboot

To set the kernel to reboot do this command (as root):

echo "5" > /proc/sys/kernel/panic

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:

cat /proc/sys/kernel/panic

and the value 5 (or whatever value you picked) should be returned.

Making it permanent

To make it more permanent do this (again as root):

echo "kernel.panic=5" >> /etc/sysctl.conf

Adding the following to your kernel parameters in your bootloaders configuration might also help:

panic=5

NOTE: Substitute 5 with the number of seconds to wait till reboot after a kernel panic.

view · edit · print · history · Last edited by dkg-debianorgfifthhorsemannet.
Based on work by t0ny, TimSmall, eFfeM, and repvik.
Originally by eFfeM.
Page last modified on July 11, 2006, at 11:40 PM