1 # SPDX-License-Identifier: LGPL-2.1+
3 # The systemd-pstore.service(1) archives the contents of /sys/fs/pstore
4 # upon boot so that there is room for a subsequent dump. This service
6 # systemctl enable systemd-pstore
8 # With the service enabled, the kernel still needs to be configured
9 # to write data into the pstore. The kernel has two parameters,
10 # crash_kexec_post_notifiers and printk.always_kmsg_dump, that
11 # control writes into pstore.
13 # The crash_kexec_post_notifiers parameter enables the kernel to write
14 # dmesg (including stack trace) into pstore upon a panic, and
15 # printk.always_kmsg_dump parameter enables the kernel to write dmesg
16 # upon a normal shutdown (shutdown, reboot, halt).
18 # To configure the kernel parameters, uncomment the appropriate
19 # line(s) below. The value written is either 'Y' to enable the
20 # kernel parameter, or 'N' to disable the kernel parameter.
22 # After making a change to this file, do:
23 # systemd-tmpfiles --create path/to/tmpfiles.d/systemd-pstore.conf
25 # These changes are automatically applied on future re-boots.
27 d /var/lib/systemd/pstore 0755 root root 14d
28 #w- /sys/module/printk/parameters/always_kmsg_dump - - - - Y
29 w- /sys/module/kernel/parameters/crash_kexec_post_notifiers - - - - Y