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 <lijiang@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Lianbo Jiang 2019-01-09 22:29:52 +08:00 committed by Kairui Song
parent 2310616572
commit 3316c2d735

View File

@ -41,4 +41,5 @@ install() {
prepare_kernel_initrd
inst_binary "$KDUMP_KERNEL"
inst_binary "$KDUMP_INITRD"
chmod -x "${initdir}/$KDUMP_KERNEL"
}