]> git.ipfire.org Git - thirdparty/grub.git/commit
util/grub.d/30_os-prober.in: Conditionally show or hide chain and efi menu entries
authorPascal Hambourg <pascal@plouf.fr.eu.org>
Mon, 24 Feb 2025 17:10:45 +0000 (18:10 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 5 Mar 2025 10:53:33 +0000 (11:53 +0100)
commitfbcc3889178a98d6189da5ef0ed1146613cce750
treece513d89adc50d35c87804a7a8c4635b81bdcb02
parent56ccc5ed569869fd735074ccebeaa7aab058342d
util/grub.d/30_os-prober.in: Conditionally show or hide chain and efi menu entries

On systems which support multiple boot platforms such as BIOS and
EFI, it makes no sense to show menu entries which are not supported
by the current boot platform. Menu entries generated from os-prober
"chain" boot type use boot sector chainloading which is supported
on PC BIOS platform only.

Show "chain" menu entries only if boot platform is PC BIOS.
Show "efi" menu entries only if boot platform is EFI.

This is aimed to allow os-prober to report both EFI and PC BIOS
boot loaders regardless of the current boot mode on x86 systems
which support both EFI and legacy BIOS boot, in order to generate
a config file which can be used with either BIOS or EFI boot.

Signed-off-by: Pascal Hambourg <pascal@plouf.fr.eu.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub.d/30_os-prober.in