armbian-next: fix for grub's DISTRO_GENERIC_KERNEL on Debian (not Ubuntu) during update-initramfs

- `initrd`: when kernel not found, list the installed kernels
- armbian-next: small fix for `grub` extension naming
This commit is contained in:
Ricardo Pardini
2022-10-16 11:46:42 +02:00
parent 4a9529dd34
commit 277ce40e6f
2 changed files with 11 additions and 8 deletions

View File

@@ -20,9 +20,10 @@ update_initramfs() {
if [ "$target_dir" != "" ]; then
initrd_kern_ver="$(basename "$target_dir")"
initrd_file="${chroot_target}/boot/initrd.img-${initrd_kern_ver}"
update_initramfs_cmd="TMPDIR=/tmp update-initramfs -uv -k ${initrd_kern_ver}" # @TODO: why? TMPDIR=/tmp
else
display_alert "Can't find kernel for version, here's what is in /lib/modules" "VER: ${VER}" "wrn"
SHOW_LOG=yes run_host_command_logged find "${chroot_target}/lib/modules"/ -maxdepth 1
exit_with_error "No kernel installed for the version" "${VER}"
fi