During `sudo apt-get update` && `sudo apt-get upgrade` the command ended
with:

$ sudo apt-get upgrade
...
Processing triggers for linux-image-6.8.0-54-generic (6.8.0-54.56) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.8.0-54-generic
E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.8.0-54-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.8.0-54-generic (--configure):
 installed linux-image-6.8.0-54-generic package post-installation script 
subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-52-generic
E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.8.0-52-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:
 linux-image-6.8.0-54-generic
 initramfs-tools
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

... then I tried to reconfigure ...

$ sudo dpkg --configure -a
Setting up initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.8.0-54-generic (6.8.0-54.56) ...
Processing triggers for initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-52-generic
E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.8.0-52-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1
Processing triggers for linux-image-6.8.0-54-generic (6.8.0-54.56) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.8.0-54-generic
E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.8.0-54-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.8.0-54-generic (--configure):
 installed linux-image-6.8.0-54-generic package post-installation script 
subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-6.8.0-54-generic

... then I tried to force install ...

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.8.0-54-generic (6.8.0-54.56) ...
Processing triggers for initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-52-generic
E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.8.0-52-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1
Processing triggers for linux-image-6.8.0-54-generic (6.8.0-54.56) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.8.0-54-generic
E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.8.0-54-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.8.0-54-generic (--configure):
 installed linux-image-6.8.0-54-generic package post-installation script 
subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-6.8.0-54-generic
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

... then tried to deactivate the btrfs hook by ...

$ sudo mv /usr/share/initramfs-tools/hooks/btrfs /usr/share/initramfs-
tools/hooks/btrfs.disabled

... reconfigure ...

$ sudo dpkg --configure -a
Setting up initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.8.0-54-generic (6.8.0-54.56) ...
Processing triggers for initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-52-generic
E: /usr/share/initramfs-tools/hooks/btrfs.disabled failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.8.0-52-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1
Processing triggers for linux-image-6.8.0-54-generic (6.8.0-54.56) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.8.0-54-generic
E: /usr/share/initramfs-tools/hooks/btrfs.disabled failed with return 1.
update-initramfs: failed for /boot/initrd.img-6.8.0-54-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.8.0-54-generic (--configure):
 installed linux-image-6.8.0-54-generic package post-installation script 
subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-6.8.0-54-generic

... checked the hooks folder ...

$ ls /usr/share/initramfs-tools/hooks/
bcache                       cryptgnupg     cryptroot         framebuffer  
klibc-utils  overlayroot  thin-provisioning-tools
btrfs.disabled               cryptgnupg-sc  cryptroot-unlock  fsck         kmod 
        plymouth     udev
cloud-initramfs-dyn-netconf  cryptkeyctl    dhcpcd            fuse         lvm2 
        resume       xfs
console_setup                cryptopensc    dmsetup           iscsi        
mdadm        sg3-utils    zz-busybox-initramfs
copymods                     cryptpassdev   fixrtc            kbd          
ntfs_3g      thermal

... listing /etc/initramfs-tools/ ...

$ ls -l /etc/initramfs-tools/
total 24
drwxr-xr-x  2 root root 4096 May 10  2024 conf.d
drwxr-xr-x  2 root root 4096 May 10  2024 hooks
-rw-r--r--  1 root root 1502 Jul 31  2023 initramfs.conf
-rw-r--r--  1 root root  246 May 30  2024 modules
drwxr-xr-x 12 root root 4096 May 30  2024 scripts
-rw-r--r--  1 root root  378 Jun 12  2017 update-initramfs.conf

... and listing /usr/share/initramfs-tools/conf.d/ ...

$ ls -l /usr/share/initramfs-tools/conf.d/
total 0

... again updating ...

$ sudo apt-get update
sudo apt-get install --reinstall initramfs-tools
Hit:1 https://download.docker.com/linux/ubuntu noble InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu noble InRelease
Hit:3 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease
Hit:4 http://mirrors.digitalocean.com/ubuntu noble-updates InRelease
Hit:5 http://mirrors.digitalocean.com/ubuntu noble-backports InRelease
Hit:6 http://security.ubuntu.com/ubuntu noble-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for initramfs-tools:amd64

... cleaned ...

$ sudo apt-get clean

... updating again this time with success...

$ sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:2 https://download.docker.com/linux/ubuntu noble InRelease
Hit:3 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease
Hit:4 http://mirrors.digitalocean.com/ubuntu noble InRelease
Hit:5 http://mirrors.digitalocean.com/ubuntu noble-updates InRelease
Hit:6 http://mirrors.digitalocean.com/ubuntu noble-backports InRelease
Reading package lists... Done

... but then ...

$ sudo apt-get install --reinstall initramfs-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for initramfs-tools:amd64

... tried harder all with following commands -> ran successful...

$ sudo rm -rf /var/lib/apt/lists/*
$ sudo rm -rf /var/cache/apt/archives/*
$ sudo apt-get clean
$ sudo apt-get update --fix-missing

... but reinstalling initramfs-tools failed with ...

$ sudo apt-get install --reinstall initramfs-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for initramfs-tools:amd64

That's it. initramfs-tools failed to install in the end and led to an
error trying to upgrade.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/2101799

Title:
  initramfs-tools in noble repo misses hooks

Status in initramfs-tools package in Ubuntu:
  Incomplete

Bug description:
  initramfs-tools package in noble repository is defective and does not
  contain /usr/share/initramfs-tools/hooks directory. This prevents
  proper installation and configuration of initramfs-tools.

  $ lsb_release -rd
  No LSB modules are available.
  Description:  Ubuntu 24.04.2 LTS
  Release:      24.04

  $ apt-cache policy initramfs-tools
  initramfs-tools:
    Installed: 0.142ubuntu25.5
    Candidate: 0.142ubuntu25.5
    Version table:
   *** 0.142ubuntu25.5 500
          500 http://mirrors.digitalocean.com/ubuntu noble-updates/main amd64 
Packages
          100 /var/lib/dpkg/status
       0.142ubuntu25 500
          500 http://mirrors.digitalocean.com/ubuntu noble/main amd64 Packages

  Expectation to have a hooks directory:

  $ apt-get download initramfs-tools
  $ dpkg-deb -x ./initramfs-tools_*.deb temp_extract_dir
  $ ls temp_extract_dir/usr/share/
  bash-completion  bug  doc  lintian  man

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


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to