bugGNU GRUB - Bugs: bug #61364, (EFI) network problems when...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #61364: (EFI) network problems when netbooting iPXE from netbooted GRUB

Submitter:  Michael Panzaff <boringname>
Submitted:  Thu 21 Oct 2021 12:49:46 PM UTC
 
Category:  Network Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  * Git master
Release:  Reproducibility:  Every Time
Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Sat 19 Feb 2022 02:31:26 PM UTC, comment #2: 

I solved  the problem using grub 2.11 directly from https://git.launchpad.net/grub and building on ubuntu 20.04 the grubnetx64.efi using the following script:

apt-get update
apt-get build-dep grub2 -y
git clone https://git.launchpad.net/grub
cd grub
git checkout 246d69b7ea619fc1e77dcc5960e37aea45a9808c
./bootstrap
./configure --with-platform=efi
make
cat >"grub-netboot.cfg" <<EOF
if [ -e \$prefix/$platform/grub.cfg ]; then
    source \$prefix/$platform/grub.cfg
elif [ -e \$prefix/grub.cfg-$deb_arch ]; then
    source \$prefix/grub.cfg-default-$deb_arch
else
    source \$prefix/grub.cfg
fi
EOF
mkfs.msdos -C "memdisk-netboot.fat" 64
mcopy -D overwrite -i "memdisk-netboot.fat" "grub-netboot.cfg" ::grub.cfg
CD_MODULES="all_video boot btrfs cat chain configfile echo efifwsetup efinet ext2 fat font gettext gfxmenu gfxterm gfxterm_background gzio halt help hfsplus iso9660 jpeg keystatus loadenv loopback linux ls lsefi lsefimmap lsefisystab lssal memdisk minicmd normal ntfs part_apple part_msdos part_gpt password_pbkdf2 png reboot regexp search search_fs_uuid search_fs_file search_label sleep smbios squash4 test true video xfs zfs zfscrypt zfsinfo"
CD_MODULES="$CD_MODULES cpuid play"
CD_MODULES="$CD_MODULES tpm"
NET_MODULES="$CD_MODULES http tftp"
./grub-mkimage -O x86_64-efi -o grubnetx64.efi -d grub-core -c grub-netboot.cfg -p /grub $NET_MODULES
# generated
grubnetx64.efi

Fabrício Ceolin <fabceolin>
Thu 28 Oct 2021 10:28:07 AM UTC, comment #1: 

Hi,

I am trying to do this for a while:
https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1903442

I built a virtual environment to help to debug.

You can see the error here:
https://youtu.be/nSQV1V5cjBg

To build the environment:

git clone https://github.com/fabceolin/grubnetx64-chainloader-ipxe.git
cd grubnetx64-chainloader-ipxe
git branch netboot.xyz
packer build ltsp-server.json
.# it will take 15 minutes. Install the generated ovf
packer build ltsp-client.json
.# Install the generated ovf
run ltsp-server using virtualbox
run ltsp-client using VirtualBox

Loading snp.efi version, ipxe doesn't hang but didn't find any network interfaces.

https://github.com/ipxe/ipxe/issues/508

Fabrício Ceolin <fabceolin>
Thu 21 Oct 2021 12:49:46 PM UTC, original submission:  

Hi,

in my setup I have an EFI GRUB which can be booted from a client machine with the network card's PXE ROM. This works just fine and from there on I'm trying to chainload iPXE from this netbooted GRUB.

However, at this point I am getting problems. The chainloaded iPXE instance for some reason can no longer use the machine's network card (not listed at all or freezes on initialization) which renders the iPXE instance useless (see the linked iPXE issue for details). This probem does not occur when I omit GRUB from the boot chain (when I boot iPXE from the internal PXE ROM directly).

Here are a few examples which DO work:

PXE-ROM (local) -> iPXE (from tftp)
GRUB (local) -> iPXE (local) -> iPXE (from tftp)

Here are a few examples which DO NOT work:

PXE-ROM (local) -> GRUB (from tftp) -> iPXE (from tftp)
GRUB (local) -> iPXE (local) -> GRUB (from tftp) -> iPXE (from tftp)

I've previously asked the iPXE folks if that would be a problem with iPXE and they suggested that this may be a problem with GRUB because there are no problems when eliminating the netbooted GRUB from the boot chain. Here is a link to that discussion:

https://github.com/ipxe/ipxe/issues/492

I don't have much knowledge about the internals of either iPXE or GRUB, but from what was being mentioned perhaps GRUB leaves the network card in an odd state when chainloading iPXE which causes the iPXE malfunction.

Here is some more info about the setup:

TFTP Server: in.tftpd
Network Card: 00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (7) I219-V [8086:15bc] (rev 10)
GRUB versions: Problem reproduced with 2.02, 2.04 and the latest Git master (couple days ago)

How can this problem be resolved and is there any information that I can provide to make this easier?

Michael Panzaff <boringname>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by fabceolin (Posted a comment)
  • -email is unavailable- added by boringname (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.9