Kernel-install generates wrong configs (ALHP repo)

Here I have a simple workaround until it gets fixed, not ideal but works:

Create a file under /etc/kernel/install.d/ with the name starts with 91- and ends with .install, I’ll use 91-fix_loaderentry.install

Copy these to /etc/kernel/install.d/91-fix_loaderentry.install

#!/bin/sh
 
for entry in /efi/loader/entries/$(cat /etc/machine-id)-*.conf
do
    sed -i 's/linux      \/efi/linux      /g' "$entry"
    sed -i 's/initrd     \/efi/initrd     /g' "$entry"
done

Make it executable:

sudo chmod +x /etc/kernel/install.d/91-fix_loaderentry.install

Then execute

sudo reinstall-kernels

Don’t forget to check entries with bootctl list before reboot.

Hope it helps someone

1 Like