os-prober-bootpart-name-fix.patch 877 B

123456789101112131415161718192021222324252627282930
  1. Index: os-prober/common.sh
  2. ===================================================================
  3. --- os-prober.orig/common.sh
  4. +++ os-prober/common.sh
  5. @@ -269,7 +269,7 @@ linux_mount_boot () {
  6. if [ "$bindfrom" != "$tmpmnt/boot" ]; then
  7. if mount --bind "$bindfrom" "$tmpmnt/boot"; then
  8. mounted=1
  9. - bootpart="$1"
  10. + bootpart="$tmppart"
  11. else
  12. debug "failed to bind-mount $bindfrom onto $tmpmnt/boot"
  13. fi
  14. @@ -277,6 +277,15 @@ linux_mount_boot () {
  15. fi
  16. if [ "$mounted" ]; then
  17. :
  18. + elif [ -e "$tmppart" ]; then
  19. + bootpart="$tmppart"
  20. + boottomnt="$tmppart"
  21. + elif [ -e "$tmpmnt/$tmppart" ]; then
  22. + bootpart="$tmppart"
  23. + boottomnt="$tmpmnt/$tmppart"
  24. + elif [ -e "/target/$tmppart" ]; then
  25. + bootpart="$tmppart"
  26. + boottomnt="/target/$tmppart"
  27. elif [ -e "$1" ]; then
  28. bootpart="$1"
  29. boottomnt="$1"