Bug 678840 - grub2 wrong sorting
grub2 wrong sorting
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Lubomir Rintel
Fedora Extras Quality Assurance
: 804558 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2011-02-20 04:14 EST by Sebastian Pöhn
Modified: 2012-05-01 07:02 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-30 18:15:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patched function version_find_latest (4.33 KB, application/octet-stream)
2011-02-20 04:14 EST, Sebastian Pöhn
no flags Details
good f17 and bad f17 entries in same configure file (15.70 KB, application/octet-stream)
2012-05-01 03:20 EDT, cornel panceac
no flags Details

  None (edit)
Description Sebastian Pöhn 2011-02-20 04:14:37 EST
Created attachment 479743 [details]
patched function version_find_latest

Description of problem:
The grub2-mkconfig script sorts incorrect: Not the newest kernel is on top. (I my case was on top of 

Version-Release number of selected component (if applicable):
grub2-1:1.98-3.fc14 x86_64

How reproducible:

Steps to Reproduce:
1.Run the mkconfig script and check the output
Actual results:

Expected results:
newest kernel version should be on top!

Additional info:
Patched my system. Problem results of version_find_latest function out of /usr/lib/grub/grub_mkconfig_lib. It does his job wrong! I added my patched version (changes only in line 184). Only tested with linux version style.
Comment 1 cornel panceac 2012-03-08 13:30:34 EST
Right now, the f16 kernels are correctly ordered, however, the f17 (alpha) ones, are in reverse order.
Comment 2 Mads Kiilerich 2012-04-03 10:34:06 EDT
That has been fixed upstream after grub-2.00~beta2
Comment 3 Mads Kiilerich 2012-04-19 17:29:16 EDT
*** Bug 804558 has been marked as a duplicate of this bug. ***
Comment 4 Mads Kiilerich 2012-04-30 18:15:54 EDT
grub2-2.0-0.24.beta4.fc17 has been pushed to f17 stable
Comment 5 cornel panceac 2012-05-01 03:19:30 EDT
Mmm, no, it's not fixed in # rpm -q grub2 os-prober

Actually, both the order os wrong (in the same way) and the root= parameter still points to /dev/sda6 instead of UUID=<someuuid>.

Maybe this is related to the fact that both f17 systems i've tried are yum upgraded from f16, but i don't know how to check if this is the case.

Funny thing is, right now, the f16 install became f17 too, and the entries for the generating OS are correct, but for the other f17 are wrong.
Comment 6 cornel panceac 2012-05-01 03:20:27 EDT
Created attachment 581307 [details]
good f17 and bad f17 entries in same configure file
Comment 7 Mads Kiilerich 2012-05-01 05:22:30 EDT
(In reply to comment #5)

This bug discussed wrong ordering of ordinary entries generated by 10_linux because '10' < '2'. That has been solved.

You mention entries generated by 30_os-prober and isn't sorted in reverse order at all - that would be a different issue. The idea of os-prober generating entries for individual kernels is however conceptually broken.
Comment 8 cornel panceac 2012-05-01 06:50:55 EDT
Thank you for clarifications. I'll open other different bugs for each of the grub2-mkconfig problems i've seen, then.
Comment 9 cornel panceac 2012-05-01 07:02:56 EDT
eh, i've just remembered: https://bugzilla.redhat.com/show_bug.cgi?id=801535 :)

Note You need to log in before you can comment on or make changes to this bug.