#1034420 grub-efi-amd64: Package update fails with error: installation script subprocess returned error exit status 128

Package:
grub-efi-amd64
Source:
grub-efi-amd64
Description:
GRand Unified Bootloader, version 2 (EFI-AMD64 version)
Submitter:
Andrea Palazzi
Date:
2024-04-13 09:51:03 UTC
Severity:
normal
#1034420#5
Date:
2023-04-14 19:23:03 UTC
From:
To:
Dear Maintainer,
   * What led up to the situation?
updating the system with apt update && apt upgrade

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
apt-update && apt-upgrade

   * What was the outcome of this action?
Setting up grub-efi-amd64 (2.06-8) ...
dpkg: error processing package grub-efi-amd64 (--configure):
 installed grub-efi-amd64 package post-installation script subprocess returned error exit status 128
dpkg: dependency problems prevent configuration of grub-efi:
 grub-efi depends on grub-efi-amd64 (= 2.06-8); however:
  Package grub-efi-amd64 is not configured yet.

dpkg: error processing package grub-efi (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 grub-efi-amd64
 grub-efi
E: Sub-process /usr/bin/dpkg returned an error code (1)

   * What outcome did you expect instead?
An update without errors.

#1034420#10
Date:
2023-04-20 20:31:27 UTC
From:
To:
Hi!

There's not a lot to see here so far. What happens if you run:

  "sudo grub-install -v"

by hand please?

#1034420#15
Date:
2023-04-22 11:05:14 UTC
From:
To:
Hi,
not sure if it's relevant or not, but I'm running on a ZFS boot and root filesystem.
Regarding the grub-install command, you can find attached the full output of LC_ALL=C grub-install -v .
ByeAndrea

#1034420#20
Date:
2023-04-27 13:49:10 UTC
From:
To:
Ok, thanks for the extra info.

Thanks. That's not showing anything unexpected, which surprises me.

Could you please edit /var/lib/dpkg/info/grub-efi-amd64.postinst and
add a line near the top saying

set -x

and then run

# script -c "dpkg --configure --pending" dpkg.log

please? That should capture whatever is failing in dpkg.log, I hope

#1034420#25
Date:
2023-05-07 08:11:53 UTC
From:
To:
 Hi,
here below you can find the results of the script with set -x added right after set -e.
cript started on 2023-05-07 10:10:40+02:00 [COMMAND="dpkg --configure --pending" TERM="screen-256color" TTY="/dev/pts/3" COLUMNS="153" LINES="47"]
Setting up grub-efi-amd64 (2.06-12) ...
+ cached_available_ids=
+ case "$1" in
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64.postinst configure 2.06-7
[1mdpkg:[0m error processing package grub-efi-amd64 (--configure):
 installed grub-efi-amd64 package post-installation script subprocess returned error exit status 128
[1mdpkg:[0m dependency problems prevent configuration of grub-efi:
 grub-efi depends on grub-efi-amd64 (= 2.06-12); however:
  Package grub-efi-amd64 is not configured yet.

[1mdpkg:[0m error processing package grub-efi (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 grub-efi-amd64
 grub-efi

Script done on 2023-05-07 10:10:40+02:00 [COMMAND_EXIT_CODE="1"]
Hope this helps... BTW what does the exist status 128 means exactly?
ByeAndrea


    Il giovedì 27 aprile 2023 15:50:10 CEST, Steve McIntyre <steve@einval.com> ha scritto:

 On Sat, Apr 22, 2023 at 11:05:14AM +0000, Andrea Palazzi wrote:

Ok, thanks for the extra info.

Thanks. That's not showing anything unexpected, which surprises me.

Could you please edit /var/lib/dpkg/info/grub-efi-amd64.postinst and
add a line near the top saying

set -x

and then run

# script -c "dpkg --configure --pending" dpkg.log

please? That should capture whatever is failing in dpkg.log, I hope

#1034420#30
Date:
2024-04-13 09:49:30 UTC
From:
To:
Hi,

I am running into the same problem.
One of my machines fails the install with:

installed grub-efi-amd64 package post-installation script subprocess
returned error exit status 128

here the full log with -x in and DEBCONF_DEBUG=developer

# dpkg --configure -a --debug=7777777777
D000001: root= admindir=/var/lib/dpkg
D000001: ensure_diversions: new, (re)loading
D000001: process queue pkg grub-efi:amd64 queue.len 1 progress 1, try 1
D000040: checking dependencies of grub-efi:amd64 (- <none>)
D000400:   checking group ...
D000400:     checking possibility  -> grub-common
D000400:       checking non-provided pkg grub-common:amd64
D000400:       is installed, ok and found
D000400:     found 3
D000400:   found 3 matched 0 possfixbytrig -
D000400:   checking group ...
D000400:     checking possibility  -> grub-efi-amd64
D000400:       checking non-provided pkg grub-efi-amd64:amd64
D000400:       unpacked/halfconfigured, defer
D000400:     found 1
D000400:   found 1 matched 0 possfixbytrig -
D000040: ok 1 msgs >><<
D000001: process queue pkg grub-efi-amd64:amd64 queue.len 1 progress 2, try 1
D000040: checking dependencies of grub-efi-amd64:amd64 (- <none>)
D000400:   checking group ...
D000400:     checking possibility  -> debconf
D000400:       checking non-provided pkg debconf:all
D000400:       is installed, ok and found
D000400:     found 3
D000400:   found 3 matched 0 possfixbytrig -
D000400:   checking group ...
D000400:     checking possibility  -> grub-common
D000400:       checking non-provided pkg grub-common:amd64
D000400:       is installed, ok and found
D000400:     found 3
D000400:   found 3 matched 0 possfixbytrig -
D000400:   checking group ...
D000400:     checking possibility  -> grub2-common
D000400:       checking non-provided pkg grub2-common:amd64
D000400:       is installed, ok and found
D000400:     found 3
D000400:   found 3 matched 0 possfixbytrig -
D000400:   checking group ...
D000400:     checking possibility  -> grub-efi-amd64-bin
D000400:       checking non-provided pkg grub-efi-amd64-bin:amd64
D000400:       is installed, ok and found
D000400:     found 3
D000400:   found 3 matched 0 possfixbytrig -
D000400:   checking group ...
D000400:     checking possibility  -> ucf
D000400:       checking non-provided pkg ucf:all
D000400:       is installed, ok and found
D000400:     found 3
D000400:   found 3 matched 0 possfixbytrig -
D000040: ok 2 msgs >><<
D000040:     checking Breaks
D000400:       checking breaker grub2-common:amd64 virtbroken <none>
Setting up grub-efi-amd64 (2.06-13+deb12u1) ...
D020000: trigproc_activate_packageprocessing pkg=grub-efi-amd64:amd64
D000002: fork/exec /var/lib/dpkg/info/grub-efi-amd64.postinst (
configure 2.06-3~deb11u6 )
+ cached_available_ids=
+ case "$1" in
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend
/var/lib/dpkg/info/grub-efi-amd64.postinst configure 2.06-3~deb11u6
debconf (developer): frontend started
debconf (developer): frontend running, package name is grub-efi-amd64
debconf (developer): starting /var/lib/dpkg/info/grub-efi-amd64.config
configure 2.06-3~deb11u6
debconf (developer): <-- SET grub2/linux_cmdline
debconf (developer): --> 0 value set
debconf (developer): <-- SET grub2/linux_cmdline_default
module.sig_enforce=0 i915.preliminary_hw_support=1 intel_iommu=on
amd_iommu=on kvm_amd.npt=1 kvm_amd.avic=1 iommu=pt
debconf (developer): --> 0 value set
debconf (developer): <--
debconf (developer): --> 20 Bad line "" received from confmodule.
debconf (developer): <-- INPUT medium grub2/linux_cmdline
debconf (developer): --> 30 question skipped
debconf (developer): <-- INPUT medium grub2/linux_cmdline_default
debconf (developer): --> 30 question skipped
debconf (developer): <-- INPUT low grub2/enable_os_prober
debconf (developer): --> 30 question skipped
debconf (developer): <-- INPUT low grub2/force_efi_extra_removable
debconf (developer): --> 30 question skipped
debconf (developer): <-- INPUT low grub2/update_nvram
debconf (developer): --> 30 question skipped
debconf (developer): <-- GO
debconf (developer): --> 0 ok
dpkg: error processing package grub-efi-amd64 (--configure):
 installed grub-efi-amd64 package post-installation script subprocess
returned error exit status 128
D020000: post_script_tasks - ensure_diversions
D000001: ensure_diversions: same, skipping
D020000: post_script_tasks - trig_incorporate
D000001: process queue pkg grub-efi:amd64 queue.len 0 progress 1, try 1
D000040: checking dependencies of grub-efi:amd64 (- <none>)
D000400:   checking group ...
D000400:     checking possibility  -> grub-common
D000400:       checking non-provided pkg grub-common:amd64
D000400:       is installed, ok and found
D000400:     found 3
D000400:   found 3 matched 0 possfixbytrig -
D000400:   checking group ...
D000400:     checking possibility  -> grub-efi-amd64
D000400:       checking non-provided pkg grub-efi-amd64:amd64
D000400:       not configured/able
D000400:         returning 0
D000400:     found 0
D000400:   found 0 matched 0 possfixbytrig -
D000040: ok 0 msgs >> grub-efi depends on grub-efi-amd64 (=
2.06-13+deb12u1); however:
  Package grub-efi-amd64 is not configured yet.
<<
D000040:     checking Breaks
dpkg: dependency problems prevent configuration of grub-efi:
 grub-efi depends on grub-efi-amd64 (= 2.06-13+deb12u1); however:
  Package grub-efi-amd64 is not configured yet.

dpkg: error processing package grub-efi (--configure):
 dependency problems - leaving unconfigured
D010000: trigproc_run_deferred
Errors were encountered while processing:
 grub-efi-amd64
 grub-efi