kdump-tools: keep the default value for MODULES

Do not change the MODULES to 'dep' to avoid the following failure
during the progress to generate the initramfs, which is triggerred
by upgrading the kernel.
>update-initramfs: Generating /boot/initrd.img-6.12.0-1-amd64
>W: Possible missing firmware /lib/firmware/aic94xx-seq.fw for built-in driver aic94xx
>/etc/kernel/postinst.d/kdump-tools:
>kdump-tools: Generating /var/lib/kdump/initrd.img-6.12.0-1-amd64
>mkinitramfs: failed to determine device for /
>mkinitramfs: workaround is MODULES=most, check:
>grep -r MODULES /var/lib/kdump/initramfs-toolsError please report bug on initramfs-tools

TestPlan:
PASS: build-pkgs -c -p kdump-tools
PASS: sudo ostree admin unlock --hotfix(on AIO lab)
PASS: apt install kdump-tools deb package
PASS: Manually modify the apt_ostree util to bind mount /sys
PASS: software upload designer.patch (including kernel updates)
PASS: software show designer --packages
PASS: software deploy precheck designer
PASS: software deploy start designer
PASS: softwaare deploy show(to wait deploy-start-done)
PASS: system host-lock controller-0
PASS: software deploy host controller-0
      The error is gone during the kernel being upgraded.

Story: 2010867
Task: 52236

Change-Id: I3fc33c8abaa97291099725aa788d8a2319fd762d
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
This commit is contained in:
Zhixiong Chi
2025-05-26 05:04:25 +00:00
parent e25eb24d6c
commit 94ff711a1a
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,40 @@
From cf34313cdf97c541c46ea312cbb0a57511b8d92e Mon Sep 17 00:00:00 2001
From: Zhixiong Chi <zhixiong.chi@windriver.com>
Date: Fri, 23 May 2025 07:00:17 +0000
Subject: [PATCH] Keep the default value for MODULES
Do not change the MODULES to 'dep' to avoid the following failure
during the progress to generate the initramfs, which is triggerred
by upgrading the kernel.
>update-initramfs: Generating /boot/initrd.img-6.12.0-1-amd64
>W: Possible missing firmware /lib/firmware/aic94xx-seq.fw for built-in driver aic94xx
>/etc/kernel/postinst.d/kdump-tools:
>kdump-tools: Generating /var/lib/kdump/initrd.img-6.12.0-1-amd64
>mkinitramfs: failed to determine device for /
>mkinitramfs: workaround is MODULES=most, check:
>grep -r MODULES /var/lib/kdump/initramfs-toolsError please report bug on initramfs-tools
>Include the output of 'mount' and 'cat /proc/mounts'
>update-initramfs: failed for /var/lib/kdump/initrd.img-6.12.0-1-amd64 with 1.
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
---
debian/kernel-postinst-generate-initrd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/kernel-postinst-generate-initrd b/debian/kernel-postinst-generate-initrd
index 45d3625..f40d729 100755
--- a/debian/kernel-postinst-generate-initrd
+++ b/debian/kernel-postinst-generate-initrd
@@ -50,7 +50,7 @@ for I in $(lsmod | grep scsi_dh | cut -d" " -f1);do
echo "${I}" >> $initramfsdir/modules
done
-sed -e 's/MODULES=.*/MODULES=dep/' /etc/initramfs-tools/initramfs.conf > "$initramfsdir/initramfs.conf" || true
+cp /etc/initramfs-tools/initramfs.conf "$initramfsdir/initramfs.conf" || true
if ! [ -e "$initramfsdir/initramfs.conf" ];then
echo >&2 "W: kdump-tools: Unable to create $initramfsdir/initramfs.conf"
exit 2
--
2.49.0

View File

@ -2,3 +2,4 @@
0002-kdump-tools-adapt-check_secure_boot-checking.patch
0003-kdump-tools-disable-AER-to-fix-kdump-hung-issue.patch
0004-Do-not-load-unnecessary-device-drivers-in-the-kdump-.patch
0005-Keep-the-default-value-for-MODULES.patch