After some LLM interaction, I found that the package was being diverted, 
causing dpkg to become unable to upgrade the update-initramfs script. It's 
probably on me for running some script in the past that might've caused this 
issue but again I'm not sure which one.
```
$ dpkg -S /usr/sbin/update-initramfs
local diversion from: /usr/sbin/update-initramfs
local diversion to: /usr/sbin/update-initramfs.distrib
initramfs-tools: /usr/sbin/update-initramfs

$ dpkg -L initramfs-tools | grep update-initramfs
/etc/initramfs-tools/update-initramfs.conf
/usr/sbin/update-initramfs
locally diverted to: /usr/sbin/update-initramfs.distrib
/usr/share/bash-completion/completions/update-initramfs
/usr/share/man/man5/update-initramfs.conf.5.gz
/usr/share/man/man8/update-initramfs.8.gz
```

The following commands removed the diversion and I was able to upgrade the 
script normally.
```
sudo dpkg-divert --remove --rename /usr/sbin/update-initramfs
```

** Changed in: initramfs-tools (Ubuntu)
       Status: Incomplete => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2133723

Title:
  package initramfs-tools 0.147ubuntu1 failed to install/upgrade:
  installed initramfs-tools package post-installation script subprocess
  returned error exit status 2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2133723/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to