1 |
commit: 5023585e4f13834627b835125d7c6f9dee62f21a |
2 |
Author: Peter Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Oct 8 01:31:47 2021 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 8 11:12:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5023585e |
7 |
|
8 |
sys-boot/os-prober: return boot instead of root if both are mounted |
9 |
|
10 |
Fixes a corner-case in which the root partition is returned instead of |
11 |
the boot partition, when both are mounted. |
12 |
|
13 |
Package-Manager: Portage-3.0.26, Repoman-3.0.3 |
14 |
Signed-off-by: Peter Levine <plevine457 <AT> gmail.com> |
15 |
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> |
16 |
|
17 |
.../os-prober-1.79-mounted-boot-partition-fix.patch | 17 +++++++++++++++++ |
18 |
sys-boot/os-prober/os-prober-9999.ebuild | 1 + |
19 |
2 files changed, 18 insertions(+) |
20 |
|
21 |
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 |
22 |
new file mode 100644 |
23 |
index 00000000000..1be8c810ddf |
24 |
--- /dev/null |
25 |
+++ b/sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch |
26 |
@@ -0,0 +1,17 @@ |
27 |
+Fixes the problem of the root partition being returned instead of the boot |
28 |
+partition when both are already mounted somewhere. |
29 |
+ |
30 |
+Bug: https://bugs.debian.org/699840 |
31 |
+ https://bugzilla.redhat.com/906886 |
32 |
+ |
33 |
+--- a/linux-boot-prober |
34 |
++++ b/linux-boot-prober |
35 |
+@@ -167,7 +167,7 @@ else |
36 |
+ bootpart="${mountboot%% *}" |
37 |
+ bootmounted="${mountboot#* }" |
38 |
+ else |
39 |
+- bootpart="$partition" |
40 |
++ bootpart="$(grep " $mpoint/boot " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 4)" |
41 |
+ bootmounted=0 |
42 |
+ fi |
43 |
+ for test in /usr/lib/linux-boot-probes/mounted/*; do |
44 |
|
45 |
diff --git a/sys-boot/os-prober/os-prober-9999.ebuild b/sys-boot/os-prober/os-prober-9999.ebuild |
46 |
index 392bf080566..59539158759 100644 |
47 |
--- a/sys-boot/os-prober/os-prober-9999.ebuild |
48 |
+++ b/sys-boot/os-prober/os-prober-9999.ebuild |
49 |
@@ -29,6 +29,7 @@ PATCHES=( |
50 |
"${FILESDIR}"/${PN}-1.79-mdraid-detection.patch |
51 |
"${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch |
52 |
"${FILESDIR}"/${PN}-1.79-use-fstab-name.patch |
53 |
+ "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch |
54 |
) |
55 |
|
56 |
DOC_CONTENTS=" |