diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c index 3b79f7bbc..e66b35d87 100644 --- a/grub-core/disk/efi/efidisk.c +++ b/grub-core/disk/efi/efidisk.c @@ -80,6 +80,15 @@ make_devices (void) /* This should not happen... Why? */ continue; + /* iPXE adds stub Block IO protocol to loaded image device handle. It is + completely non-functional and simply returns an error for every method. + So attempt to detect and skip it. Magic number is literal "iPXE" and + check block size as well */ + /* FIXME: shoud we close it? We do not do it elsewhere */ + if (bio->media && bio->media->media_id == 0x69505845U && + bio->media->block_size == 1) + continue; + d = grub_malloc (sizeof (*d)); if (! d) {