Bug#528793: grub-pc: update-grub does not use kernel under sub-directories

Daniel Dehennin daniel.dehennin at baby-gnu.org
Fri May 15 16:43:48 UTC 2009


Package: grub-pc
Version: 1.96+20090317-1
Severity: wishlist

Hello,

I'm using the following kernel-pkg configuration to place each kernel under
it's own directory:
--8<---------------cut here---------------start------------->8---
# Permet d'avoir un /boot propre
# /boot/2.6.26.2+gaia.1 par exemple
IMAGEDIR = /boot/$(version)
--8<---------------cut here---------------end--------------->8---
update-grub does not find thoose kernels and produce an empty configuration.

I propose a patch to use find to list kernels under /boot.

This patch is tested on my system (look at the grub.cfg).

Regards.


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/root / ext3 rw,noatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /boot ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/hati-home /home ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/hati-tmp /tmp ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/hati-usr /usr ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/hati-usr--local /usr/local ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/hati-usr--src /usr/src ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/hati-var /var ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/hati-var--log /var/log ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/mapper/_dev_mapper_baby__gnu_secured /media/secured ext3 rw,errors=continue,data=ordered 0 0
/dev/mapper/_dev_mapper_baby__gnu_gnunet /media/gnunet ext3 rw,errors=continue,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/sda
(hd1)	/dev/sdb
(hd2)	/dev/sdc
*********************** 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
insmod lvm
set root=(hati-usr)
search --fs-uuid --set c1e3ec35-188b-4ad1-8ea9-5a84d5fc0816
if loadfont /share/grub/ascii.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
### 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.1+hati.2" {
	set root=(hd0,1)
	search --fs-uuid --set 69504eda-30aa-4f92-b3df-f54ecbfc8413
	linux	/2.6.29.1+hati.2/vmlinuz-2.6.29.1+hati.2 root=/dev/sda2 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.29.1+hati.2 (recovery mode)" {
	set root=(hd0,1)
	search --fs-uuid --set 69504eda-30aa-4f92-b3df-f54ecbfc8413
	linux	/2.6.29.1+hati.2/vmlinuz-2.6.29.1+hati.2 root=/dev/sda2 ro single quiet
}
menuentry "Debian GNU/Linux, linux 2.6.28.1+hati.1" {
	set root=(hd0,1)
	search --fs-uuid --set 69504eda-30aa-4f92-b3df-f54ecbfc8413
	linux	/2.6.28.1+hati.1/vmlinuz-2.6.28.1+hati.1 root=/dev/sda2 ro quiet 
}
menuentry "Debian GNU/Linux, linux 2.6.28.1+hati.1 (recovery mode)" {
	set root=(hd0,1)
	search --fs-uuid --set 69504eda-30aa-4f92-b3df-f54ecbfc8413
	linux	/2.6.28.1+hati.1/vmlinuz-2.6.28.1+hati.1 root=/dev/sda2 ro single quiet
}
### END /etc/grub.d/10_linux ###

### 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 unstable
  APT policy: (500, 'unstable'), (90, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29.1+hati.2 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]    1.5.26          Debian configuration management sy
ii  grub-common              1.96+20090317-1 GRand Unified Bootloader, version 
ii  libc6                    2.9-7           GNU C Library: Shared libraries

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
pn  desktop-base                  <none>     (no description available)
pn  os-prober                     <none>     (no description available)

-- debconf information:
* grub-pc/linux_cmdline:
* grub-pc/chainload_from_menu.lst: false
-------------- next part --------------
--- 10_linux.in.orig	2009-05-15 18:32:20.000000000 +0200
+++ 10_linux.in	2009-05-15 18:33:33.000000000 +0200
@@ -93,7 +93,7 @@
   echo "$a"
 }
 
-list=`for i in /vmlinu[xz]-* $(find /boot -type f -regex '.*vmlinu[xz]-.*'; do
+list=`for i in /vmlinu[xz]-* $(find /boot -type f -regex '.*vmlinu[xz]-.*'); do
         if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
       done`
 


More information about the Pkg-grub-devel mailing list