diff options
author | 2021-10-07 21:31:47 -0400 | |
---|---|---|
committer | 2021-10-08 06:12:19 -0500 | |
commit | 5023585e4f13834627b835125d7c6f9dee62f21a (patch) | |
tree | 9ca946838bd7a6608789093e679764d7a6016d12 /sys-boot/os-prober/files | |
parent | sys-boot/os-prober: use the name in fstab for devmapper partitions (diff) | |
download | gentoo-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/files')
-rw-r--r-- | sys-boot/os-prober/files/os-prober-1.79-mounted-boot-partition-fix.patch | 17 |
1 files changed, 17 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 |