From 3316c2d7356c6653aa83ef140c1eb3f1c21627f8 Mon Sep 17 00:00:00 2001 From: Lianbo Jiang Date: Wed, 9 Jan 2019 22:29:52 +0800 Subject: [PATCH] earlykdump: fix kexec fails to load the early kdump kernel Early kdump always fails to load the vmlinuz-xxx after the 'binutils' package has been installed, and outputs the following messages: ... dracut-cmdline[309]: Cannot determine the file type of /boot/vmlinuz-4.18.0-51.el8.x86_64 dracut-cmdline[309]: kexec: failed to load early-kdump kernel ... The reason is that the vmlinuz-xxx image is mistakenly stripped when using dracut to generate the kdump initrd. Because dracut always find all executable binary files to strip only if the 'binutils' package is installed, otherwise it will skip the stripping. Therefore, remove the executable permissions of the vmlinuz-xxx in '${initrd}' in order to let dracut skip the mistakenly stripping. Signed-off-by: Lianbo Jiang Acked-by: Kairui Song --- dracut-early-kdump-module-setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dracut-early-kdump-module-setup.sh b/dracut-early-kdump-module-setup.sh index 7613fbc..a004a49 100755 --- a/dracut-early-kdump-module-setup.sh +++ b/dracut-early-kdump-module-setup.sh @@ -41,4 +41,5 @@ install() { prepare_kernel_initrd inst_binary "$KDUMP_KERNEL" inst_binary "$KDUMP_INITRD" + chmod -x "${initdir}/$KDUMP_KERNEL" }