From: Colin Watson Date: Mon, 28 Jun 2010 08:06:41 +0000 (+0100) Subject: * util/grub-install.in: Add --debug-image= option. X-Git-Tag: 1.99~790 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c06e40f7286a568b1237b968fdb3824b158d590a;p=thirdparty%2Fgrub.git * util/grub-install.in: Add --debug-image= option. --- diff --git a/ChangeLog b/ChangeLog index fe6461760..1d89f5cbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-06-28 Colin Watson + + * util/grub-install.in: Add --debug-image= option. + 2010-06-28 Colin Watson Change grub-mkdevicemap to emit /dev/disk/by-id/ names where diff --git a/util/grub-install.in b/util/grub-install.in index c7e087dd0..4a5b5a1c3 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -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"