summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2021-10-07 21:31:47 -0400
committerBen Kohler <bkohler@gentoo.org>2021-10-08 06:12:19 -0500
commit5023585e4f13834627b835125d7c6f9dee62f21a (patch)
tree9ca946838bd7a6608789093e679764d7a6016d12 /sys-boot/os-prober
parentsys-boot/os-prober: use the name in fstab for devmapper partitions (diff)
downloadgentoo-5023585e4f13834627b835125d7c6f9dee62f21a.tar.gz
gentoo-5023585e4f13834627b835125d7c6f9dee62f21a.tar.bz2
gentoo-5023585e4f13834627b835125d7c6f9dee62f21a.zip
sys-boot/os-prober: return boot instead of root if both are mounted
Fixes a corner-case in which the root partition is returned instead of the boot partition, when both are mounted. Package-Manager: Portage-3.0.26, Repoman-3.0.3 Signed-off-by: Peter Levine <plevine457@gmail.com> Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'sys-boot/os-prober')
-rw-r--r--sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch17
-rw-r--r--sys-boot/os-prober/os-prober-9999.ebuild1
2 files changed, 18 insertions, 0 deletions
diff --git a/sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch b/sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch
new file mode 100644
index 000000000000..1be8c810ddf5
--- /dev/null
+++ b/sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch
@@ -0,0 +1,17 @@
+Fixes the problem of the root partition being returned instead of the boot
+partition when both are already mounted somewhere.
+
+Bug: https://bugs.debian.org/699840
+ https://bugzilla.redhat.com/906886
+
+--- a/linux-boot-prober
++++ b/linux-boot-prober
+@@ -167,7 +167,7 @@ else
+ bootpart="${mountboot%% *}"
+ bootmounted="${mountboot#* }"
+ else
+- bootpart="$partition"
++ bootpart="$(grep " $mpoint/boot " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 4)"
+ bootmounted=0
+ fi
+ for test in /usr/lib/linux-boot-probes/mounted/*; do
diff --git a/sys-boot/os-prober/os-prober-9999.ebuild b/sys-boot/os-prober/os-prober-9999.ebuild
index 392bf0805664..59539158759d 100644
--- a/sys-boot/os-prober/os-prober-9999.ebuild
+++ b/sys-boot/os-prober/os-prober-9999.ebuild
@@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.79-mdraid-detection.patch
"${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch
"${FILESDIR}"/${PN}-1.79-use-fstab-name.patch
+ "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch
)
DOC_CONTENTS="