From 5023585e4f13834627b835125d7c6f9dee62f21a Mon Sep 17 00:00:00 2001 From: Peter Levine Date: Thu, 7 Oct 2021 21:31:47 -0400 Subject: 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 Signed-off-by: Ben Kohler --- .../os-prober-1.79-mounted-boot-partition-fix.patch | 17 +++++++++++++++++ sys-boot/os-prober/os-prober-9999.ebuild | 1 + 2 files changed, 18 insertions(+) create mode 100644 sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch (limited to 'sys-boot/os-prober') 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=" -- cgit v1.2.3-65-gdbad