diff --git a/rear-include-dmsetup-unconditionally-RHEL-242578.patch b/rear-include-dmsetup-unconditionally-RHEL-242578.patch new file mode 100644 index 0000000..2fbcd0c --- /dev/null +++ b/rear-include-dmsetup-unconditionally-RHEL-242578.patch @@ -0,0 +1,57 @@ +From e5a84fdeaed8169f0cec0fd8dbbea66aa275d50c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= +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! + diff --git a/rear.spec b/rear.spec index 23b65a6..bed2830 100644 --- a/rear.spec +++ b/rear.spec @@ -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 # ######################