You are not logged in.
Pages: 1
Hello, i am trying to get pstore working, because i have crash like once a month and i want to see at least basic backtrace of crashed kernel.
I've tried to set pstore with EFI backend and it didn't worked. Then i've realized there is pstore_blk, which i like better, because i find block devices more straightforward than EFI subsystem. But it does not work either.
This is my kernel (linux-zen from official arch repo):
# uname -a
Linux arch 6.11.3-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 10 Oct 2024 20:11:02 +0000 x86_64 GNU/Linux
# zcat /proc/config.gz | grep -i pstore
CONFIG_EFI_VARS_PSTORE=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_MTD_PSTORE=m
CONFIG_CHROMEOS_PSTORE=m
CONFIG_PSTORE=y
CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
CONFIG_PSTORE_COMPRESS=y
# CONFIG_PSTORE_CONSOLE is not set
# CONFIG_PSTORE_PMSG is not set
# CONFIG_PSTORE_FTRACE is not set
CONFIG_PSTORE_RAM=m
CONFIG_PSTORE_ZONE=m
CONFIG_PSTORE_BLK=m
CONFIG_PSTORE_BLK_BLKDEV=""
CONFIG_PSTORE_BLK_KMSG_SIZE=64
CONFIG_PSTORE_BLK_MAX_REASON=2Here's how iam trying to set it up:
# modprobe pstore_blk blkdev=/dev/mmcblk0 kmsg_size=64 console_size=64 pmsg_size=64 ftrace_size=64 max_reason=0 best_effort=y
# cat /sys/module/pstore/parameters/backend
pstore_blk
# cat /sys/module/printk/parameters/always_kmsg_dump
Y
# cat /sys/module/kernel/parameters/crash_kexec_post_notifiers
Y
# echo "<1>THIS IS A TEST" > /dev/kmsg
# echo c > /proc/sysrq-triggerAt this point system is crashed with panic. I hold power button to reboot it and i try to read the pstore:
# modprobe pstore_blk blkdev=/dev/mmcblk0 kmsg_size=64 console_size=64 pmsg_size=64 ftrace_size=64 max_reason=0 best_effort=y
# mount | grep pstore
pstore on /sys/fs/pstore type pstore (rw,relatime)
# ls -la /sys/fs/pstore/ /var/lib/systemd/pstore/There is nothing in those directories. (First one is provided by kernel, the second one is where systemd-pstore would move the data if it did found some).
Do you please have any idea what i am doing wrong?
Offline
In mainline kernel, as of 7.0, dedicated panic_write function is implemented only for mtd subsystem (NAND flash), and probably also work for mmc (SD cards).
For mmc, there's no dedicated support yet. Two attempts were made [1] (2020-2021) [2] (2026)
SCSI/SATA/NVMe does not support it. There's only "best effort" support using regular functions which oftentimes use subsystems which can't be used during panics.
Just saw that you're using mmcblk. Well, doesn't work then. Need to patch the kernel.
I've tried to set pstore with EFI backend and it didn't worked.
systemd-pstore moves data from /sys/fs/pstore to /var/lib/systemd/pstore upon boot. Make sure to check that.
pstore works without additional configuration on modern systems. It uses efi-pstore and stores data in EFI variable.
On older systemd with BIOS it can save data to ACPI ERST if it's supported.
Last edited by ValdikSS (2026-07-23 18:35:16)
Offline
Pages: 1