Latest kernel shown at last
Hi all,
Please look at the following :-
shirish@Mugglewille:~$ 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
shirish@Mugglewille:~$ cat /boot/grub/grub.cfg # # DO NOT EDIT THIS FILE # # It is automatically generated by /usr/sbin/update-grub using templates # from /etc/grub.d and settings from /etc/default/grub #
### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=100
set root=(hd0,1)
if font (hd0,1)/usr/share/grub/unicode.pff ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal gfxterm
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod png
if background_image (hd0,1)/usr/share/images/desktop-base/debian-blueish-wallpaper-640x480.png ; then
set color_normal=black/black
set color_highlight=magenta/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_hurd ###
### END /etc/grub.d/10_hurd ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian, linux 2.6.24-8-generic" {
linux (hd0,1)/boot/vmlinuz-2.6.24-8-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro
initrd (hd0,1)/boot/initrd.img-2.6.24-8-generic
}
menuentry "Debian, linux 2.6.24-8-generic (single-user mode)" {
linux (hd0,1)/boot/vmlinuz-2.6.24-8-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro single
initrd (hd0,1)/boot/initrd.img-2.6.24-8-generic
}
menuentry "Debian, linux 2.6.24-7-generic" {
linux (hd0,1)/boot/vmlinuz-2.6.24-7-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro
initrd (hd0,1)/boot/initrd.img-2.6.24-7-generic
}
menuentry "Debian, linux 2.6.24-7-generic (single-user mode)" {
linux (hd0,1)/boot/vmlinuz-2.6.24-7-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro single
initrd (hd0,1)/boot/initrd.img-2.6.24-7-generic
}
menuentry "Debian, linux 2.6.24-5-generic" {
linux (hd0,1)/boot/vmlinuz-2.6.24-5-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro
initrd (hd0,1)/boot/initrd.img-2.6.24-5-generic
}
menuentry "Debian, linux 2.6.24-5-generic (single-user mode)" {
linux (hd0,1)/boot/vmlinuz-2.6.24-5-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro single
initrd (hd0,1)/boot/initrd.img-2.6.24-5-generic
}
menuentry "Debian, linux 2.6.24-10-generic" {
linux (hd0,1)/boot/vmlinuz-2.6.24-10-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro
initrd (hd0,1)/boot/initrd.img-2.6.24-10-generic
}
menuentry "Debian, linux 2.6.24-10-generic (single-user mode)" {
linux (hd0,1)/boot/vmlinuz-2.6.24-10-generic
root=UUID=7eedd8c9-0471-4a63-af65-939402ec5b4e ro single
initrd (hd0,1)/boot/initrd.img-2.6.24-10-generic
}### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux (hd0,1)/boot/memtest86+.bin
}### END /etc/grub.d/20_memtest86+ ###
AFAIK the convention has been always that the latest kernel shows at the top.
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.
Signature · 5 lines
Regards,
Shirish Agarwal
This email is licensed under http://creativecommons.org/licenses/by-nc/3.0/
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17Quoting shirish <[email protected]>:
Quoted 17 lines
Hi all,
Please look at the following :-shirish@Mugglewille:~$ 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]
Quoted 1 line
AFAIK the convention has been always that the latest kernel shows at the top.
Yes. At least that's the idea.
Quoted 3 lines
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.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 13 lines · Pavel Roskin
Quoted 3 lines
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.
Quoted 3 lines
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.
Okuji doesn't like bash scripts, but I really don't see what's the problem with requiring bash just like you could require perl or python. Okuji, would you reconsider about this?
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)
Quoted 14 lines · Robert Millan
Quoted 13 lines · Pavel Roskin
Quoted 3 lines
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.
Quoted 7 lines
Quoted 3 lines
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.
Okuji doesn't like bash scripts, but I really don't see what's the problem with requiring bash just like you could require perl or python. Okuji, would you reconsider about this?
What feature of bash do you need to use?
Okuji
Quoted 7 lines · Yoshinori K. Okuji
Quoted 6 lines · Robert Millan
Quoted 3 lines · Pavel Roskin
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.
Quoted 5 lines
Quoted 3 lines
Okuji doesn't like bash scripts, but I really don't see what's the problem with requiring bash just like you could require perl or python. Okuji, would you reconsider about this?
What feature of bash do you need to use?
I was thinking of arrays. Some variable conversion would probably look better without sed. Actually, it's hard to say before the code is actually written.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 4 lines · Pavel Roskin
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.
Btw, the old update-grub that Debian put in GRUB Legacy package has code to do this in shell (without bashisms I think). It's a 61-line function.
Getting the paperwork for this is out of the question, but I could describe in plain English what are the heuristics that it applies if someone else is willing to implement them.
Note that the heuristics in that script are highly valuable, since they're known to produce good results over a very long period of time.
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)