m/node: use pstore for panic storage
The old solution never worked as the ESP was not mounted at that stage.
In general storing crash data there is suboptimal as it makes lots of
assumptions about the system state.
For kernel crashes we already use pstore and there is an interface for
storing userspace messages in pstore as well. Set up the panic handler
to put its logs in there and extend the pstore cleanup runnable to also
dump that part of pstore into the logtree after reboot.
In most cases this also requires a kernel patch as most pstore backends
to not allow userspace messages, probably to preserve limited space.
Since we always clean pstore after reboot, this should be fine.
Change-Id: I011109112e7bfd24d1772d5853a1d491c0cfd026
Reviewed-on: https://review.monogon.dev/c/monogon/+/2753
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Tested-by: Jenkins CI
diff --git a/third_party/linux/external.bzl b/third_party/linux/external.bzl
index e862cb1..84ba704 100644
--- a/third_party/linux/external.bzl
+++ b/third_party/linux/external.bzl
@@ -27,6 +27,7 @@
patches = [
"//third_party/linux/external:0001-block-partition-expose-PARTUUID-through-uevent.patch",
"//third_party/linux/external:disable-static-ifs.patch",
+ "//third_party/linux/external:enable-pmsg.patch",
],
sha256 = sums[version],
strip_prefix = "linux-" + version,