@ -1,4 +1,4 @@
commit 12564fda0ef25d65db2ef2da444abde448a87a71
commit ef471478e4b8950a3312ffc736113f9b9e8946f2
Author: Mike Hiretsky <mh@calculate.ru>
Date: Tue Jul 26 18:20:55 2011 +0400
@ -11,30 +11,32 @@ Date: Tue Jul 26 18:20:55 2011 +0400
For resolve the problem filesystem for that devices determined by device
to which they point. (readlink -f)
diff --git a/util/grub-install.in b/util/grub-install.in
index 16236ba..7ebbb50 100644
--- a/util/grub-install.in
+++ b/util/grub-install.in
@@ -466,6 +466,10 @@ fi
diff --git util/grub-install.in util/grub-install.in
index 16236ba..8cf86be 100644
--- util/grub-install.in
+++ util/grub-install.in
@@ -465,6 +465,11 @@ fi
# Create the core image. First, auto-detect the filesystem module.
fs_module="`"$grub_probe" --device-map="${device_map}" --target=fs --device "${grub_device}"`"
if test "x$fs_module" = x ; then
+# sometimes filesystem on LVM (place in /dev/mapper) is not detected. Try detect by /dev/dm-X
+if test "x$fs_module" = x ; then
+ grub_device_fs=$(readlink -f ${grub_device})
+ fs_module="`"$grub_probe" --device-map="${device_map}" --target=fs --device "${grub_device_fs}"`"
+fi
+if test "x$fs_module" = x ; then
if test "x$fs_module" = x ; then
echo "Auto-detection of a filesystem of ${grub_device} failed." 1>&2
echo "Try with --recheck." 1>&2
echo "If the problem persists please report this together with the output of \"$grub_probe --device-map=\"${device_map}\" --target=fs -v ${grubdir}\" to <bug-grub@gnu.org>" 1>&2
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index 2c5fd8c..ace6c28 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -58,7 +58,10 @@ is_path_readable_by_grub ()
diff --git util/grub-mkconfig_lib.in util/grub-mkconfig_lib.in
index 2c5fd8c..a2dcd20 100644
--- util/grub-mkconfig_lib.in
+++ util/grub-mkconfig_lib.in
@@ -58,7 +58,11 @@ is_path_readable_by_grub ()
# abort if file is in a filesystem we can't read
if "${grub_probe}" -t fs "$path" > /dev/null 2>&1 ; then : ; else
- return 1
+ # sometimes filesystem on LVM (place in /dev/mapper) is not detected. Try detect by /dev/dm-X
+ fsdevice=`readlink -f $(${grub_probe} -t device "$path" 2>/dev/null)`
+ if "${grub_probe}" -t fs -d "${fsdevice}" > /dev/null 2>&1 ; then : ; else
+ return 1
@ -42,11 +44,12 @@ index 2c5fd8c..ace6c28 100644
fi
# ... or if we can't figure out the abstraction module, for example if
@@ -121,7 +12 4,12 @@ prepare_grub_to_access_device ()
@@ -121,7 +12 5,13 @@ prepare_grub_to_access_device ()
esac
done
- fs="`"${grub_probe}" --device "${device}" --target=fs`"
+ # sometimes filesystem on LVM (place in /dev/mapper) is not detected. Try detect by /dev/dm-X
+ if "${grub_probe}" --device "${device}" --target=fs >/dev/null 2>/dev/null; then
+ device_fs="${device}"
+ else