I have added "set -x" just under "set -e" in the script. Here are the following results:
kcrpl@raspberrypi-4-kcrpl:/usr/share/initramfs-tools/hooks$ sudo update-initramfs -u + sudo update-initramfs -u update-initramfs: Generating /boot/initrd.img-6.5.0-1005-raspi + PREREQ= + prereqs + echo + exit 0 + PREREQ= + . /usr/share/initramfs-tools/hook-functions + [ -x /usr/sbin/dhcpcd ] + copy_exec /usr/sbin/dhcpcd + local src target x nonoptlib ret + src=/usr/sbin/dhcpcd + target=/usr/sbin/dhcpcd + copy_file binary /usr/sbin/dhcpcd /usr/sbin/dhcpcd + local type src target link_target + type=binary + src=/usr/sbin/dhcpcd + target=/usr/sbin/dhcpcd + [ -f /usr/sbin/dhcpcd ] + [ -d /var/tmp/mkinitramfs_FoHhvu//usr/sbin/dhcpcd ] + [ -e /var/tmp/mkinitramfs_FoHhvu//usr/sbin/dhcpcd ] + mkdir -p /var/tmp/mkinitramfs_FoHhvu//usr/sbin + [ -h /usr/sbin/dhcpcd ] + [ n = y ] + cp -pP /usr/sbin/dhcpcd /var/tmp/mkinitramfs_FoHhvu//usr/sbin/dhcpcd + env --unset=LD_PRELOAD ldd /usr/sbin/dhcpcd + sed -e /\//!d; /linux-gate/d; /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/ + echo /lib/aarch64-linux-gnu/libcrypto.so.3 + sed -e s#/lib/\([^/]*/\)\?\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#/lib/\1\3# + nonoptlib=/lib/aarch64-linux-gnu/libcrypto.so.3 + echo /lib/aarch64-linux-gnu/libcrypto.so.3 + sed -e s#-linux-gnu/\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#-linux-gnu/\2# + nonoptlib=/lib/aarch64-linux-gnu/libcrypto.so.3 + [ -e /lib/aarch64-linux-gnu/libcrypto.so.3 ] + x=/lib/aarch64-linux-gnu/libcrypto.so.3 + copy_file binary /lib/aarch64-linux-gnu/libcrypto.so.3 + local type src target link_target + type=binary + src=/lib/aarch64-linux-gnu/libcrypto.so.3 + target=/lib/aarch64-linux-gnu/libcrypto.so.3 + [ -f /lib/aarch64-linux-gnu/libcrypto.so.3 ] + [ -d /var/tmp/mkinitramfs_FoHhvu//lib/aarch64-linux-gnu/libcrypto.so.3 ] + target=/usr/lib/aarch64-linux-gnu/libcrypto.so.3 + [ -e /var/tmp/mkinitramfs_FoHhvu//usr/lib/aarch64-linux-gnu/libcrypto.so.3 ] + return 1 + ret=1 + [ 1 = 1 ] + echo /lib/aarch64-linux-gnu/libc.so.6 + sed -e s#/lib/\([^/]*/\)\?\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#/lib/\1\3# + nonoptlib=/lib/aarch64-linux-gnu/libc.so.6 + echo /lib/aarch64-linux-gnu/libc.so.6 + sed -e s#-linux-gnu/\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#-linux-gnu/\2# + nonoptlib=/lib/aarch64-linux-gnu/libc.so.6 + [ -e /lib/aarch64-linux-gnu/libc.so.6 ] + x=/lib/aarch64-linux-gnu/libc.so.6 + copy_file binary /lib/aarch64-linux-gnu/libc.so.6 + local type src target link_target + type=binary + src=/lib/aarch64-linux-gnu/libc.so.6 + target=/lib/aarch64-linux-gnu/libc.so.6 + [ -f /lib/aarch64-linux-gnu/libc.so.6 ] + [ -d /var/tmp/mkinitramfs_FoHhvu//lib/aarch64-linux-gnu/libc.so.6 ] + target=/usr/lib/aarch64-linux-gnu/libc.so.6 + [ -e /var/tmp/mkinitramfs_FoHhvu//usr/lib/aarch64-linux-gnu/libc.so.6 ] + return 1 + ret=1 + [ 1 = 1 ] + echo /lib/ld-linux-aarch64.so.1 + sed -e s#/lib/\([^/]*/\)\?\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#/lib/\1\3# + nonoptlib=/lib/ld-linux-aarch64.so.1 + echo /lib/ld-linux-aarch64.so.1 + sed -e s#-linux-gnu/\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#-linux-gnu/\2# + nonoptlib=/lib/ld-linux-aarch64.so.1 + [ -e /lib/ld-linux-aarch64.so.1 ] + x=/lib/ld-linux-aarch64.so.1 + copy_file binary /lib/ld-linux-aarch64.so.1 + local type src target link_target + type=binary + src=/lib/ld-linux-aarch64.so.1 + target=/lib/ld-linux-aarch64.so.1 + [ -f /lib/ld-linux-aarch64.so.1 ] + [ -d /var/tmp/mkinitramfs_FoHhvu//lib/ld-linux-aarch64.so.1 ] + target=/usr/lib/ld-linux-aarch64.so.1 + [ -e /var/tmp/mkinitramfs_FoHhvu//usr/lib/ld-linux-aarch64.so.1 ] + return 1 + ret=1 + [ 1 = 1 ] + copy_exec /usr/lib/dhcpcd/dhcpcd-run-hooks + local src target x nonoptlib ret + src=/usr/lib/dhcpcd/dhcpcd-run-hooks + target=/usr/lib/dhcpcd/dhcpcd-run-hooks + copy_file binary /usr/lib/dhcpcd/dhcpcd-run-hooks /usr/lib/dhcpcd/dhcpcd-run-hooks + local type src target link_target + type=binary + src=/usr/lib/dhcpcd/dhcpcd-run-hooks + target=/usr/lib/dhcpcd/dhcpcd-run-hooks + [ -f /usr/lib/dhcpcd/dhcpcd-run-hooks ] + return 2 + return 1 E: /usr/share/initramfs-tools/hooks/dhcpcd failed with return 1. update-initramfs: failed for /boot/initrd.img-6.5.0-1005-raspi with 1. kcrpl@raspberrypi-4-kcrpl:/usr/share/initramfs-tools/hooks$ Just some additional info. For some reason after upgrading to 22.10 dhcpcd cannot start however DHCP still seems to work. Attaching output from systemctl status below: kcrpl@raspberrypi-4-kcrpl:~$ sudo systemctl status dhcpcd [sudo] password for kcrpl: × dhcpcd.service - DHCP Client Daemon on all interfaces Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Sat 2023-10-14 18:30:37 CEST; 1 day 17h ago Docs: man:dhcpcd(8) CPU: 166ms Oct 14 18:30:36 raspberrypi-4-kcrpl systemd[1]: Starting dhcpcd.service - DHCP Client Daemon on all int> Oct 14 18:30:37 raspberrypi-4-kcrpl dhcpcd[907]: dhcpcd-10.0.2 starting Oct 14 18:30:37 raspberrypi-4-kcrpl dhcpcd[907]: dhcpcd_fork_cb: truncated read 0 (expected 4) Oct 14 18:30:37 raspberrypi-4-kcrpl systemd[1]: dhcpcd.service: Control process exited, code=exited, st> Oct 14 18:30:37 raspberrypi-4-kcrpl systemd[1]: dhcpcd.service: Failed with result 'exit-code'. Oct 14 18:30:37 raspberrypi-4-kcrpl systemd[1]: Failed to start dhcpcd.service - DHCP Client Daemon on > lines 1-12/12 (END) Thank you for your time. -- 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/2039342 Title: package linux-image-6.5.0-1005-raspi 6.5.0-1005.7 failed to install/upgrade: run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Status in initramfs-tools package in Ubuntu: Incomplete Bug description: This happened during the upgrade. ProblemType: Package DistroRelease: Ubuntu 23.10 Package: linux-image-6.5.0-1005-raspi 6.5.0-1005.7 ProcVersionSignature: Ubuntu 6.2.0-1014.16-raspi 6.2.16 Uname: Linux 6.2.0-1014-raspi aarch64 ApportVersion: 2.27.0-0ubuntu5 Architecture: arm64 CasperMD5CheckResult: unknown CloudArchitecture: aarch64 CloudBuildName: server CloudID: nocloud CloudName: unknown CloudPlatform: nocloud CloudSerial: CloudSubPlatform: config-disk (/dev/sdb1) Date: Sat Oct 14 09:07:02 2023 ErrorMessage: run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 ImageMediaBuild: 20210201.1 Python3Details: /usr/bin/python3.11, Python 3.11.6, python3-minimal, 3.11.4-5 PythonDetails: N/A RebootRequiredPkgs: Error: path contained symlinks. RelatedPackageVersions: dpkg 1.22.0ubuntu1 apt 2.7.3 SourcePackage: initramfs-tools Title: package linux-image-6.5.0-1005-raspi 6.5.0-1005.7 failed to install/upgrade: run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 UpgradeStatus: Upgraded to mantic on 2023-10-14 (0 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2039342/+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