From f00c36641a253f4ea659ec3def5d87ba1336eb3b Mon Sep 17 00:00:00 2001 From: Eric DeVolder Date: Mon, 13 Apr 2020 16:22:04 -0500 Subject: pstore: introduce tmpfiles.d/systemd-pstore.conf The systemd pstore service archives the contents of /sys/fs/pstore upon boot so that there is room for a subsequent dump. The issue is that while the service is present, the kernel still needs to be configured to write data into the pstore. The kernel has two parameters, crash_kexec_post_notifiers and printk.always_kmsg_dump, that control writes into pstore. The crash_kexec_post_notifiers parameter enables the kernel to write dmesg (including stack trace) into pstore upon a panic, and printk.always_kmsg_dump parameter enables the kernel to write dmesg upon a shutdown (shutdown, reboot, halt). As it stands today, these parameters are not managed/manipulated by the systemd pstore service, and are solely reliant upon the user [to have the foresight] to set them on the kernel command line at boot, or post boot via sysfs. Furthermore, the user would need to set these parameters in a persistent fashion so that that they are enabled on subsequent reboots. This patch introduces the setting of these two kernel parameters via the systemd tmpfiles technique. --- tmpfiles.d/meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'tmpfiles.d/meson.build') diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build index e77f46d06b..0a9582d8b9 100644 --- a/tmpfiles.d/meson.build +++ b/tmpfiles.d/meson.build @@ -8,6 +8,7 @@ tmpfiles = [['home.conf', ''], ['systemd-nspawn.conf', 'ENABLE_MACHINED'], ['systemd-tmp.conf', ''], ['portables.conf', 'ENABLE_PORTABLED'], + ['systemd-pstore.conf', 'ENABLE_PSTORE'], ['tmp.conf', ''], ['x11.conf', ''], ['legacy.conf', 'HAVE_SYSV_COMPAT'], -- cgit v1.2.3