[Bug 1896608] Re: [regression-in-stable] grub-multi-install fails with exit 1 when question grub-efi/install_devices_empty is skipped
Michael Vogt
1896608 at bugs.launchpad.net
Wed Sep 23 07:45:57 UTC 2020
Looking at the diff in
http://launchpadlibrarian.net/497631450/grub2_2.04-1ubuntu26_2.04-1ubuntu26.4.diff.gz
I see that this appears to be a new change during the SRU cycle,
specifically:
"""
diff -Nru grub2-2.04/debian/grub-multi-install grub2-2.04/debian/grub-multi-install
--- grub2-2.04/debian/grub-multi-install 2020-04-15 11:31:27.000000000 +0000
+++ grub2-2.04/debian/grub-multi-install 2020-09-08 10:23:00.000000000 +0000
@@ -8,6 +8,13 @@
. /usr/share/debconf/confmodule
+# shamelessly stolen from ucf:
+#
+# Load our templates, just in case our template has
+# not been loaded or the Debconf DB lost or corrupted
+# since then.
+db_x_loadtemplatefile "$(dpkg-query --control-path grub-common templates)" grub-common
+
###############################################################################
# COPY FROM POSTINST
###############################################################################
@@ -373,7 +380,7 @@
continue
fi
else
- break # noninteractive
+ exit 1 # noninteractive
fi
fi
@@ -395,7 +402,7 @@
db_fset grub-efi/install_devices_empty seen false
fi
else
- break # noninteractive
+ exit 1 # noninteractive
fi
else
break
"""
The new "exit 1" will break stable users that have answered the "grub-
efi/install_devices_empty" question already with the answer "yes"
because for those the question will be skipped (as it was already asked)
and hence the if goes into the "exit 1" condition and the postinst
fails.
** Summary changed:
- grub-multi-install fails with exit 1 when question grub-efi/install_devices_empty is skipped
+ [regression-in-stable] grub-multi-install fails with exit 1 when question grub-efi/install_devices_empty is skipped
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1896608
Title:
[regression-in-stable] grub-multi-install fails with exit 1 when
question grub-efi/install_devices_empty is skipped
Status in grub2 package in Ubuntu:
New
Bug description:
A 20.04 machine with grub-efi-amd64-signed that recently got upgraded fails with:
"""
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
"""
unfortunately not much more context was provided. After some debugging
it turns out that there are the following lines in /usr/lib/grub/grub-
multi-install:
"""
db_get "$question"
if [ -z "$RET" ]; then
# Reset the seen flag if the current answer is false, since
# otherwise we'll loop with no indication of why.
db_get grub-efi/install_devices_empty
if [ "$RET" = false ]; then
db_fset grub-efi/install_devices_empty seen false
fi
if db_input critical grub-efi/install_devices_empty; then
db_go
db_get grub-efi/install_devices_empty
if [ "$RET" = true ]; then
break
else
db_fset "$question" seen false
db_fset grub-efi/install_devices_empty seen false
fi
else
exit 1 # noninteractive
fi
"""
when grub-efi/install_devices_empty has the flag "seen" the line
if db_input critical grub-efi/install_devices_empty; then
will return "30" if the question was already shown but the rfset eset
happens only if the anser was "false" earlier. So the code jumps to
"exit 1".
So either the code need to always reset the seen flag ( db_fset grub-
efi/install_devices_empty seen false) or deal with exit code 30 from
"db_input critical grub-efi/install_devices_empty" more gracefully.
I can provide a /var/cache/debconf/config.dat to reproduce. I'm not
entirely sure how to reproduce from a clean install, the bug will only
happen after the first upgrade.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1896608/+subscriptions
More information about the foundations-bugs
mailing list