On some architectures (arm64) the name of the kernel file
is usually Image. Add support for it instead of working around it.
if ! [[ $kernel_image ]]; then
for kernel_image in "${dracutsysrootdir-}/lib/modules/$kernel/vmlinuz" "${dracutsysrootdir-}/boot/vmlinuz-$kernel" \
- "${dracutsysrootdir-}/lib/modules/$kernel/vmlinux" "${dracutsysrootdir-}/boot/vmlinux-$kernel"; do
+ "${dracutsysrootdir-}/lib/modules/$kernel/vmlinux" "${dracutsysrootdir-}/boot/vmlinux-$kernel" \
+ "${dracutsysrootdir-}/lib/modules/$kernel/Image"; do
[[ -s $kernel_image ]] || continue
break
done
VMLINUZ="/lib/modules/${KVERSION}/vmlinux"
fi
+ if ! [ -f "$VMLINUZ" ]; then
+ VMLINUZ="/lib/modules/${KVERSION}/Image"
+ fi
+
if ! [ -f "$VMLINUZ" ]; then
[[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id
! [ -f "${VMLINUZ-}" ] && VMLINUZ=$(find /boot/vmlinuz-* -type f 2> /dev/null | tail -1)
! [ -f "${VMLINUZ-}" ] && VMLINUZ=$(find /lib/modules/ -type f -name vmlinuz 2> /dev/null | tail -1)
+ ! [ -f "${VMLINUZ-}" ] && VMLINUZ=$(find /lib/modules/ -type f -name Image 2> /dev/null | tail -1)
if ! [ -f "$VMLINUZ" ]; then
echo "Could not find a Linux kernel version to test with!" >&2