1# SPDX-License-Identifier: LGPL-2.1-or-later 2# 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 5# is enabled with: 6# systemctl enable systemd-pstore 7# 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. 12# 13# The crash_kexec_post_notifiers parameter enables the kernel to write 14# dmesg (including stack trace) into pstore upon a panic even if kdump 15# is loaded, only needed if you want to use pstore with kdump. Without 16# this parameter, kdump could block writing to pstore for stability 17# reason. Note this increases the risk of kdump failure even if pstore 18# is not available. 19# 20# The printk.always_kmsg_dump parameter enables the kernel to write dmesg 21# upon a normal shutdown (shutdown, reboot, halt). 22# 23# To configure the kernel parameters, uncomment the appropriate 24# line(s) below. The value written is either 'Y' to enable the 25# kernel parameter, or 'N' to disable the kernel parameter. 26# 27# After making a change to this file, do: 28# systemd-tmpfiles --create path/to/tmpfiles.d/systemd-pstore.conf 29# 30# These changes are automatically applied on future re-boots. 31 32d /var/lib/systemd/pstore 0755 root root 14d 33#w- /sys/module/printk/parameters/always_kmsg_dump - - - - Y 34#w- /sys/module/kernel/parameters/crash_kexec_post_notifiers - - - - Y 35