Thanks for taking the time to report this bug and trying to make Ubuntu
better.
This seems to be a bug indeed. From the upgrade logs we can see:
/etc/kernel/postinst.d/x-grub-legacy-ec2:
Searching for GRUB installation directory ... found: /boot/grub
/usr/sbin/update-grub-legacy-ec2: line 494: tempfile: command not found
run-parts: /etc/kernel/postinst.d/x-grub-legacy-ec2 exited with return code 127
dpkg: error processing package linux-image-5.13.0-19-generic (--configure):
installed linux-image-5.13.0-19-generic package post-installation script
subprocess returned error exit status 1
The important part here is the "tempfile: command not found". The
tempfile command was removed from debianutils package in version 5.0,
and during the do-release-upgrade run it was upgraded from version 4.9.1
(Focal) to version 5.5-1 (Jammy). The debianutils package was upgraded
before linux-image-5.13.0-19-generic:5.13.0-19.19 and then when the
linux-image postinst triggered the execution of /usr/sbin/update-grub-
legacy-ec2 you got the crash because this script still relies on the
tempfile command.
In order to do not break upgrades from Focal to Jammy we need to make
the update-grub-legacy-ec2 script in src:grub-legacy-ec2 use likely
"mktemp" instead of "tempfile". A bonus point would be to avoid using
the "which" command (probably use "command -v") since it was already
deprecated in debianutils version 5.0 and should be removed in the
future.
** Changed in: grub-legacy-ec2 (Ubuntu)
Status: New => Triaged
** Tags added: server-next
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1951779
Title:
package linux-image-5.13.0-19-generic 5.13.0-19.19 failed to
install/upgrade: run-parts: /etc/kernel/postinst.d/x-grub-legacy-ec2
exited with return code 127
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub-legacy-ec2/+bug/1951779/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs