[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grub2-mkconfig not sorting correctly?
From: |
Michael D. Setzer II |
Subject: |
grub2-mkconfig not sorting correctly? |
Date: |
Sat, 22 Dec 2012 22:20:18 +1000 |
Saw this some time ago, and then there was a patch, and it
worked, and then this was updated. But have not seen it again
with 3.6.10 kernel coming later instead of first.
Did some searching, and found a modification to
grub-mkconfig_lib that seems to fix the problem.
This is with Fedora 16, but saw one note of this being fixed in
Fedora 17, but don't know if it is the same with all version.
Then change is the following function.
version_find_latest ()
{
#patched (whole work is done by sort!):
echo $@ | tr ' ' '\n' | sort -Vr | head -1 | cat
#bad code! sorts wrong!
#local a=""
# for i in $@ ; do
# if version_test_gt "$i" "$a" ; then
# a="$i"
#fi
#done
#echo "$a"
}
After applying the change,
the grub2-mkconfig -o /boot/grub2/grub.cfg
Now correctly sorts the kernels with the newest first.
May only be an issue with Fedora 16, but might want to check if
you run grub2-mkconfig. I believe the yum update did correctly
create the grub.cfg, but running the grub2-mkconfig didn't.
+----------------------------------------------------------+
Michael D. Setzer II - Computer Science Instructor
Guam Community College Computer Center
mailto:address@hidden
mailto:address@hidden
http://www.guam.net/home/mikes
Guam - Where America's Day Begins
G4L Disk Imaging Project maintainer
http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+
http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned: 19,471
Processing time: 32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)
address@hidden CREDITS
SETI 13494271.333531 | EINSTEIN 9405727.039852
ROSETTA 5631451.296598 | ABC 15600753.474107
- grub2-mkconfig not sorting correctly?,
Michael D. Setzer II <=