Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #268874

Automatic reboot on kernel crash in Debian 12 - how?

From Michael Kjörling <2695bd53d63c@ewoof.net>
Newsgroups linux.debian.user
Subject Automatic reboot on kernel crash in Debian 12 - how?
Date 2024-04-16 11:20 +0200
Message-ID <ItN8R-6DsJ-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


I have a handful of Debian 12 systems that I want to configure such
that they reboot automatically in case of a problem. I have set them
up with userspace scripts (executed through cron) to reboot if
something goes wrong there; that appears to work as expected if I
induce an issue that those scripts check for. That leaves kernel-level
issues.

To try to configure this, I have created a file
/etc/sysctl.d/local.conf (owned by root:root, mode 0644).

# cat /etc/sysctl.d/local.conf
kernel.panic = 120
kernel.panic_on_oops = 1
kernel.panic_on_stackoverflow = 1
kernel.panic_on_io_nmi = 1
#

With the exception of panic_on_stackoverflow, as far as I can tell
these are in effect after a reboot:

#  sysctl kernel.panic kernel.panic_on_oops kernel.panic_on_stackoverflow kernel.panic_on_io_nmi
kernel.panic = 120
kernel.panic_on_oops = 1
sysctl: cannot stat /proc/sys/kernel/panic_on_stackoverflow: No such file or directory
kernel.panic_on_io_nmi = 1
#

However, this morning I woke up to one of those systems showing a
kernel crash dump and being frozen. Unfortunately the first part of
the crash dump had scrolled past so I couldn't tell what class of
problem caused the crash.

Do I need to set some more settings to ensure that the system will
automatically reboot on a panic? If so, what?

I know that best is to not crash; this is _in case of_.

-- 
Michael Kjörling                     🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Automatic reboot on kernel crash in Debian 12 - how? Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-04-16 11:20 +0200
  Re: Automatic reboot on kernel crash in Debian 12 - how? Nicolas George <george@nsup.org> - 2024-04-16 11:30 +0200
    Re: Automatic reboot on kernel crash in Debian 12 - how? Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-04-16 11:40 +0200
      Re: Automatic reboot on kernel crash in Debian 12 - how? Nicolas George <george@nsup.org> - 2024-04-16 11:50 +0200
        Re: Automatic reboot on kernel crash in Debian 12 - how? Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-04-16 11:50 +0200
  Re: Automatic reboot on kernel crash in Debian 12 - how? Franco Martelli <martellif67@gmail.com> - 2024-04-16 23:00 +0200
  Re: Automatic reboot on kernel crash in Debian 12 - how? Max Nikulin <manikulin@gmail.com> - 2024-04-17 04:50 +0200

csiph-web