Bug 1753154
Summary: | grub2 blscfg menu order can become random | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Warren Togami <wtogami> | |
Component: | grub2 | Assignee: | Nicolas Frayer <nfrayer> | |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 38 | CC: | fedoraproject, fmartine, javierm, lkundrak, mattdm, ngompa13, pablo, pjones, rharwood, yaneti | |
Target Milestone: | --- | Keywords: | Reopened | |
Target Release: | --- | Flags: | mattdm:
fedora_prioritized_bug?
|
|
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
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: | 2024-05-21 14:10:36 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 bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36. 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. This message is a reminder that Fedora Linux 36 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16. 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 'version' of '36'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 36 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 Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. This is still an issue as of Fedora 38. The above workaround we've been using in our production images for years. It still works for EL9. The above workaround we've been using in our production images for years. It still works for EL9. This message is a reminder that Fedora Linux 38 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21. 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 'version' of '38'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 38 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 Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21. Fedora Linux 38 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 Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed. |