This patch fixes the situation with i386-pc where grub-probe &
grube-setup are searching for the root fs for grub files  and they
happen to be on the same file system as the root ("/") filesystem. If
this is the case if when probing /dev , if the partition is a sd* it
will not find it because it will find /dev/root first (this is a
mistake).

Signed-off-by: Jerone Young <[EMAIL PROTECTED]>
diff -r cca565f3c398 util/i386/pc/getroot.c
--- a/util/i386/pc/getroot.c	Sun Feb 11 09:48:36 2007 -0600
+++ b/util/i386/pc/getroot.c	Sun Feb 11 19:02:00 2007 -0600
@@ -192,6 +192,13 @@ find_root_device (const char *dir, dev_t
 	  strip_extra_slashes (res);
 	  free (cwd);
 
+	  /* /dev/root is not a real block device keep looking, takes care
+	     of situation where root filesystem is on the same partition as
+	     grub files */
+
+	  if (strcmp(res, "/dev/root") == 0)
+		continue;
+
 	  if (chdir (saved_cwd) < 0)
 	    grub_util_error ("Cannot restore the original directory");
 
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to