Bug 678840 - grub2 wrong sorting
Summary: grub2 wrong sorting
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 14
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 804558 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-20 09:14 UTC by Sebastian Pöhn
Modified: 2012-05-01 11:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-30 22:15:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patched function version_find_latest (4.33 KB, application/octet-stream)
2011-02-20 09:14 UTC, 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 07:20 UTC, cornel panceac
no flags Details

Description Sebastian Pöhn 2011-02-20 09:14:37 UTC
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 2.6.35.6-45 was on top of 2.6.35.11-83) 

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

How reproducible:
100%

Steps to Reproduce:
1.Run the mkconfig script and check the output
2.
3.
  
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 18:30:34 UTC
Right now, the f16 kernels are correctly ordered, however, the f17 (alpha) ones, are in reverse order.

Comment 2 Mads Kiilerich 2012-04-03 14:34:06 UTC
That has been fixed upstream after grub-2.00~beta2

Comment 3 Mads Kiilerich 2012-04-19 21:29:16 UTC
*** Bug 804558 has been marked as a duplicate of this bug. ***

Comment 4 Mads Kiilerich 2012-04-30 22:15:54 UTC
grub2-2.0-0.24.beta4.fc17 has been pushed to f17 stable

Comment 5 cornel panceac 2012-05-01 07:19:30 UTC
Mmm, no, it's not fixed in # rpm -q grub2 os-prober
grub2-2.0-0.24.beta4.fc17.i686
os-prober-1.52-2.fc17.i686

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 07:20:27 UTC
Created attachment 581307 [details]
good f17 and bad f17 entries in same configure file

Comment 7 Mads Kiilerich 2012-05-01 09:22:30 UTC
(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 10:50:55 UTC
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 11:02:56 UTC
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.