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");