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 CONFIG_EFI_VARS_PSTORE=y CONFIG_PSTORE=y CONFIG_PSTORE_DEFAULT_KMSG_BYTES=65536 CONFIG_PSTORE_DEFLATE_COMPRESS=y CONFIG_PSTORE_COMPRESS=y CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" CONFIG_PSTORE_CONSOLE=y CONFIG_PSTORE_PMSG=y CONFIG_PSTORE_RAM=y 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` rm /sys/fs/pstore/* (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.... _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies