Kernel freezes instead of panicking
valdis.kletnieks at vt.edu
Tue Feb 8 20:30:24 EST 2022
On Tue, 08 Feb 2022 08:03:56 +0300, David Kahurani said:
> I figured I could use kdump to save the dmesg logs but it doesn't seem to
> work with later kernels.
kdump is probably overkill for just saving dmesg. If you're booting x86_64
in UEFI mode, using pstore to save the dmesg is probably a lot easier.
What I have in .config:
[~] zgrep -i pstore /proc/config.gz | grep ^C
On most crashes and hangs, after reboot you'll find the dmesg logs in /sys/fs/pstore
Note that you'll probably want to set up something that auto-recovers
the data during reboot, as there's only a limited amount of UEFI storage
available, so you can end up not getting messages if the space fills up.
(The alignment varies because of loglevel info, you might want something like:
cut -f2- -d'[' /sys/fs/pstore/* | sort -n | sed -e 's/^/[/' > pstore.`date +%m%d%y-%H%M`
(You need the rm because if you don't, the next time you'll get 2 interleaved
dmesgs from different boots and nothing will make sense :) Alternatively,
use the timestamps in the filenames to disambiguate the various crashes....
More information about the Kernelnewbies