From 81c46b8ffbfc8ccd6d5d5bc446494c7c2388e107 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Oct 30 2023 23:03:46 +0000 Subject: Backport PR #2545 to fix media check failure visibility Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2246410 for live images. --- diff --git a/0001-fix-wait-12-hours-before-halt-on-media-check-fail.patch b/0001-fix-wait-12-hours-before-halt-on-media-check-fail.patch new file mode 100644 index 0000000..8276ca7 --- /dev/null +++ b/0001-fix-wait-12-hours-before-halt-on-media-check-fail.patch @@ -0,0 +1,40 @@ +From a1b346121da44908b2685d8ef1b5e68b57829b2b Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Sun, 29 Oct 2023 21:19:36 -0700 +Subject: [PATCH] fix: wait 12 hours before halt on media check fail + +If a modesetting driver has been loaded by the time the media +check happens, halting the system (as we currently do immediately +if the check fails) blanks the screen, which is confusing for +the user. This adds a warning message and a 12-hour wait before +the system is eventually halted, so the user can see the media +check failure and (presumably) reboot and fix the medium. + +It also tweaks the text of the failure message not to call it a +"CD check", since it's not 1998 any more. + +https://bugzilla.redhat.com/show_bug.cgi?id=2246410 + +Signed-off-by: Adam Williamson +--- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index e8083394..3fccda5f 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -76,7 +76,9 @@ if [ -n "$check" ]; then + checkisomd5 --verbose "$check_dev" + fi + if [ $? -eq 1 ]; then +- die "CD check failed!" ++ warn "Media check failed! We do not recommend using this medium. System will halt in 12 hours" ++ sleep 43200 ++ die "Media check failed!" + exit 1 + fi + type plymouth > /dev/null 2>&1 && plymouth --show-splash +-- +2.41.0 + diff --git a/dracut.spec b/dracut.spec index 1b674f2..ef15c28 100644 --- a/dracut.spec +++ b/dracut.spec @@ -7,7 +7,7 @@ %global __requires_exclude pkg-config # rpmdev-bumpspec and releng automation compatible variable -%global baserelease 14 +%global baserelease 15 Name: dracut Version: 059 @@ -79,6 +79,10 @@ Patch11: 0001-fix-dracut.sh-use-dynamically-uefi-s-sections-offset.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2131852 Patch12: 0001-fix-make-iso-scan-trigger-udev-events.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2246410 +# https://github.com/dracutdevs/dracut/pull/2545 +Patch13: 0001-fix-wait-12-hours-before-halt-on-media-check-fail.patch + BuildRequires: bash BuildRequires: git-core BuildRequires: pkgconfig(libkmod) >= 23 @@ -479,6 +483,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Sat Oct 28 2023 Adam Williamson - 059-15 +- Backport PR #2545 to fix media check failure visibility + * Thu Oct 05 2023 Adam Williamson - 059-14 - Backport PR #2196 to fix boot with iso-scan feature