efi: skip iPXE block device.
authorAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 14 Mar 2017 04:12:32 +0000 (04:12 +0000)
committerVladimir Serbinenko <phcoder@gmail.com>
Tue, 14 Mar 2017 04:14:36 +0000 (04:14 +0000)
commitc42cb97f0881a927b5039d830d1d007f2eaa5b50
treed651cdfddf3c73678b14fcfd9105bb2be1860adf
parentbcf3c55531349dfec135cad9bf359960214dd0f6
efi: skip iPXE block device.

iPXE adds Simple File System Protocol to loaded image handle, as side
effect it also adds Block IO protocol (according to comments, to work
around some bugs in EDK2). GRUB assumes that every device with Block IO
is disk and skips network initialization entirely. But iPXE Block IO
implementation is just a stub which always fails for every operation
so cannot be used. Attempt to detect and skip such devices.

We are using media ID which iPXE sets to "iPXE" and block IO size in
hope that no real device would announce 1B block ...

Closes: 50518
grub-core/disk/efi/efidisk.c