Bug#522194: update-grub2 creates kernel list in wrong order

Nico Schottelius nico-linux-debian at schottelius.org
Wed Apr 1 14:57:11 UTC 2009


Package: grub2
Version: 1.96+20090317-1
Severity: normal

When you've kernels from different kernel trees (like -next, -wl, linux-2.6, ...)
the names do not fit into the sorting algorithm of update-grub2 (also true for
update-grub).

Thus the most recently installed kernel is *not* listed at the top:

Found linux image: /boot/vmlinuz-2.6.29-wl-36123-g39fb448
Found linux image: /boot/vmlinuz-2.6.29-next-20090331
Found linux image: /boot/vmlinuz-2.6.29-next-20090324
Found linux image: /boot/vmlinuz-2.6.29-06608-g15f7176


/boot/vmlinuz-2.6.29-06608-g15f7176 is newer than /boot/vmlinuz-2.6.29-next-20090324.

The obvious fix is to sort by mtime (ls -t1). All other algorithm trying to
guess which prefix is newer or older will fail sooner or later.

Sincerly,

Nico


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/root / jfs rw,noatime 0 0
/dev/mapper/home /home jfs rw,noatime 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/sda
(hd1)	/dev/sdb
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from  and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, linux 2.6.29-wl-36123-g39fb448" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-wl-36123-g39fb448 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-wl-36123-g39fb448 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-wl-36123-g39fb448 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-next-20090331" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-next-20090331 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-next-20090331 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-next-20090331 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-next-20090324" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-next-20090324 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-next-20090324 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-next-20090324 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-06608-g15f7176" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-06608-g15f7176 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-06608-g15f7176 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-06608-g15f7176 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc8-wl-ikn" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc8-wl-ikn root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc8-wl-ikn (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc8-wl-ikn root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc8-00241-g65c2449" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc8-00241-g65c2449 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc8-00241-g65c2449 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc8-00241-g65c2449 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc7-wl-ikn-32930-g5434dd7" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc7-wl-ikn-32930-g5434dd7 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc7-wl-ikn-32930-g5434dd7 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc7-wl-ikn-32930-g5434dd7 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc7-wl-ikn-32879-gcc436d2" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc7-wl-ikn-32879-gcc436d2 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc7-wl-ikn-32879-gcc436d2 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc7-wl-ikn-32879-gcc436d2 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc7-wl-ikn-32831-g98c5597" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc7-wl-ikn-32831-g98c5597 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc7-wl-ikn-32831-g98c5597 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc7-wl-ikn-32831-g98c5597 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc7-next-20090306-ikn" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc7-next-20090306-ikn root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc7-next-20090306-ikn (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc7-next-20090306-ikn root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc5-ikn-00168-gba95fd4" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc5-ikn-00168-gba95fd4 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc5-ikn-00168-gba95fd4 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc5-ikn-00168-gba95fd4 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc4-ikn-00029-g2247818" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc4-ikn-00029-g2247818 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc4-ikn-00029-g2247818 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc4-ikn-00029-g2247818 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc4-ikn-00001-gd5b5623" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc4-ikn-00001-gd5b5623 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc4-ikn-00001-gd5b5623 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc4-ikn-00001-gd5b5623 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-next-20090205-ikn" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-next-20090205-ikn root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-next-20090205-ikn (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-next-20090205-ikn root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00697-gae1a25d" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00697-gae1a25d root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00697-gae1a25d (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00697-gae1a25d root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00444-g9880b7a" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00444-g9880b7a root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00444-g9880b7a (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00444-g9880b7a root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00437-g0f973f2" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00437-g0f973f2 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00437-g0f973f2 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00437-g0f973f2 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00433-ge806b49" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00433-ge806b49 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00433-ge806b49 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00433-ge806b49 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00432-g9b8d5a1" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00432-g9b8d5a1 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc3-ikn-00432-g9b8d5a1 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc3-ikn-00432-g9b8d5a1 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc2-next-20090122-ikn" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc2-next-20090122-ikn root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc2-next-20090122-ikn (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc2-next-20090122-ikn root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc2-next-20090121-ikn" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc2-next-20090121-ikn root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29-rc2-next-20090121-ikn (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.29-rc2-next-20090121-ikn root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc9-wl-ikn-24949-ge98df74" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc9-wl-ikn-24949-ge98df74 root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc9-wl-ikn-24949-ge98df74 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc9-wl-ikn-24949-ge98df74 root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc9-denkbrett" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc9-denkbrett root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc9-denkbrett (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc9-denkbrett root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc8-next-20081219-denkbrett" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc8-next-20081219-denkbrett root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc8-next-20081219-denkbrett (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc8-next-20081219-denkbrett root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc7-next-20081208-denkbrett" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc7-next-20081208-denkbrett root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc7-next-20081208-denkbrett (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc7-next-20081208-denkbrett root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc7-denkbrett" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc7-denkbrett root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc7-denkbrett (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc7-denkbrett root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc6-wl-denkbrett-21906-g24e8b9a" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc6-wl-denkbrett-21906-g24e8b9a root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc6-wl-denkbrett-21906-g24e8b9a (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc6-wl-denkbrett-21906-g24e8b9a root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc6-next-20081202-denkbrett" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc6-next-20081202-denkbrett root=/dev/sda1 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.28-rc6-next-20081202-denkbrett (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.28-rc6-next-20081202-denkbrett root=/dev/sda1 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.26-1-amd64" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.26-1-amd64 root=/dev/sda1 ro quiet 
	initrd	/boot/initrd.img-2.6.26-1-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.26-1-amd64 (recovery mode)" {
	set root=(hd0,1)
	linux	/boot/vmlinuz-2.6.26-1-amd64 root=/dev/sda1 ro single quiet
	initrd	/boot/initrd.img-2.6.26-1-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86 ###
menuentry "Memory test (memtest86)" {
	linux	/boot/memtest86.bin
}
### END /etc/grub.d/20_memtest86 ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29-wl-36116-g6a982a0 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to de_CH.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub2 depends on:
ii  grub-pc                  1.96+20090317-1 GRand Unified Bootloader, version 

grub2 recommends no packages.

grub2 suggests no packages.

-- no debconf information





More information about the Pkg-grub-devel mailing list