]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Ensure local drives are connected when attempting a SAN boot 1341/head
authorMichael Brown <mcb30@ipxe.org>
Wed, 20 Nov 2024 14:21:16 +0000 (14:21 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 20 Nov 2024 14:25:06 +0000 (14:25 +0000)
UEFI systems may choose not to connect drivers for local disk drives
when the boot policy is set to attempt a network boot.  This may cause
the "sanboot" command to be unable to boot from a local drive, since
the relevant block device and filesystem drivers may not have been
connected.

Fix by ensuring that all available drivers are connected before
attempting to boot from an EFI block device.

Reported-by: Andrew Cottrell <andrew.cottrell@xtxmarkets.com>
Tested-by: Andrew Cottrell <andrew.cottrell@xtxmarkets.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_block.c

index 2f0187a0a031e9fd910b6ff0ff6dbd50c7c8d4d1..6296953c520536dd60eb375e33075b272b1d4bde 100644 (file)
@@ -990,6 +990,9 @@ static int efi_block_boot ( unsigned int drive,
        EFI_STATUS efirc;
        int rc;
 
+       /* Ensure that any local drives are connected */
+       efi_driver_reconnect_all();
+
        /* Release SNP devices */
        efi_snp_release();