Include dmsetup and dmeventd unconditionally

Resolves: RHEL-242578
This commit is contained in:
Lukáš Zaoral 2026-08-18 09:28:09 +02:00
parent aae94361ae
commit 79831eda78
No known key found for this signature in database
GPG Key ID: 39157506DD67752D
2 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,57 @@
From e5a84fdeaed8169f0cec0fd8dbbea66aa275d50c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= <lzaoral@redhat.com>
Date: Mon, 31 Jan 2022 16:04:55 +0100
Subject: [PATCH] Include dmsetup and dmeventd unconditionally
Changes usr/share/rear/conf/GNU/Linux.conf
Older releases of os-prober (1.74 and below) use dmsetup as a fallback
solution for mounting when grub-mount is missing.
However, dmsetup was included in the rescue image if and only if LVM,
multipath or encryption were detected. Thus, BIOS machines that do
not use these but still have dmsetup present, would block indefinitely
on the "Installing GRUB2 boot loader..." step.
GRUB2 installation is performed in a chroot after the data have already
been recovered. ReaR would call grub-mkconfig which calls os-prober
which then executes dmsetup. However, it would never receive the expected
response in the form of releasing a System V semaphore by dmsetup executed
by udevd outside the chroot as rescue system would not have dmsetup present.
related https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853927
---
usr/share/rear/conf/GNU/Linux.conf | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/usr/share/rear/conf/GNU/Linux.conf b/usr/share/rear/conf/GNU/Linux.conf
index 6c3c346123..f39df4c83e 100644
--- a/usr/share/rear/conf/GNU/Linux.conf
+++ b/usr/share/rear/conf/GNU/Linux.conf
@@ -164,6 +164,25 @@ sysctl
blockdev
lsblk
clear
+
+# Older releases of os-prober (1.74 and below) use dmsetup as a fallback
+# solution for mounting when grub-mount is missing.
+#
+# However, dmsetup was included in the rescue image if and only if LVM,
+# multipath or encryption were detected. Thus, BIOS machines that do
+# not use these but still have dmsetup present, would block indefinitely
+# on the "Installing GRUB2 boot loader..." step.
+#
+# GRUB2 installation is performed in a chroot after the data have already
+# been recovered. ReaR would call grub-mkconfig which calls os-prober
+# which then executes dmsetup. However, it would never receive the expected
+# response in the form of releasing a System V semaphore by dmsetup executed
+# by udevd outside the chroot as rescue system would not have dmsetup present.
+#
+# see https://github.com/rear/rear/pull/2748
+# related https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853927
+dmsetup
+dmeventd
)
# the lib* serves to cover both 32bit and 64bit libraries!

View File

@ -174,6 +174,10 @@ Patch141: rear-add-lazy-unmounting-with-retry-RHEL-146134.patch
# https://github.com/rear/rear/commit/94b51e67640d22a4b63a06244d28060a6e130b8f
Patch142: rear-fix-partition-naming-when-migrating-devices-RHEL-137301.patch
# include dmsetup and dmeventd unconditionally
# https://github.com/rear/rear/commit/39c79b34ba884e4f674d17abb5c3e5423820dbe1
Patch143: rear-include-dmsetup-unconditionally-RHEL-242578.patch
######################
# downstream patches #
######################