[Bug 476540] [NEW] script 10_linux doesn't sort kernel versions correctly
Pierre Frenkiel
pierre.frenkiel at laposte.net
Fri Nov 6 14:42:43 UTC 2009
Public bug reported:
Binary package hint: grub-pc
Description: Ubuntu 8.10
Release: 8.10
grub-pc:
Installed: 1.96+20080512-1ubuntu2
Candidate: 1.96+20080512-1ubuntu2
Version table:
*** 1.96+20080512-1ubuntu2 0
500 http://ftp.crihan.fr intrepid/universe Packages
100 /var/lib/dpkg/status
Ihave presently to versions of linux-image:
/boot/vmlinuz-2.6.27-15-generic
/boot/vmlinuz-2.6.27-9-generic
I expect the -15 version being found as more recent than -9
what happens:
/etc/grub.d/10_linux gives:
Found linux image: /boot/vmlinuz-2.6.27-9-generic
. . . . . . . . . . . . .
Found linux image: /boot/vmlinuz-2.6.27-15-generic
. . . . . . . . . . . . .
and then, of course, the 1st menuentry in grub.cfg is for the oldest kernel
Anyway, the sort program doesn''t work correctly with stdin.
I found a fix by removing all functions in 10_linux,
and replacing:
=============================================================================
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
while [ "x$list" != "x" ] ; do
linux=`find_latest $list`
=============================================================================
by
=============================================================================
list=`for i in $(ls -vr /boot/vmlinu[xz]-* /vmlinu[xz]-* 2>/dev/null) ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
while [ "x$list" != "x" ] ; do
linux=`echo $list|cut -d ' ' -f 1`
=============================================================================
ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
NonfreeKernelModules: hsfengine ath_hal
Package: grub-pc 1.96+20080512-1ubuntu2
ProcEnviron:
LC_CTYPE=fr_FR
PATH=/data/home/username/lnx/bin:/data/home/username/bin:/local/bin:/setloc/bin:/opt/apc/bin:/usr/lib/openoffice/program:/sbin:/usr/sbin:/bin:/usr/bin:/usr/games:/usr/local/bin
LANG=en_US.UTF-8
SHELL=/bin/ksh
SourcePackage: grub2
Uname: Linux 2.6.27-15-generic i686
** Affects: grub2 (Ubuntu)
Importance: Undecided
Status: New
** Tags: apport-bug
--
script 10_linux doesn't sort kernel versions correctly
https://bugs.launchpad.net/bugs/476540
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list