From: "Ben Kohler" <bkohler@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/os-prober/, sys-boot/os-prober/files/
Date: Fri, 8 Oct 2021 11:12:33 +0000 (UTC) [thread overview]
Message-ID: <1633691535.c305cbb85b681269a94554866be0e3738ed4111d.bkohler@gentoo> (raw)
commit: c305cbb85b681269a94554866be0e3738ed4111d
Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Fri Oct 8 01:06:15 2021 +0000
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Fri Oct 8 11:12:15 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c305cbb8
sys-boot/os-prober: fix detection on software-raid devices
Fixes detection of OSes installed on /dev/md* devices (not linked to
/dev/mapper/*).
Package-Manager: Portage-3.0.26, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457 <AT> gmail.com>
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
.../files/os-prober-1.79-mdraid-detection.patch | 28 ++++++++++++++++++++++
sys-boot/os-prober/os-prober-9999.ebuild | 1 +
2 files changed, 29 insertions(+)
diff --git a/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch b/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch
new file mode 100644
index 00000000000..15b9de5117a
--- /dev/null
+++ b/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch
@@ -0,0 +1,28 @@
+Fixes OS detection on mdraid devices
+
+Bug: https://bugs.debian.org/648251
+ https://bugzilla.redhat.com/752402
+
+--- a/os-prober
++++ b/os-prober
+@@ -64,6 +64,11 @@ partitions () {
+ exit 0
+ fi
+
++ # Add MD RAID devices
++ if [ -f /proc/mdstat ] ; then
++ awk '/^md/ {printf "/dev/"$1"\n"}' /proc/mdstat
++ fi
++
+ # Also detect OSes on LVM volumes (assumes LVM is active)
+ if type lvs >/dev/null 2>&1; then
+ echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name |
+@@ -123,7 +128,7 @@ if [ -f /proc/swaps ]; then
+ fi
+ : >"$OS_PROBER_TMP/raided-map"
+ if [ -f /proc/mdstat ] ; then
+- grep "^md" /proc/mdstat | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
++ grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
+ fi
+
+ for partition in $(partitions); do
diff --git a/sys-boot/os-prober/os-prober-9999.ebuild b/sys-boot/os-prober/os-prober-9999.ebuild
index 2b0ace332d0..4feb1e2b320 100644
--- a/sys-boot/os-prober/os-prober-9999.ebuild
+++ b/sys-boot/os-prober/os-prober-9999.ebuild
@@ -26,6 +26,7 @@ RDEPEND="sys-boot/grub:2[mount]"
QA_MULTILIB_PATHS="usr/lib/os-prober/.*"
PATCHES=(
+ "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch
"${FILESDIR}"/${PN}-1.78-btrfsfix.patch
)
next reply other threads:[~2021-10-08 11:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-08 11:12 Ben Kohler [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-06-14 14:18 [gentoo-commits] repo/gentoo:master commit in: sys-boot/os-prober/, sys-boot/os-prober/files/ Ben Kohler
2024-05-21 15:50 Ben Kohler
2024-05-08 16:43 Ben Kohler
2023-02-16 13:55 Ben Kohler
2021-10-08 11:12 Ben Kohler
2021-10-08 11:12 Ben Kohler
2021-10-08 11:12 Ben Kohler
2021-10-08 11:12 Ben Kohler
2017-12-26 12:53 Pacho Ramos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1633691535.c305cbb85b681269a94554866be0e3738ed4111d.bkohler@gentoo \
--to=bkohler@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox