Bug#558042: sugesting another patch

2009-11-28 Thread pancho horrillo
On Fri, Nov 27, 2009 at 06:25:50PM +0100, Matthias Dellweg wrote:
 The following hot fix patch seems to work. And it also kills the doubled 
 slashes (They must have been around with the old method, too.).
 Greetings, Matthias
 
Works like a charm now.  Vielen dank!

 --- 10_linux.OLD2009-11-27 18:17:52.0 +0100
 +++ 10_linux2009-11-27 18:18:18.0 +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=`dirname $rel_linux`
 +  [ $rel_dirname = / ]  rel_dirname=
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}
 
 
 Am Freitag, 27. November 2009 schrieb pancho horrillo:
  Just tried it, and this happens:
  N.B.: Duplicate set of entries,
er, my fault.  I left around a 10_linux.orig, and it got executed too.

  and // instead of / Grub is able to boot from // paths, though.
 
Extra note.  I noticed that memtest86 entries get the relative path OK
(in the unpatched version, I mean).

-- 
pancho horrillo

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

Benjamin Disraeli



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#558042: sugesting another patch

2009-11-27 Thread Matthias Dellweg
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_linux2009-11-25 19:41:40.0 +0100
+++ 09_linux2009-11-27 14:03:04.0 +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}
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#558042: sugesting another patch

2009-11-27 Thread Mike Hommey
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?)

FWIW, they can, with bind mounts.

Mike



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#558042: sugesting another patch

2009-11-27 Thread pancho horrillo
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_linux2009-11-25 19:41:40.0 +0100
 +++ 09_linux2009-11-27 14:03:04.0 +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 

Bug#558042: sugesting another patch

2009-11-27 Thread Matthias Dellweg
The following hot fix patch seems to work. And it also kills the doubled 
slashes (They must have been around with the old method, too.).
Greetings, Matthias

--- 10_linux.OLD2009-11-27 18:17:52.0 +0100
+++ 10_linux2009-11-27 18:18:18.0 +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=`dirname $rel_linux`
+  [ $rel_dirname = / ]  rel_dirname=
   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}


Am Freitag, 27. November 2009 schrieb pancho horrillo:
 Just tried it, and this happens:
 N.B.: Duplicate set of entries, and // instead of /
 Grub is able to boot from // paths, though.

--
I must have had my mind bound to forget about the mount bind.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org