[2307] 2009-06-11 Felix Zielcke <[email protected]>

Felix Zielcke <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2307
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2307
Author:   fzielcke
Date:     2009-06-11 19:00:49 +0000 (Thu, 11 Jun 2009)
Log Message:
-----------
2009-06-11  Felix Zielcke  <[email protected]>

	* util/grub.d/30_os-prober.in: Fix a comment. Source
	${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
	to set the root device.  Place drivemap command in the generated
	chain entry.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/util/grub.d/30_os-prober.in

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-06-11 17:31:38 UTC (rev 2306)
+++ trunk/grub2/ChangeLog	2009-06-11 19:00:49 UTC (rev 2307)
@@ -1,3 +1,10 @@
+2009-06-11  Felix Zielcke  <[email protected]>
+
+	* util/grub.d/30_os-prober.in: Fix a comment. Source
+	${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
+	to set the root device.  Place drivemap command in the generated
+	chain entry.
+
 2009-06-11  Pavel Roskin  <[email protected]>
 
 	* configure.ac: Remove host_m32.  Issues with 64-bit utilities
@@ -55,6 +62,7 @@
 	* loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
 	* loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
 
+>>>>>>> .r2306
 2009-06-10  Pavel Roskin  <[email protected]>
 
 	* io/gzio.c (test_header): Don't reuse one buffer for all data.

Modified: trunk/grub2/util/grub.d/30_os-prober.in
===================================================================
--- trunk/grub2/util/grub.d/30_os-prober.in	2009-06-11 17:31:38 UTC (rev 2306)
+++ trunk/grub2/util/grub.d/30_os-prober.in	2009-06-11 19:00:49 UTC (rev 2307)
@@ -1,7 +1,7 @@
 #! /bin/sh -e
 
-# update-grub helper script.
-# Copyright (C) 2006,2007,2008  Free Software Foundation, Inc.
+# grub-mkconfig helper script.
+# Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
 #
 # GRUB is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,6 +16,12 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+
+. ${libdir}/grub/grub-mkconfig_lib
+
 if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
   # missing os-prober and/or linux-boot-prober
   exit 0
@@ -45,7 +51,11 @@
 
       cat << EOF
 menuentry "${LONGNAME} (on ${DEVICE})" {
-	set root=${CHAINROOT}
+EOF
+      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+
+      cat << EOF
+	drivemap -s (hd0) \$root
 	chainloader +1
 }
 EOF
@@ -61,15 +71,15 @@
         LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
         LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"
 
-        LINUXROOT="`grub-probe --target=drive --device ${LBOOT} 2> /dev/null`"
-
         if [ -z "${LLABEL}" ] ; then
           LLABEL="${LONGNAME}"
         fi
 
         cat << EOF
 menuentry "${LLABEL} (on ${DEVICE})" {
-	set root=${LINUXROOT}
+EOF
+	prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+	cat <<  EOF
 	linux ${LKERNEL} ${LPARAMS}
 EOF
         if [ -n "${LINITRD}" ] ; then
@@ -88,7 +98,9 @@
       OSXDISK=disk"`echo ${OSXROOT} | awk -F , '{ print $1 ; }' | sed 's/(hd//;'`"s"`echo ${OSXROOT} | awk -F , '{ print $2 ; }' | sed 's/)//;'`"
         cat << EOF
 menuentry "${LONGNAME} (on ${DEVICE})" {
-	set root=${OSXROOT}
+EOF
+	prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+	cat << EOF
         insmod vbe
         do_resume=0
         if [ /var/vm/sleepimage -nt10 / ]; then
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.