]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-install.in: Add --debug-image= option.
authorColin Watson <cjwatson@ubuntu.com>
Mon, 28 Jun 2010 08:06:41 +0000 (09:06 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Mon, 28 Jun 2010 08:06:41 +0000 (09:06 +0100)
ChangeLog
util/grub-install.in

index fe6461760f036e60d58c46887e275987ab7d35f4..1d89f5cbb4a357545c359d8b78961a070b87d429 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-28  Colin Watson  <cjwatson@ubuntu.com>
+
+       * util/grub-install.in: Add --debug-image= option.
+
 2010-06-28  Colin Watson  <cjwatson@ubuntu.com>
 
        Change grub-mkdevicemap to emit /dev/disk/by-id/ names where
index c7e087dd0f0969ce5ebed7f1ff38e5112afff46b..4a5b5a1c3ad04766612d9db2f622c1324a55924c 100644 (file)
@@ -50,6 +50,7 @@ no_floppy=
 force_lba=
 recheck=no
 debug=no
+debug_image=
 
 if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
     disk_module=biosdisk
@@ -180,6 +181,11 @@ do
     # This is an undocumented feature...
     --debug)
        debug=yes ;;
+    --debug-image)
+       debug_image=`argument $option "$@"`; shift;;
+    --debug-image=*)
+       debug_image=`echo "$option" | sed 's/--debug-image=//'` ;;
+
     -f | --force)
         setup_force="--force" ;;
 
@@ -349,6 +355,13 @@ fi
 prefix_drive=
 config_opt=
 
+rm -f ${grubdir}/load.cfg
+
+if [ "x${debug_image}" != x ]; then
+    echo "set debug='${debug_image}'" >> ${grubdir}/load.cfg
+    config_opt="-c ${grubdir}/load.cfg "
+fi
+
 if [ "x${devabstraction_module}" = "x" ] ; then
     if [ x"${install_device}" != x ]; then
       if echo "${install_device}" | grep -qx "(.*)" ; then
@@ -369,7 +382,7 @@ if [ "x${devabstraction_module}" = "x" ] ; then
           echo "UUID needed with ata mod, but the filesystem containing ${grubdir} does not support UUIDs." 1>&2
           exit 1
         fi
-        echo "search.fs_uuid ${uuid} root " > ${grubdir}/load.cfg
+        echo "search.fs_uuid ${uuid} root " >> ${grubdir}/load.cfg
        echo 'set prefix=($root)'"${relative_grubdir}" >> ${grubdir}/load.cfg
        config_opt="-c ${grubdir}/load.cfg "
         modules="$modules search_fs_uuid"
@@ -379,7 +392,7 @@ if [ "x${devabstraction_module}" = "x" ] ; then
           echo "You attempted a cross-disk install, but the filesystem containing ${grubdir} does not support UUIDs." 1>&2
           exit 1
         fi
-        echo "search.fs_uuid ${uuid} root " > ${grubdir}/load.cfg
+        echo "search.fs_uuid ${uuid} root " >> ${grubdir}/load.cfg
        echo 'set prefix=($root)'"${relative_grubdir}" >> ${grubdir}/load.cfg
        config_opt="-c ${grubdir}/load.cfg "
         modules="$modules search_fs_uuid"