[kdump] Add more kernel panic conditions for vmcore dump (#6095)

Create new file to "sysctl.d" with desired panic conditions.
It will trigger a vmcore dump using kdump-tools on these situations.

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
This commit is contained in:
shlomibitton 2020-12-15 18:54:13 +02:00 committed by GitHub
parent b60448a006
commit a6aaffd2ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -334,6 +334,9 @@ sudo LANG=c chroot $FILESYSTEM_ROOT chmod 644 /etc/group
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "mkdir -p /etc/initramfs-tools/conf.d"
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo 'MODULES=most' >> /etc/initramfs-tools/conf.d/driver-policy"
# Copy vmcore-sysctl.conf to add more vmcore dump flags to kernel
sudo cp files/image_config/kdump/vmcore-sysctl.conf $FILESYSTEM_ROOT/etc/sysctl.d/
#Adds a locale to a debian system in non-interactive mode
sudo sed -i '/^#.* en_US.* /s/^#//' $FILESYSTEM_ROOT/etc/locale.gen && \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT locale-gen "en_US.UTF-8"

View File

@ -0,0 +1,7 @@
kernel.panic_on_oops=1
kernel.panic_on_unrecovered_nmi=1
kernel.panic_on_io_nmi=1
kernel.panic_on_stackoverflow=1
kernel.hung_task_panic=1
kernel.unknown_nmi_panic=1
vm.panic_on_oom=1