diff options
author | Peter Levine <plevine457@gmail.com> | 2021-10-07 21:06:15 -0400 |
---|---|---|
committer | Ben Kohler <bkohler@gentoo.org> | 2021-10-08 06:12:15 -0500 |
commit | c305cbb85b681269a94554866be0e3738ed4111d (patch) | |
tree | 5ca9f9186391aeb1555756d4c627c9e15bf5b352 /sys-boot/os-prober | |
parent | sys-boot/os-prober: remove exherbo patch (diff) | |
download | gentoo-c305cbb85b681269a94554866be0e3738ed4111d.tar.gz gentoo-c305cbb85b681269a94554866be0e3738ed4111d.tar.bz2 gentoo-c305cbb85b681269a94554866be0e3738ed4111d.zip |
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@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-mdraid-detection.patch | 28 | ||||
-rw-r--r-- | sys-boot/os-prober/os-prober-9999.ebuild | 1 |
2 files changed, 29 insertions, 0 deletions
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 000000000000..15b9de5117a9 --- /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 2b0ace332d05..4feb1e2b320b 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 ) |