Red Hat Bugzilla – Bug 678840
grub2 wrong sorting
Last modified: 2012-05-01 07:02:56 EDT
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 184.108.40.206-45 was on top of 220.127.116.11-83)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Run the mkconfig script and check the output
newest kernel version should be on top!
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.
Right now, the f16 kernels are correctly ordered, however, the f17 (alpha) ones, are in reverse order.
That has been fixed upstream after grub-2.00~beta2
*** Bug 804558 has been marked as a duplicate of this bug. ***
grub2-2.0-0.24.beta4.fc17 has been pushed to f17 stable
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.
Created attachment 581307 [details]
good f17 and bad f17 entries in same configure file
(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.
Thank you for clarifications. I'll open other different bugs for each of the grub2-mkconfig problems i've seen, then.
eh, i've just remembered: https://bugzilla.redhat.com/show_bug.cgi?id=801535 :)