I made the changes and ran it:

mhb@ubuntu-s-2vcpu-4gb-fra1-01:~$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-6.8.0-52-generic
+ set -e
+ PREREQ=
+ prereqs
+ echo
+ exit 0
+ set -e
+ PREREQ=
+ . /usr/share/initramfs-tools/hook-functions
+ [ -x /bin/btrfs ]
+ echo DEBUG: btrfs hook: before copy_exec /bin/btrfs
DEBUG: btrfs hook: before copy_exec /bin/btrfs
+ copy_exec /bin/btrfs /bin
+ local src target x nonoptlib ret
+ src=/bin/btrfs
+ target=/bin
+ copy_file binary /bin/btrfs /bin
+ local type src target link_target
+ type=binary
+ src=/bin/btrfs
+ target=/bin
+ [ -f /bin/btrfs ]
+ [ -d /var/tmp/mkinitramfs_wp82Rs//bin ]
+ target=/bin/btrfs
+ target=/usr/bin/btrfs
+ [ -e /var/tmp/mkinitramfs_wp82Rs//usr/bin/btrfs ]
+ mkdir -p /var/tmp/mkinitramfs_wp82Rs//usr/bin
+ [ -h /bin/btrfs ]
+ [ n = y ]
+ cp -pP /bin/btrfs /var/tmp/mkinitramfs_wp82Rs//usr/bin/btrfs
+ env --unset=LD_PRELOAD ldd /bin/btrfs
+ grep -P+  ^\t
sed -e
                /\//!d;
                /linux-gate/d;
                /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};
                s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/
+ echo /lib/libgcwrap.so
+ sed -e 
s#/lib/\([^/]*/\)\?\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#/lib/\1\3#
+ nonoptlib=/lib/libgcwrap.so
+ echo /lib/libgcwrap.so
+ sed -e s#-linux-gnu/\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#-linux-gnu/\2#
+ nonoptlib=/lib/libgcwrap.so
+ [ -e /lib/libgcwrap.so ]
+ copy_file binary /lib/libgcwrap.so
+ local type src target link_target
+ type=binary
+ src=/lib/libgcwrap.so
+ target=/lib/libgcwrap.so
+ [ -f /lib/libgcwrap.so ]
+ return 2
+ ret=2
+ [ 2 = 1 ]
+ return 1
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.

Additional Information that might be useful:

$ lsblk -f
NAME    FSTYPE  FSVER LABEL           UUID                                 
FSAVAIL FSUSE% MOUNTPOINTS
sda     ext4    1.0                   ac8e0d71-6f90-476f-bb81-e1c95b18fb8a     
94G     0% /mnt/volume_fra1_01
vda
├─vda1  ext4    1.0   cloudimg-rootfs c18ea9eb-c788-4a18-a5df-36956466d626   
54.3G    29% /
├─vda14
├─vda15 vfat    FAT32 UEFI            AAE6-4710                              
98.2M     6% /boot/efi
└─vda16 ext4    1.0   BOOT            235bdd10-5a6b-41dc-88c0-01534ab602f9    
711M    12% /boot
vdb     iso9660       config-2        2025-03-10-14-58-54-00

And I want to mention that modifying the btrfs hook to exit early when
/bin/btrfs is not found resolves the dpkg --configure -a error. So the
issue is related to the btrfs hook execution under specific conditions.

$ dpkg -s initramfs-tools
Package: initramfs-tools
Status: install ok half-configured
Priority: optional
Section: utils
Installed-Size: 68
Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
Architecture: all
Multi-Arch: foreign
Version: 0.142ubuntu25.5
Config-Version: 0.142ubuntu25.4
Provides: linux-initramfs-tool
Depends: initramfs-tools-core (= 0.142ubuntu25.5), linux-base
Suggests: bash-completion
Breaks: e2fsprogs (<< 1.42.13), initscripts (<< 2.88dsf-59.3~), netplan.io (<< 
0.37), upstart
Conflicts: linux-initramfs-tool, usplash (<< 0.5.50)
Conffiles:
 /etc/initramfs-tools/update-initramfs.conf e2026d4603e7161efaccca519aeb1297
 /etc/kernel/postinst.d/initramfs-tools c1cb0e052a2cdeef4f3257585c83c58d
 /etc/kernel/postrm.d/initramfs-tools e7471d253a5b24e2fd85b40be4e43218
Description: generic modular initramfs generator (automation)
 This package builds a bootable initramfs for Linux kernel packages.  The
 initramfs is loaded along with the kernel and is responsible for
 mounting the root filesystem and starting the main init system.
Original-Maintainer: Debian kernel team <debian-ker...@lists.debian.org>

I hope that helps.

Thank you!

-- 
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