All of lore.kernel.org
 help / color / mirror / Atom feed
* Latest kernel shown at last
@ 2008-02-28  7:00 shirish
  2008-02-28  7:10 ` Pavel Roskin
  0 siblings, 1 reply; 6+ messages in thread
From: shirish @ 2008-02-28  7:00 UTC (permalink / raw)
  To: grub-devel

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.
-- 
          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 8B17



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest kernel shown at last
  2008-02-28  7:00 Latest kernel shown at last shirish
@ 2008-02-28  7:10 ` Pavel Roskin
  2008-02-28 10:41   ` Robert Millan
  2008-02-28 11:46   ` Robert Millan
  0 siblings, 2 replies; 6+ messages in thread
From: Pavel Roskin @ 2008-02-28  7:10 UTC (permalink / raw)
  To: The development of GRUB 2, shirish

Quoting shirish <shirishag75@gmail.com>:

> 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]
> 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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest kernel shown at last
  2008-02-28  7:10 ` Pavel Roskin
@ 2008-02-28 10:41   ` Robert Millan
  2008-02-28 22:21     ` Yoshinori K. Okuji
  2008-02-28 11:46   ` Robert Millan
  1 sibling, 1 reply; 6+ messages in thread
From: Robert Millan @ 2008-02-28 10:41 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: shirish

On Thu, Feb 28, 2008 at 02:10:18AM -0500, Pavel Roskin wrote:
> >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.

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?

-- 
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 /.)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest kernel shown at last
  2008-02-28  7:10 ` Pavel Roskin
  2008-02-28 10:41   ` Robert Millan
@ 2008-02-28 11:46   ` Robert Millan
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Millan @ 2008-02-28 11:46 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: shirish

On Thu, Feb 28, 2008 at 02:10:18AM -0500, Pavel Roskin wrote:
> 
> 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.

-- 
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 /.)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest kernel shown at last
  2008-02-28 10:41   ` Robert Millan
@ 2008-02-28 22:21     ` Yoshinori K. Okuji
  2008-02-28 22:32       ` Pavel Roskin
  0 siblings, 1 reply; 6+ messages in thread
From: Yoshinori K. Okuji @ 2008-02-28 22:21 UTC (permalink / raw)
  To: grub-devel; +Cc: shirish, Robert Millan

On Thursday 28 February 2008 11:41, Robert Millan wrote:
> On Thu, Feb 28, 2008 at 02:10:18AM -0500, Pavel Roskin wrote:
> > >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.
>
> 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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest kernel shown at last
  2008-02-28 22:21     ` Yoshinori K. Okuji
@ 2008-02-28 22:32       ` Pavel Roskin
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Roskin @ 2008-02-28 22:32 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: shirish, Robert Millan

On Thu, 2008-02-28 at 23:21 +0100, Yoshinori K. Okuji wrote:
> On Thursday 28 February 2008 11:41, Robert Millan wrote:
> > On Thu, Feb 28, 2008 at 02:10:18AM -0500, Pavel Roskin wrote:

> > > 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?

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.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-28 22:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28  7:00 Latest kernel shown at last shirish
2008-02-28  7:10 ` Pavel Roskin
2008-02-28 10:41   ` Robert Millan
2008-02-28 22:21     ` Yoshinori K. Okuji
2008-02-28 22:32       ` Pavel Roskin
2008-02-28 11:46   ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.