On 09/06/2020 12:07, Peter Humphrey wrote: > On Tuesday, 9 June 2020 15:56:52 BST Peter Humphrey wrote: > # cat /boot/loader/entries/30-gentoo-5.7.1.conf > title Gentoo Linux 5.7.1initrd=/intel-uc.img > linux /vmlinuz-5.7.1-gentoo > options root=/dev/nvme0n1p4 initrd=/intel-uc.img net.ifnames=0 > raid=noautodetect
Since you are using systemd-boot or something that fulfils that specification[1], you can also build your kernel with EFI stub enabled (CONFIG_EFI_STUB) and then simply put the binary in: ${ESP}/EFI/Linux/vmlinuz-5.7.1-gentoo.efi You can then run `bootctl set-default vmlinuz-5.7.1-gentoo.efi` or on the menu, select it and press d to set it within systemd-boot. (My ASUS motherboard for some reason never lets me write EFI variables from within Linux so I have to do it from within systemd-boot.) You can specify the options in the kernel configuration as well: CONFIG_CMDLINE="root=/dev/nvme0n1p4 initrd=/intel-uc.img net.ifnames=0 raid=noautodetect" To add the /intel-uc.img to this configuration you either have to include that in kernel configuration or you can use Dracut to build an EFI image. Kernel config: CONFIG_INITRAMFS_SOURCE="/boot/intel_uc.img" Or with Dracut: dracut --force --uefi --uefi-stub '/usr/lib/systemd/boot/efi/linuxx64.efi.stub' ... Dracut will automatically pick up your kernel installed to /boot (from kernel `make install`) and /boot/intel-uc.img (and other similar things). It will also automatically place the file into In both cases, you have to remember to update the EFI image/rebuild and reinstall the kernel whenever you update intel-microcode. The benefit to this is you don't have to maintain entries files, and you keep configuration generally in one place: the kernel config. Then you just drop in EFI binaries into the correct place and they will appear in the menu. You could have always keep two Linux EFI binaries in ${ESP}/EFI/Linux/ in case the newest one fails. If you want to do this semi-automatically as part of updates and with UEFI secure boot signing, use my project: https://github.com/tatsh/upkeep [1] https://systemd.io/BOOT_LOADER_SPECIFICATION/ -- Andrew
signature.asc
Description: OpenPGP digital signature