Bug 678840

Summary: grub2 wrong sorting
Product: [Fedora] Fedora Reporter: Sebastian Pöhn <poehn>
Component: grub2Assignee: Lubomir Rintel <lkundrak>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: cpanceac, dennis, gilboad, hansecke, lkundrak, mads, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-30 22:15:54 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:
Attachments:
Description Flags
patched function version_find_latest
none
good f17 and bad f17 entries in same configure file none

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 :)