help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EFI Network drivers being disabled when booting with Grub via PXE


From: Andrei Borzenkov
Subject: Re: EFI Network drivers being disabled when booting with Grub via PXE
Date: Fri, 2 Jul 2021 21:16:59 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 02.07.2021 14:15, Gustavo Henrique wrote:
> Hi,
> 
>> What exactly "boot the UEFI Shell" means? How do you "boot" it? What
>> grub command(s) do you use?
> 
> I have a .efi that is an UEFI Shell application (boot_shell.efi). I boot it
> by using these two commands:
> 
> 1. chainloader (hd0,msdos1)/boot_shell.efi
> 2. boot (hd0,msdos1)/boot_shell.efi
> 

"boot" command does not need or interpret any argument.

Educated guess is that grub opens SNP protocol on network card in
exclusive mode that kicks off everything else. When you boot off local
storage (USB) grub network driver is not loaded.

EFI chainloader command is using StartImage call so grub itself remains
loaded and protocol opened on network card remains active. This may
explain why attempt to reinstate these protocols fails.

If you are willing to check it, try removing
GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE in
grub-core/net/drivers/efi/efinet.c:open_card():

  /* Try to reopen SNP exlusively to close any active MNP protocol instance
     that may compete for packet polling
   */
  net = grub_efi_open_protocol (dev->efi_handle, &net_io_guid,
                                GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);

Note that as explained in comments the reason for this is to avoid
packet loss. So removing EXCLUSIVE may result in failed network
communication.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]