Steps
- Make sure following configs are on/off for current kernel
# CONFIG_KASAN is not set
CONFIG_RELOCATABLE=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_DEBUG_INFO=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_PROC_VMCORE=y
- Install kexec and crash tool
$ sudo apt install kexec-tools makedumpfile crash
- Add 'crashkernel' parameter to grub
$ sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="crashkernel …