diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 8d228958ab..97272011c1 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -285,6 +285,7 @@ sudo sed -i -e '/^passwd/s/ tacplus//' $FILESYSTEM_ROOT/etc/nsswitch.conf if [[ $CONFIGURED_ARCH == amd64 ]]; then sudo DEBIAN_FRONTEND=noninteractive dpkg --root=$FILESYSTEM_ROOT -i $debs_path/kdump-tools_*.deb || \ sudo LANG=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true chroot $FILESYSTEM_ROOT apt-get -q --no-install-suggests --no-install-recommends --force-no install + cat $IMAGE_CONFIGS/kdump/kdump-tools | sudo tee -a $FILESYSTEM_ROOT/etc/default/kdump-tools > /dev/null fi # Install python-swss-common package and all its dependent packages diff --git a/files/image_config/kdump/kdump-tools b/files/image_config/kdump/kdump-tools new file mode 100644 index 0000000000..322bd6a880 --- /dev/null +++ b/files/image_config/kdump/kdump-tools @@ -0,0 +1,13 @@ +# --------------------------------------------------------------------------- +# Additional Kdump environment settings used in SONiC +# + +# Reboot crash kernel on panic +# Enable debug level logging of crash kernel for better visibility +# Disable advanced pcie features +# Disable high precision event timer as on some platforms it is interfering with the kdump operation +# Pass platform identifier string as part of crash kernel command line to be used by the reboot script during kdump +KDUMP_CMDLINE_APPEND+=" panic=10 debug hpet=disable pcie_port=compat pci=nommconf sonic_platform=__PLATFORM__" + +# Use SONiC reboot wrapper script present in /usr/local/bin post kdump +PATH=/usr/local/bin:$PATH diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 878345106c..23531fb74f 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -365,6 +365,9 @@ if [ -f $FIRST_BOOT_FILE ]; then # Firsttime ebtables configuration ebtables_config + # Kdump tools configuration + sed -i -e "s/__PLATFORM__/$platform/g" /etc/default/kdump-tools + firsttime_exit fi