Bug#558042: sugesting another patch

pancho horrillo pancho at pancho.name
Fri Nov 27 15:33:09 UTC 2009


On Fri, Nov 27, 2009 at 02:15:28PM +0100, Matthias Dellweg wrote:
> since grub-mkrelpath works correct on files (they cannot be
> mountpoints, right?) I would sugest to try the following patch. Sadly
> I cannot test it until this evening.
> 
> --- 10_linux    2009-11-25 19:41:40.000000000 +0100
> +++ 09_linux    2009-11-27 14:03:04.000000000 +0100
> @@ -87,7 +87,9 @@ while [ "x$list" != "x" ] ; do
>    echo "Found linux image: $linux" >&2
>    basename=`basename $linux`
>    dirname=`dirname $linux`
> -  rel_dirname=`make_system_path_relative_to_its_root $dirname`
> +  rel_linux=`make_system_path_relative_to_its_root $linux`
> +#  rel_dirname=`make_system_path_relative_to_its_root $dirname`
> +  rel_dirname=`dirname $rel_linux`
>    version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
>    alt_version=`echo $version | sed -e "s,\.old$,,g"`
>    linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"

Just tried it, and this happens:
N.B.: Duplicate set of entries, and // instead of /
Grub is able to boot from // paths, though.

My 2¢.

******** /boot/grub/grub.cfg

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

### BEGIN /etc/grub.d/00_header ###
set default=0
insmod lvm
insmod ext2
set root=(debian-usr)
search --no-floppy --fs-uuid --set c37e1192-952d-4c62-8d29-99c7df365726
if loadfont /share/grub/unicode.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
set locale_dir=/boot/grub/locale
set lang=en
insmod gettext 
set timeout=2
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_hiddenmenu ###
echo -n "Press 'ESC' to enter the menu... "
if sleep --verbose --interruptible 2 ; then
  set timeout=0
else
  set timeout=-1
fi
### END /etc/grub.d/01_hiddenmenu ###

### BEGIN /etc/grub.d/02_graphics_mode ###
915resolution 3c 1920 1200
### END /etc/grub.d/02_graphics_mode ###

### 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/06_pancho_theme ###
set menu_color_normal=green/black
set menu_color_highlight=black/green
### END /etc/grub.d/06_pancho_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64-macmini" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux	//vmlinuz-2.6.31-1-amd64-macmini root=/dev/mapper/debian-root ro  quiet
	initrd	//initrd.img-2.6.31-1-amd64-macmini
}
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64-macmini (recovery mode)" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux	//vmlinuz-2.6.31-1-amd64-macmini root=/dev/mapper/debian-root ro single 
	initrd	//initrd.img-2.6.31-1-amd64-macmini
}
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux	//vmlinuz-2.6.31-1-amd64 root=/dev/mapper/debian-root ro  quiet
	initrd	//initrd.img-2.6.31-1-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64 (recovery mode)" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux	//vmlinuz-2.6.31-1-amd64 root=/dev/mapper/debian-root ro single 
	initrd	//initrd.img-2.6.31-1-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_linux.orig ###
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64-macmini" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux	/boot/vmlinuz-2.6.31-1-amd64-macmini root=/dev/mapper/debian-root ro  quiet
	initrd	/boot/initrd.img-2.6.31-1-amd64-macmini
}
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64-macmini (recovery mode)" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux	/boot/vmlinuz-2.6.31-1-amd64-macmini root=/dev/mapper/debian-root ro single 
	initrd	/boot/initrd.img-2.6.31-1-amd64-macmini
}
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux	/boot/vmlinuz-2.6.31-1-amd64 root=/dev/mapper/debian-root ro  quiet
	initrd	/boot/initrd.img-2.6.31-1-amd64
}
menuentry "Debian GNU/Linux, with Linux 2.6.31-1-amd64 (recovery mode)" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux	/boot/vmlinuz-2.6.31-1-amd64 root=/dev/mapper/debian-root ro single 
	initrd	/boot/initrd.img-2.6.31-1-amd64
}
### END /etc/grub.d/10_linux.orig ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux16	/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set a4be9d25-49cd-40c3-8915-e0abdff0e1a7
	linux16	/memtest86+.bin console=ttyS0,115200n8
}
### 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 provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

******** END /boot/grub/grub.cfg

-- 
pancho horrillo

To be conscious that
you are ignorant is a great step
to knowledge.

		Benjamin Disraeli





More information about the Pkg-grub-devel mailing list