site  contact  subhomenews

efibootmgr and efivar compiled in OE

July 10, 2022 — BarryK

I installed shinobar's Grub2config in EasyOS, but it reported that it needs 'efibootmgr'. So, have compiled it in OpenEmbedded, and its dependency package 'efivar'.

Here is the forum thread for Grub2config:

https://forum.puppylinux.com/viewtopic.php?t=3360

My hat off to shinobar for creating Grub2config. It is a very complicated bootloader, and it is easy for users to get confused. Like me. I have just installed Debian, Manjaro, Mint, EndeavourOS and openSUSE, for testing Limine bootloader. That's when I discovered each distribution has its own ideas how to install Grub.

I was reading Rod's rEFInd documentation about Grub, and he indicated that most of the Linux distributions do not install Grub in the esp partition. He mentioned that Fedora does, which in his opinion is the most sensible place to install Grub.

Anyway, I know nothing about Grub2, and will play with Grub2config and see what it does.

EDIT:
OK, got Grub2config to "work" -- in quotes, as there are issues.

Firstly, it cannot handle more than one esp partition in the same drive.

Secondly, finding installed OSs doesn't work well. Misses many and mis-detects some.

Thirdly, it doesn't mount /sys/firmware/efi/efivars. I had to do it manually:

# mount -v -t efivarfs efivarfs /sys/firmware/efi/efivars

Thanks to the BLFS people:

https://www.linuxfromscratch.org/blfs/view/svn/postlfs/grub-setup.html

I see also they recommend enabling CONFIG_EFI_RUNTIME_MAP in kernel config. Ok, will compile the latest 5.15.x kernel tonight, with that enabled.

EDIT 2022-07-11:
Have compiled kernel 5.15.53; however, the kernel documentation recommends to not enable CONFIG_EFI_RUNTIME_MAP, as it is a legacy option, replaced by efivarfs. So, left it disabled.
      

Tags: easy