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 1753154
Summary: | [RFE] grub2 blscfg menu order can become random! | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Warren Togami <wtogami> | |
Component: | grub2 | Assignee: | Peter Jones <pjones> | |
Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rawhide | CC: | fedoraproject, fmartine, javierm, lkundrak, ngompa13, pablo, pjones, yaneti | |
Target Milestone: | --- | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | FutureFeature | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1753157 (view as bug list) | Environment: | ||
Last Closed: | 2020-11-24 18:22:20 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: | 245418 |
Description
Warren Togami
2019-09-18 09:19:53 UTC
#!/bin/bash # https://bugzilla.redhat.com/show_bug.cgi?id=1753154 # /boot/loader/entries/*.conf can be incorrect because machine-id is # set only after first boot when installed from an image. # This script renames *.conf files to match /etc/machine-id. MACHINEID=$(cat /etc/machine-id) cd /boot/loader/entries for filename in $(find -type f -name '*.conf'); do FILEID=$(echo "$filename" | sed -r 's/^\.\/([0-9a-f]{32})-.+.conf$/\1/') REMAIN=$(echo "$filename" | sed -r 's/^\.\/[0-9a-f]{32}-(.+.conf)$/\1/') if [ "$MACHINEID" != "$FILEID" ]; then echo "Renaming ${FILEID}-${REMAIN} to ${MACHINEID}-${REMAIN} to workaround rhbz #1753154" mv ${FILEID}-${REMAIN} ${MACHINEID}-${REMAIN} fi done https://github.com/wtogami/example-efi-blscfg-imagecreator/ Here are example kickstart snippets for images that workaround this bug. This works equally on Fedora 31 and CentOS 8. %post ### script - fixup-bls-entry-name cat << EOF > /usr/bin/fixup-bls-entry-name #!/bin/bash # https://bugzilla.redhat.com/show_bug.cgi?id=1753154 # /boot/loader/entries/*.conf can be incorrect because machine-id is # set only after first boot when installed from an image. # This script renames *.conf files to match /etc/machine-id. MACHINEID=\$(cat /etc/machine-id) cd /boot/loader/entries for filename in \$(find -type f -name '*.conf'); do FILEID=\$(echo "\$filename" | sed -r 's/^\.\/([0-9a-f]{32})-.+.conf\$/\1/') REMAIN=\$(echo "\$filename" | sed -r 's/^\.\/[0-9a-f]{32}-(.+.conf)\$/\1/') if [ "\$MACHINEID" != "\$FILEID" ]; then echo "Renaming \${FILEID}-\${REMAIN} to \${MACHINEID}-\${REMAIN} to workaround rhbz #1753154" mv \${FILEID}-\${REMAIN} \${MACHINEID}-\${REMAIN} fi done EOF chmod 755 /usr/bin/fixup-bls-entry-name ### run-once@.service cat << EOF > '/etc/systemd/system/run-once@.service' [Unit] DefaultDependencies=yes [Service] Type=exec ExecStart=-/usr/bin/%i ExecStartPost=-/usr/bin/systemctl disable run-once@%i.service Restart=no StandardOutput=journal+console StandardError=journal+console [Install] WantedBy=sysinit.target EOF chmod 644 '/etc/systemd/system/run-once@.service' ### run-once during boot: fixup BLS entry names to workaround https://bugzilla.redhat.com/show_bug.cgi?id=1753154 systemctl enable run-once %end Fixed race condition. https://github.com/wtogami/example-efi-blscfg-imagecreator/commit/6b1e3caa3654f3857118316bce1435297ae17a0c ### run-once@.service cat << EOF > '/etc/systemd/system/run-once@.service' [Unit] DefaultDependencies=no After=local-fs.target systemd-machine-id-commit.service Before=sysinit.target shutdown.target Conflicts=shutdown.target [Service] Type=oneshot ExecStart=-/usr/bin/%i ExecStartPost=-/usr/bin/systemctl disable run-once@%i.service StandardOutput=journal+console StandardError=journal+console [Install] WantedBy=sysinit.target EOF chmod 644 '/etc/systemd/system/run-once@.service' This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34. This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component. This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component. |