os-prober/os-prober-bootpart-name-fix.patch
Hedayat Vatankhah 8cef6cc5ea Update to upstream version 1.68, bug #1267779
- Support a case where a kernel named vmlinuz/x is used under Gentoo, bug #1223237
2015-10-21 00:08:28 +03:30

30 lines
877 B
Diff

Index: os-prober/common.sh
===================================================================
--- os-prober.orig/common.sh
+++ os-prober/common.sh
@@ -269,7 +269,7 @@ linux_mount_boot () {
if [ "$bindfrom" != "$tmpmnt/boot" ]; then
if mount --bind "$bindfrom" "$tmpmnt/boot"; then
mounted=1
- bootpart="$1"
+ bootpart="$tmppart"
else
debug "failed to bind-mount $bindfrom onto $tmpmnt/boot"
fi
@@ -277,6 +277,15 @@ linux_mount_boot () {
fi
if [ "$mounted" ]; then
:
+ elif [ -e "$tmppart" ]; then
+ bootpart="$tmppart"
+ boottomnt="$tmppart"
+ elif [ -e "$tmpmnt/$tmppart" ]; then
+ bootpart="$tmppart"
+ boottomnt="$tmpmnt/$tmppart"
+ elif [ -e "/target/$tmppart" ]; then
+ bootpart="$tmppart"
+ boottomnt="/target/$tmppart"
elif [ -e "$1" ]; then
bootpart="$1"
boottomnt="$1"