Reboot on kernel panic

Anyone who runs Linux servers remotely knows that you can do almost ANYTHING from the CLI. One of the more tricky things to do is install a new kernel. Too often, if there is an error in the new kernel build the machine will kernel panic and lock up.

The only way around that is to manually power cycle the machine – unless you pass a panic parameter to the kernel on boot up.

Just add a line like this to your lilo config

append=”panic=15″

After 15 seconds the machine will reboot. If lilo was run with the -R parameter, the server will come back up with the old kernel.