diff -uNr grub-0.97/util/grub-set-default.in grub-0.97-changed/util/grub-set-default.in
--- grub-0.97/util/grub-set-default.in	2007-03-06 22:17:12.000000000 +0000
+++ grub-0.97-changed/util/grub-set-default.in	2007-03-07 00:00:08.000000000 +0000
@@ -74,18 +74,45 @@
     exit 1
 fi
 
+find_grub_dir ()
+{
+        echo  -n "Searching for GRUB installation directory ... " >&2
+
+        for d in $grub_dirs ; do
+                if [ -d "$d" ] ; then
+                        grub_dir="$d"
+                        break
+                fi
+        done
+
+        if [ -z "$grub_dir" ] ; then
+                abort "No GRUB directory found.\n###"
+        else
+                echo "found: $grub_dir" >&2
+        fi
+
+        echo $grub_dir
+}
+
+grub_dirs="/boot/grub /boot/boot/grub"
+
 # Determine the GRUB directory. This is different among OSes.
-grubdir=${rootdir}/boot/grub
-if test -d ${grubdir}; then
+# if rootdir has been informed use it or find grubdir otherwise
+if [ -n "${rootdir}" ]; then
+  grubdir=${rootdir}/boot/grub
+  if test -d ${grubdir}; then
     :
-else
+  else
     grubdir=${rootdir}/grub
     if test -d ${grubdir}; then
-	:
+        :
     else
-	echo "No GRUB directory found under ${rootdir}/" 1>&2
-	exit 1
+        echo "No GRUB directory found under ${rootdir}/" 1>&2
+        exit 1
     fi
+  fi
+else
+  grubdir=$(find_grub_dir)
 fi
 
 file=${grubdir}/default

