It is possible for an entry in the EFI boot table to pass arguments to the stub that it loads. For example, this is commonly used to identify the system root when using the EFI-stub of a Linux Kernel.
Such a boot entry might be created with the efibootmgr
command, thus:
efibootmgr --create --disk /dev/nvme2n1 --part 1 --label "gentoo (test)" --loader "\EFI\Gentoo\bzImage-test.efi" --unicode "root=PARTUUID=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709"
Normally, entries that load GRUB do not supply any arguments and GRUB's menu-timeout is configured in /boot/grub/grub.cfg
. A typical entry for GRUB can be seen in the following output, produced by efibootmgr --unicode
:
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0002,0000,0003
...
Boot0001* gentoo HD(1,GPT,c12a7328-f81f-11d2-ba4b-00a0c93ec93b,0x800,0x100000)/File(\EFI\gentoo\grubx64.efi)
Can an EFI boot entry supply arguments to GRUB and could one use such an argument to override the timeout?
My reason for doing so would be for convenience: if this is possible, one might configure an infinite timeout in GRUB's /boot/grub/grub.cfg
and write two entries to the EFI table:
- one with no arguments that applied that infinite timeout (or whatever was set in
/boot/grub/grub.cfg
) - one that overrode it with a very short timeout, achieving a faster startup time.
This latter could be set as the default boot option but, in the event that a problem occurred, one could use the motherboard's firmware to boot from the former.