|
From: | Renaud Métrich |
Subject: | [PATCH] search: new --efidisk-only option on EFI systems |
Date: | Tue, 1 Feb 2022 11:36:01 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
When using 'search' on EFI systems, we sometimes want to exclude
devices that are not EFI disks (e.g. md, lvm).
This is typically used when wanting to chainload when having a
software raid (md) for EFI partition:
with no option, 'search --file /EFI/redhat/shimx64.efi' sets root envvar to 'md/boot_efi' which cannot be used for chainloading since there is no effective EFI device behind.
Example of "grub.cfg" file used to chainload when system boots over the network:
~~~
menuentry 'Chainload Grub2 EFI from ESP' --id local {
unset root
search --file --no-floppy --efidisk-only --set=root /EFI/BOOT/BOOTX64.EFI
if [ -f ($root)/EFI/BOOT/grubx64.efi ]; then
chainloader ($root)/EFI/BOOT/grubx64.efi
elif [ -f ($root)/EFI/redhat/shimx64.efi ]; then
chainloader ($root)/EFI/redhat/shimx64.efi
elif [ -f ($root)/EFI/redhat/grubx64.efi ]; then
chainloader ($root)/EFI/redhat/grubx64.efi
fi
}
~~~
This patch has been tested on QEMU/KVM systems and VMWare VMs (at hardware level 6.7 and 7.0u2).
Related Red Hat BZ (public):
https://bugzilla.redhat.com/show_bug.cgi?id=2048904
0001-search-new-efidisk-only-option-on-EFI-systems.patch
Description: Text Data
OpenPGP_signature
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |