Bug 1921479 - /etc/grub.d/10_linux: line 234: test: 0ed84c0-p94177c1: integer expression expected
Summary: /etc/grub.d/10_linux: line 234: test: 0ed84c0-p94177c1: integer expression ex...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 33
Hardware: ppc64le
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2021-01-28 03:54 UTC by Cameron Kaiser
Modified: 2021-03-26 00:16 UTC (History)
6 users (show)

Fixed In Version: grub2-2.04-33.fc33 grub2-2.06~rc1-2.fc35 grub2-2.06~rc1-2.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-15 01:19:34 UTC
Type: Bug


Attachments (Terms of Use)
[PATCH] 10_linux.in: Check if petitboot sysfs has a valid version (2.79 KB, application/mbox)
2021-03-10 12:19 UTC, Javier Martinez Canillas
no flags Details

Description Cameron Kaiser 2021-01-28 03:54:00 UTC
Discussed with Dan Horak.

While updating Fedora, grub2-mkconfig displays this error and fails to properly setup the new boot menu entries:

/etc/grub.d/10_linux: line 234: test: 0ed84c0-p94177c1: integer expression expected
/etc/grub.d/10_linux: line 235: test: 0ed84c0-p94177c1: integer expression expected

The problem appears to be because the PPC64 specific code queries the version of Petitboot and expects some sort of sane version number, but this Talos II has a hashed version:

# cat /sys/firmware/devicetree/base/ibm,firmware-versions/petitboot
0ed84c0-p94177c1

Dan mentions this has been observed on other systems.

Workaround is to hack /etc/grub.d/10_linux to just fall through by setting a bogus filesystem location. With this, grub2-mkconfig runs properly.

Comment 1 Dan Horák 2021-02-05 16:59:59 UTC
Javier, could you take a look as you wrote the petitboot handler?

Comment 2 Javier Martinez Canillas 2021-03-10 11:51:09 UTC
Sure, I'll look at this.

Comment 3 Javier Martinez Canillas 2021-03-10 12:14:07 UTC
Could you please try with the following test build ?

https://koji.fedoraproject.org/koji/taskinfo?taskID=63489328

Comment 4 Javier Martinez Canillas 2021-03-10 12:19:59 UTC
Created attachment 1762288 [details]
[PATCH] 10_linux.in: Check if petitboot sysfs has a valid version

That test build contains the attached patch that checks if the petitboot sysfs entry has a valid version and only in this case attempts to infer if has support to parse BLS snippets.

Comment 5 Javier Martinez Canillas 2021-03-10 12:36:46 UTC
(In reply to Javier Martinez Canillas from comment #3)
> Could you please try with the following test build ?
> 
> https://koji.fedoraproject.org/koji/taskinfo?taskID=63489328

Sorry, the correct test build URL is:

https://koji.fedoraproject.org/koji/taskinfo?taskID=63490387

Comment 6 Dan Horák 2021-03-11 10:05:16 UTC
Cameron, do you still have the system where you could verify the fix?

Comment 7 Fedora Update System 2021-03-11 10:38:01 UTC
FEDORA-2021-ae424d66e4 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-ae424d66e4

Comment 8 Fedora Update System 2021-03-11 11:37:17 UTC
FEDORA-2021-877d63ab63 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-877d63ab63

Comment 9 Fedora Update System 2021-03-11 19:51:49 UTC
FEDORA-2021-877d63ab63 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-877d63ab63`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-877d63ab63

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

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

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

Comment 11 Cameron Kaiser 2021-03-12 20:45:32 UTC
I manually applied the patch to /etc/grub.d/10_linux and confirmed I no longer get the error and the generated entries appear appropriate.

Comment 12 Fedora Update System 2021-03-15 01:19:34 UTC
FEDORA-2021-ae424d66e4 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2021-03-16 14:43:12 UTC
FEDORA-2021-b934ee272b has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-b934ee272b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b934ee272b

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

Comment 14 Fedora Update System 2021-03-24 08:54:25 UTC
FEDORA-2021-6e172a47e2 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2021-03-25 01:23:19 UTC
FEDORA-2021-c5ed9c3970 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-c5ed9c3970`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-c5ed9c3970

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

Comment 16 Fedora Update System 2021-03-26 00:16:38 UTC
FEDORA-2021-c5ed9c3970 has been pushed to the Fedora 34 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.