tag 1114521 -moreinfo thanks On 06/09/2025 16:30, Daniel Baumann wrote:
On 9/6/25 16:13, Roland Clobus wrote:Attached you'll find a patch that always includes the efivarfs modules in the initrd.imgWhy would you want to load efivars on non-efi systems and what happens when you do (e.g. will it show an error message that disturbs the boot process)?
When the live image is generated on a host that was booted from BIOS, it will not have added the efivarfs kernel modules into the initrd.img. When such an image is booted on an UEFI system, you'll see an error message as in #1110729: the kernel modules cannot be loaded.
With the provided patch, it will include the efivarfs kernel module into the initrd.img (so that will be slightly larger). When booting such an initrd.img, it will load the kernel modules, but not use them, as the if-statement `if [ -e /sys/firmware/efi ]` will enter the else-branch.
I have generated live images both from BIOS and UEFI systems to test this patch and booted the resulting image with BIOS and UEFI systems (all in qemu). As far as I can see, it works well.
With kind regards, Roland Clobus
OpenPGP_signature.asc
Description: OpenPGP digital signature

