From: jerone Date: Tue, 10 Apr 2007 22:00:24 +0000 (+0000) Subject: Fixes the situation with i386-pc where grub-probe & grub-setup are searching X-Git-Tag: 1.98~1870 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08db463226d5d5894c95cf5740f0fa0988ef67df;p=thirdparty%2Fgrub.git Fixes the situation with i386-pc where grub-probe & grub-setup are searching for the root fs for grub files and they happen to be on the same file system as the root ("/") filesystem. --- diff --git a/ChangeLog b/ChangeLog index 3dd34ad50..89e0a318a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-04-10 Jerone Young + * util/i386/pc/getroot.c: Update so that if root device is /dev/root , + continue on and look for device node with real device name. + 2007-04-10 Jerone Young * configure.ac: Add argument for autoconf to use tranformation diff --git a/util/i386/pc/getroot.c b/util/i386/pc/getroot.c index 343f9655a..211ce4c18 100644 --- a/util/i386/pc/getroot.c +++ b/util/i386/pc/getroot.c @@ -192,6 +192,13 @@ find_root_device (const char *dir, dev_t dev) 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");