Do not automatically restart on system failure

Tom H tomh0665 at gmail.com
Sat May 14 04:42:06 UTC 2011


On Fri, May 13, 2011 at 12:51 PM, Gustavo Lacoste <gustavo at lacosox.org> wrote:
>
> I need to know: how do not automatically  restart GNU/Linux after a critical
> system failure (kernel panic). For some reason the pc is rebooted, actually
> throws the error screen Reboot just moments before, but I can't to read it
> before you reboot. I tried using:
>
> echo 0 > /proc/sys/kernel/panic
>
> sysctl -p
>
> and I find that the value is stored with
>
> cat /proc/sys/kernel/panic
>
> but still does not work, does anyone know another way to indicate that no
> restart linux after a failure?

(You don't have to run "sysctl -p" after "echo 0 >
/proc/sys/kernel/panic". "sysctl -p" is needed after "echo
'kernel.panic=0 >> /etc/sysctl.conf".

"0" is the Ubuntu default for "cat /proc/sys/kernel/panic"; you
shouldn't have to set it. If it isn't "0", you must be modifying it
through "kernel.panic=xy" in "/etc/sysctl.conf" or through "panic=xy"
on the "linux" line in "/boot/grub/grub.cfg" (or even "sysctl -w
kernel.panic=xy" in a startup file).

Does your box reboot after the following (it shouldn't):

echo 0 > /proc/sys/kernel/panic
echo 1 > /proc/sys/kernel/sysrq
## WARNING ## the following will crash your box ## WARNING ##
echo c > /proc/sysrq-trigger




More information about the ubuntu-users mailing list