Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1229329

Summary: grub2-mkconfig wrong sorting
Product: Red Hat Enterprise Linux 7 Reporter: Jan Kurik <jkurik>
Component: grub2Assignee: rmarshall
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.1CC: admiller, ajb, ayadav, bloch, bugreports2005, cww, fedora, fkrska, hartsjc, mbanas, md, mkolbas, mvermaes, ncrawfor, olchansk, phil, pholica, pl.totev, rainer.traut, rbinkhor, redhat-bugzilla, release-test-team-automation, rmarshall, schlichting, sreber, toracat, trondham
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: grub2-2.02-0.17 Doc Type: Bug Fix
Doc Text:
Cause: Bash sort has issues with sorting some NVR strings. Consequence: Kernels will be sorted incorrectly when grub2-mkconfig is run. Fix: Modified grub2 to use the rpm dev tool package rpm sort on RPM based systems. Result: Multiple kernels will now sort properly all the time.
Story Points: ---
Clone Of: 1124074 Environment:
Last Closed: 2015-09-15 11:55:52 UTC Type: ---
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: 1124074    
Bug Blocks:    

Description Jan Kurik 2015-06-08 13:22:51 UTC
This bug has been copied from bug #1124074 and has been proposed
to be backported to 7.1 z-stream (EUS).

Comment 7 Pavel Holica 2015-07-29 09:09:34 UTC
Unfortunately, I still see wrong order after running grub2-mkconfig

[root@localhost ~]# rpm -qa | grep grub2
grub2-tools-2.02-0.17.el7_1.1.x86_64
grub2-2.02-0.17.el7_1.1.x86_64
[root@localhost ~]# grep menuentry /boot/grub2/grub.cfg 
if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
  menuentry_id_option=""
export menuentry_id_option
menuentry 'Employee SKU, with Linux 3.10.0-229.el7.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-95cf2e92-4631-4d15-891c-22b8e869f7b5' {
menuentry 'Employee SKU, with Linux 3.10.0-229.7.2.el7.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.7.2.el7.x86_64-advanced-95cf2e92-4631-4d15-891c-22b8e869f7b5' {
menuentry 'Employee SKU, with Linux 0-rescue-7e7c9c6ac5a94e5b873a20ba630744e7' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-7e7c9c6ac5a94e5b873a20ba630744e7-advanced-95cf2e92-4631-4d15-891c-22b8e869f7b5' {

Moving to ASSIGNED.

Comment 15 errata-xmlrpc 2015-09-15 11:55:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1784.html