Bug 2209435 - PXE boot on ppc64le fails with grub2-2.06-78.fc38 and later: grub does not load config file and boot
Summary: PXE boot on ppc64le fails with grub2-2.06-78.fc38 and later: grub does not lo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 38
Hardware: ppc64le
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Nicolas Frayer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2023-05-23 21:35 UTC by Adam Williamson
Modified: 2024-02-05 01:45 UTC (History)
10 users (show)

Fixed In Version: grub2-2.06-116.fc39 grub2-2.06-114.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-02-05 01:24:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2023-05-23 21:35:50 UTC
We have an openQA test of PXE booting. This involves two VMs. The first sets itself up as a DHCP and PXE (tftp) server; the second runs an install that relies on booting via PXE from the first.

On ppc64le, this test currently fails (it passes on x86_64 and aarch64). When the client boots, it successfully retrieves the bootloader (grub) from the server, but grub doesn't behave as it should: it just shows its "Minimal BASH-like line editing is supported..." screen and a "grub>" prompt. The server places a grub.cfg alongside the bootloader which contains an entry to boot anaconda which should automatically load after five seconds, but it seems grub just does not load this config file, for some reason.

I can pinpoint the problem to grub2 because I can work around it by using an older grub2. The "server" VM is running Fedora 38. We set up the bootloader (on ppc64le, this is different on each arch) by doing this:

dnf -y install grub2-tools-extra
grub2-mknetdir --net-directory=/var/lib/tftpboot
printf 'set default=0\nset timeout=5\n\nmenuentry \"Install Fedora 64-bit\"  --class fedora --class gnu-linux --class gnu --class os {\n  linux fedora/vmlinuz ip=dhcp inst.ks=file:///ks.cfg\n  initrd fedora/initrd.img\n}' >> /var/lib/tftpboot/boot/grub2/grub.cfg

so usually, we use `grub2-mknetdir` from the current stable F38 grub2-tools-extra package to set up the bootloader (then write the config file with printf). But now I hacked up the test to do this instead of the first step:

dnf -y install koji
koji download-build --arch=ppc64le --arch=noarch grub2-2.06-45.fc36
dnf -y downgrade *.rpm
dnf -y install grub2-tools-extra-2.06-45.fc36.ppc64le.rpm

so we use an old grub2-tools-extra from F36 instead (I picked this build as it's the one the server test would have been using around the time the test last passed, in August 2022, according to the result history; I haven't had time to look at the ppc64le tests for a while, which is why I'm only just getting to this). The other two steps are the same. With this setup, things work - grub behaves as expected and the client boots to anaconda. The only change is the version of grub2-tools-extra (and the other grub2 packages that are installed) used on the server end.

Reproducible: Always

Steps to Reproduce:
1. On ppc64le, set up a dhcp/PXE server which serves grub2 as the bootloader, with a config file in the correct location relative to the bootloader
2. Try and boot a system via PXE using the server
Actual Results:  
Client system gets stuck at a grub prompt

Expected Results:  
Client system should behave according to the grub config file

I'll do some 'bisecting' to try and pinpoint the exact grub2 build that broke this, will report back soon.

Comment 1 Adam Williamson 2023-05-23 23:35:15 UTC
It looks like this broke between grub2-2.06-76.fc38 and grub2-2.06-78.fc38. That is, it works OK with -76, fails with -78. I can't test -77 as it was garbage-collected.

Comment 2 Marta Lewandowska 2023-05-24 09:29:06 UTC
Hi Adam,
We are aware of this problem already https://bugzilla.redhat.com/show_bug.cgi?id=2173015 and it's slowly being worked on. :)
Are you also seeing the same error? (I guess so..?)

thanks.

Comment 3 Adam Williamson 2023-05-24 15:34:36 UTC
No, in the openQA case I don't see that error message. Just "Welcome to GRUB!":

https://openqa.stg.fedoraproject.org/tests/2894589#step/_boot_to_anaconda/3

and then the grub shell:

https://openqa.stg.fedoraproject.org/tests/2894589#step/_boot_to_anaconda/4

Comment 4 Dusty Mabe 2023-11-14 18:50:09 UTC
Any updates on this issue?

Comment 5 Adam Williamson 2023-11-14 19:13:10 UTC
still seems broken in current rawhide: https://openqa.stg.fedoraproject.org/tests/3336813#step/_boot_to_anaconda/4

Comment 6 Marta Lewandowska 2023-11-20 11:01:37 UTC
It is being worked on. :)
grub is looking for the modules in the wrong place, so workaround is to:
mkdir /var/lib/tftpboot/boot/grub2/powerpc-ieee1275/powerpc-ieee1275
cp /var/lib/tftpboot/boot/grub2/powerpc-ieee1275/* /var/lib/tftpboot/boot/grub2/powerpc-ieee1275/powerpc-ieee1275/

Comment 7 Jonathan Lebon 2023-11-20 22:20:22 UTC
(In reply to Marta Lewandowska from comment #6)
> It is being worked on. :)
> grub is looking for the modules in the wrong place, so workaround is to:
> mkdir /var/lib/tftpboot/boot/grub2/powerpc-ieee1275/powerpc-ieee1275
> cp /var/lib/tftpboot/boot/grub2/powerpc-ieee1275/*
> /var/lib/tftpboot/boot/grub2/powerpc-ieee1275/powerpc-ieee1275/

Thanks! I can confirm this works around the issue.
xref: https://github.com/coreos/coreos-assembler/pull/3661

Comment 8 Fedora Update System 2024-01-18 17:11:47 UTC
FEDORA-2024-53d986312e has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-53d986312e

Comment 9 Fedora Update System 2024-01-18 17:44:52 UTC
FEDORA-2024-633dc7e183 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2024-633dc7e183

Comment 10 Fedora Update System 2024-01-19 03:33:57 UTC
FEDORA-2024-633dc7e183 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-633dc7e183`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-633dc7e183

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2024-01-19 18:04:28 UTC
FEDORA-2024-53d986312e has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-53d986312e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-53d986312e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2024-02-05 01:24:16 UTC
FEDORA-2024-53d986312e has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2024-02-05 01:45:42 UTC
FEDORA-2024-633dc7e183 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.