|
From: | Renaud Métrich |
Subject: | Re: [PATCH] efi: make sure EFI disk controllers are connected when, discovering devices |
Date: | Tue, 8 Feb 2022 11:57:17 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
Please ignore, resent properly using a git send-email command.
When efi.quickboot is enabled on VMWare (which is the default for hardware release 16 and later), it may happen that not all EFI devices are connected.
Due to this, browsing the devices in make_devices() just fails to find devices, in particular partitions for a given disk.
This typically happens when network booting, then trying to chainload to local disk (this is used in deployment tools such as Red Hat Satellite).
This patch makes sure all controllers are connected before enumerating the disks.It blindly calls the EFI ConnectController function with recursive option and just ignores the result, which is 0 (EFI_SUCCESS) or 14 (EFI_NOT_FOUND) when the handle is not a controller.
Example of "grub.cfg" file used to chainload when system boots over the network:
~~~
menuentry 'Chainload Grub2 EFI from ESP' --id local {unset rootsearch --file --no-floppy --efidisk-only --set=root /EFI/BOOT/BOOTX64.EFIif [ -f ($root)/EFI/BOOT/grubx64.efi ]; thenchainloader ($root)/EFI/BOOT/grubx64.efielif [ -f ($root)/EFI/redhat/shimx64.efi ]; thenchainloader ($root)/EFI/redhat/shimx64.efielif [ -f ($root)/EFI/redhat/grubx64.efi ]; thenchainloader ($root)/EFI/redhat/grubx64.efifi}~~~
This patch has been tested on QEMU/KVM systems (for non regression) and VMWare VMs (at hardware level 6.7 and 7.0u2, with and without quickboot for functionality testing).
OpenPGP_signature
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |