bug-grub
[Top][All Lists]
Advanced

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

Re: Regression: uefi tftp+http network boot broken in master (bisected)


From: asavah
Subject: Re: Regression: uefi tftp+http network boot broken in master (bisected)
Date: Sat, 06 Mar 2021 17:04:48 +0200
User-agent: Roundcube Webmail/1.4.10

On 2021-03-05 21:28, Thomas Frauendorfer wrote:
On Wed, Mar 3, 2021 at 10:29 PM asavah <asavah@avh.od.ua> wrote:

printf changes in grub git seem to have broken uefi network boot.

last good commit 968de8c23c1cba0f18230f778ebcf6c412ec8ec5
first bad commit 83603bea6ce8fdff5ab3fbc4c9e592a8c71a8706

I did not test commits in between as they seem to be parts of the same
thing.
During testing the machine was rebooted many times, including cold boots
to try to avoid possible firmware glitches.

How to reproduce:
Build grub from git, --with-platform=efi.
Build grub image grub-mkimage -c "embed.cfg" -p "/netboot/current" -d
"/test_prefix/lib/grub/x86_64-efi" --format=x86_64-efi
--output=grubx64-test.efi $(ls /test_prefix/lib/grub/x86_64-efi| sed -n
's/\.mod//gp')
The contents of embed.cfg are as follows:
set root=(http,192.168.0.5)
set prefix=/netboot/current

Have a grub.cfg (doesn't matter whats there) and kernel+initrd on the
http server.

Try booting the machine via uefi pxe.

Expected result:
The machine boots, grabs grub.cfg and whatnot from the http server and
presents the menu, works up to and including
968de8c23c1cba0f18230f778ebcf6c412ec8ec5 .

Actual result:
The machine waits for a while with a black screen and a after that falls
back to grub prompt.
No http requests can be seen in http server log or tcpdump.
Adding set debug=all to embed.cfg produces:
kern/disc.c:196: Opening `(http,192.168.36.5)' ...
kern/disc.c:281: Opening `(http,192.168.36.5)' failed.
kern/disc.c:295: Closing `http'.
net/net.c:1512: error receiving: 28: couldn't send network packet
* repeats last line many times


Thank you for the report.

I build an image with
install_efi64/bin/grub-mkimage -c "embedded.cfg" -p "/netboot/current"
-d "install_efi64/lib/grub/x86_64-efi/" --format=x86_64-efi --output
grubx64-test.efi $(ls install_efi64/lib/grub/x86_64-efi/*.mod)
and could not reproduce the problem on current master.
When I start that image through pxe I do see http requests on the
target machine and if I add a grub.cfg it does get loaded.

I use the newly build grub-mkimage. Could you test if that makes a
difference for you?

Hmm, while doing the initial testing the image was already built using fresh grub-mkimage, my script always calls grub-mkimage using absolute path. When doing the initial testing out of more than 20 tries it booted ok once, and I've made several totally cold boots by yanking the power cord and pressing the power button to discharge any juice that may have been left in the capacitors.

After seeing your email I've rebuilt grub again at 8fcfd1e and it booted 10 out of 10 times... And then I remembered that while trying to figuring this out I switched off --enable-boot-time , I don't even remember why I had this enabled.

New info:
968de8c23c1cba0f18230f778ebcf6c412ec8ec5 --enable-boot-time 10 out of 10 boots succeed 8fcfd1e0fc72d58766ce3dc09cf883c032f063f6 --enable-boot-time 0 out of 10 boots succeed 8fcfd1e0fc72d58766ce3dc09cf883c032f063f6 _without_ --enable-boot-time (the default) 5 out of 10 boots succeed, machine was being rebooted by ctrl+alt+del, after powercycling booted several times succesfully again, probably a firmware fluke.

So the issue is in --enable-boot-time + aforementioned printf/format commits.

Additional info:
cpu: ryzen 5 2400g
motherboard: asus rog-strix-b450-e-gaming , bios 4204 (latest)

configure line: ./autogen.sh && ./configure --prefix=/test_prefix --sysconfdir=/test_prefix_etc --program-prefix="" --with-bootdir="/boot" --with-grubdir="grub" --with-platform="efi" --disable-grub-mount --disable-silent-rules --disable-werror



reply via email to

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