3

I have a Ubuntu 22.04 VM with CloudInit on a Proxmox Host which worked well, but recently I got often the issue after some time (some days, even after reinstalling) that I can't upgrade packages due to an initramfs error.

apt upgrade

Output:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  gsasl-common libgsasl7 ruby-rack
Learn more about Ubuntu Pro at https://ubuntu.com/pro
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up initramfs-tools (0.140ubuntu13.4) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.140ubuntu13.4) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-86-generic
E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.15.0-86-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

I searched on the internet but I couldn't find a valid solution. On a recent host I tried a solution to remove the permissions from the hooks (btrfs,...) with chmod -x /usr/share/initramfs-tools/hooks/btrfs, which fixes the initramfs command and it "compiles" correctly, but after a reboot it ends up with not finding a "boot loader" or the initramfs.

I hope someone has finally a valid stable solution. Thanks!

0 Answers0