Creating a bug report/issue
I have searched the existing open and closed issues
Required Information
-
DietPi version | CORE=10, SUB=1, RC=2, branch=master
Distro version | trixie
-
Kernel version | Linux DietPi 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64 GNU/Linux
-
Architecture | amd64
-
SBC model | Native PC (x86 64)
-
Power supply used | n/a
-
SD card used | n/a
Additional Information (if applicable)
- Software title | mpd (controlled by Cantata v2.3.2 via network/ Win10 laptop
- running dietpi-update, the process fails while processing grub-efi-amd64 (3x attempts give the same result)
- Bug report ID | 4c07a9a3-a311-47db-ad3a-7c43a8ee020d
Steps to reproduce
- run dietpi-update (v10.1.2 to v10.5.2)
Expected behaviour
- successful OS update to v10.5.2
Actual behaviour
Failure to complete process:
Extra details
Thankfully, the machine still boots into V10.1.2 and plays music (via mpd) as before the upgrade attempt.
Your help and guidance are much appreciated, thanks.
Grant
postinst scripts with unhandled muted errors are the best
. It is a large one. The only practical way is to run it with -x flag, to see where it fails:
sudo sed -i '1a\set -x' /var/lib/dpkg/info/grub-efi-amd64.postinst
sudo dpkg --configure -a
This might produce a lot of output. In case just paste the last page or so.
And please run this via SSH, so you can copy&paste the output, instead of needing to do a photo, with most of the output lost outside of the screen.
EDIT: Ah, you are using SSH already. In that case, instead of doing photos, you can just select the output in PuTTY, which will copy it to clipboard. No photos or screenshots needed, much better readable etc.
Thanks for the quick reply. Running the commands you specified produces very little output:
root@DietPi:~# sudo sed -i '1a\set -x' /var/lib/dpkg/info/grub-efi-amd64.postinst
root@DietPi:~# sudo dpkg --configure -a
Setting up grub-efi-amd64 (2.12-9+deb13u2) ...
+ set -e
+ cached_available_ids=
+ case "$1" in
+ . /usr/share/debconf/confmodule
++ _DEBCONF_IMPL=
++ '[' '' ']'
++ '[' -x /usr/share/debconf/frontend ']'
++ '[' '!' -h /usr/share/debconf/frontend ']'
++ _DEBCONF_IMPL=debconf
++ '[' '!' '' ']'
++ '[' debconf = cdebconf ']'
++ export PERL_DL_NONLAZY=1
++ PERL_DL_NONLAZY=1
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64.postinst configure 2.12-9
dpkg: error processing package grub-efi-amd64 (--configure):
installed grub-efi-amd64 package post-installation script subprocess returned error exit status 128
Errors were encountered while processing:
grub-efi-amd64
root@DietPi:~#
That’s the whole of it - or did I neglect to do something else (noob that I am at this
)
Okay, so not that script fails but /usr/share/debconf/confmodule which it sources for defconf config dialogs. That script re-executes the postinst with a debconf wrapper, and it seems that wrapper fails internally, without producing any output
. /usr/share/debconf/frontend is a perl script.
Please try those two things. To verify the script itself is not broken somehow:
perl -c /usr/share/debconf/frontend
Run the full wrapped postinst with debug flag:
perl -d /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64.postinst configure 2.12-9
Again, minimal output from these runs:
root@DietPi:~# perl -c /usr/share/debconf/frontend
/usr/share/debconf/frontend syntax OK
root@DietPi:~#
and:
root@DietPi:~# perl -d /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64.postinst configure 2.12-9
Can't locate perl5db.pl in @INC (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/x86_64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl).
BEGIN failed--compilation aborted.
root@DietPi:~#
Thanks for helping chase the ghosts
.
Ah, when using the debug flag -d, additional perl modules are needed. Um … but we cannot install them until grub-efi-amd64 has been configured … chicken&egg
.
Try this, but be sure to copy&paste the commands, so that the first sed with line breaks is preserved correctly. Works fine here with PuTTY:
sed -i '1a\END {\
warn "END: \\$?=$?\\n";\
}\
$SIG{__DIE__} = sub {\
require Carp;\
Carp::confess(@_);\
};' /usr/share/debconf/frontend
sed -i '/my $confmodule=make_confmodule/i\warn "before make_confmodule\\n";' /usr/share/debconf/frontend
sed -i '/$confmodule->owner/i\warn "after make_confmodule\\n";' /usr/share/debconf/frontend
sed -i '/1 while ($confmodule->communicate)/i\warn "before communicate\\n";' /usr/share/debconf/frontend
sed -i '/1 while ($confmodule->communicate)/a\warn "after communicate\\n";' /usr/share/debconf/frontend
perl /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64.postinst configure 2.12-9
This adds inline debug info, so we hopefully can narrow down where it fails.
Anyway, I think we need to skip the GRUB postinst for now, to satisfy APT, reinstall perl-base as quick fix attempt (if the issue is in a damaged perl or its base modules), otherwise install perl debugging modules.
OK - copy/ paste/ run/ result:
root@DietPi:~# sed -i '1a\END {\
warn "END: \\$?=$?\\n";\
}\
$SIG{__DIE__} = sub {\
require Carp;\
Carp::confess(@_);\
};' /usr/share/debconf/frontend
sed -i '/my $confmodule=make_confmodule/i\warn "before make_confmodule\\n";' /usr/share/debconf/frontend
sed -i '/$confmodule->owner/i\warn "after make_confmodule\\n";' /usr/share/debconf/frontend
sed -i '/1 while ($confmodule->communicate)/i\warn "before communicate\\n";' /usr/share/debconf/frontend
sed -i '/1 while ($confmodule->communicate)/a\warn "after communicate\\n";' /usr/share/debconf/frontend
perl /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64.postinst configure 2.12-9
debconf: before make_confmodule
debconf: after make_confmodule
debconf: before communicate
debconf: after communicate
END: $?=128
root@DietPi:~#
Does this reveal anything new ?
As for your next step… how do I reinstall perl-base ?
Imagine a chimpanzee playing with a book of matches… Thanks 