grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Latest kernel shown at last


From: Pavel Roskin
Subject: Re: Latest kernel shown at last
Date: Thu, 28 Feb 2008 02:10:18 -0500
User-agent: Internet Messaging Program (IMP) H3 (4.1.4)

Quoting shirish <address@hidden>:

Hi all,
 Please look at the following :-

address@hidden:~$ sudo update-grub
[sudo] password for shirish:
Updating /boot/grub/grub.cfg ...
Found Debian background: debian-blueish-wallpaper-640x480.png
Found linux image: /boot/vmlinuz-2.6.24-8-generic
Found initrd image: /boot/initrd.img-2.6.24-8-generic
Found linux image: /boot/vmlinuz-2.6.24-7-generic
Found initrd image: /boot/initrd.img-2.6.24-7-generic
Found linux image: /boot/vmlinuz-2.6.24-5-generic
Found initrd image: /boot/initrd.img-2.6.24-5-generic
Found linux image: /boot/vmlinuz-2.6.24-10-generic
Found initrd image: /boot/initrd.img-2.6.24-10-generic
Found memtest86+ image: /boot/memtest86+.bin
done
[skip]
AFAIK the convention has been always that the latest kernel shows at the top.

Yes.  At least that's the idea.

This is on grub2 (1.96+20080203-1ubuntu1) dunno whether its a bug
which should be filed in grub2 here or something which got messed up
while packaging it for ubuntu. Any help/guidance would be nice.

Please note that 1 is less than 5. The Debian revision is compared as string, not as number.

Correct comparing of Linux versions is very hard. At very least, all sequences of digits should be compared numerically. I don't think GNU sort can do that. And then there is an issue with comparing "-pre", "-rc", "-test", "-mm" and other suffixes. And the separators have different meanings - think of comparing 2.6.24-10 and 2.6.24.2-1.

I was thinking of fixing it, but I'm not sure it can even be done in shell script. We may need to write a helper in C just for that, or resort to bashisms.

--
Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]