Score:1

How to enable pstore for kernel panics on Ubuntu 18.04?

id flag

What I have:

  • Ubuntu 18.04 server with HWE 5.4.0-136 kernel

  • systemd-237 (without systemd-pstore service).

  • /sys/module/pstore/parameters/backend contains (null)

  • pstore is automatically mounted to /sys/fs/pstore

  • EFI-related messages in dmesg | grep -i efi:

    ACPI: UEFI 0x000000003B55B7B8 000048 (v01 ALASKA A M I    00000002      01000013)
    ACPI: Reserving UEFI table memory at [mem 0x3b55b7b8-0x3b55b7ff]
    
  • Pstore-related vars in /boot/config:

    CONFIG_EFI_VARS_PSTORE=m
    # CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
    CONFIG_CHROMEOS_PSTORE=m
    CONFIG_PSTORE=y
    CONFIG_PSTORE_DEFLATE_COMPRESS=y
    # CONFIG_PSTORE_LZO_COMPRESS is not set
    # CONFIG_PSTORE_LZ4_COMPRESS is not set
    # CONFIG_PSTORE_LZ4HC_COMPRESS is not set
    # CONFIG_PSTORE_842_COMPRESS is not set
    # CONFIG_PSTORE_ZSTD_COMPRESS is not set
    CONFIG_PSTORE_COMPRESS=y
    CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
    CONFIG_PSTORE_COMPRESS_DEFAULT="deflate"
    # CONFIG_PSTORE_CONSOLE is not set
    # CONFIG_PSTORE_PMSG is not set
    # CONFIG_PSTORE_FTRACE is not set
    CONFIG_PSTORE_RAM=m
    

What I want:

  • access dmesg after kernel panic.

What I did:

  • vi /etc/default/grub

    GRUB_CMDLINE_LINUX="pstore.backend=efi efi_pstore.pstore_disable=0"
    
  • update-grub

  • vi /etc/sysctl.d/KernelPanic.conf

    kernel.panic=30
    
  • vi /etc/modules-load.d/KernelPanic.conf

    efi_pstore
    ramoops
    

After reboot:

  • lsmod reports that modules are loaded, but without messages in dmesg
  • /sys/module/pstore/parameters/backend contains efi
  • dmesg | grep -i pstore displays kernel cmdline only

Initiate panic:

echo 65535 > /proc/sys/kernel/sysrq
sync
echo c > /proc/sysrq-trigger

After restart:

  • /sys/fs/pstore is empty -- why?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.