Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1921479

Summary: /etc/grub.d/10_linux: line 234: test: 0ed84c0-p94177c1: integer expression expected
Product: [Fedora] Fedora Reporter: Cameron Kaiser <ckaiser>
Component: grub2Assignee: Javier Martinez Canillas <fmartine>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 33CC: dan, fmartine, hannsj_uhl, jcajka, lkundrak, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
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:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-15 01:19:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880    
Attachments:
Description Flags
[PATCH] 10_linux.in: Check if petitboot sysfs has a valid version none

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.