Package: initramfs-tools Version: 0.142+deb12u1 Severity: important Dear Maintainer,
I have this line in one of my initramfs-hooks: copy_exec /sbin/losetup /sbin/losetup.util-linux Because I require the util-linux losetup. This worked fine until I recently upgraded. After the upgrade and regenerating the initrd, the system became unbootable, because the result was this, according to lsinitramfs -l: usr/sbin/losetup.util-linux -> losetup i.e. instead of copying the file, it created a symlink to a completely unrelated file, namely the losetup utility from busybox or klibc, which made the system unbootable, and, of course, quite hard to recover from with the limited utilities in the initramfs. My /usr/sbin/losetup file (merged usr) is indeed the file form util-linux, and not a symlink, which suggests that something is seriously broken in the copy_exec function. To further verify this, I adde4d a ls -l $DESTDIR/sbin/losetup.util-linux directly after the copy_exec, and indeed, it was a symlink, so copy_exec is the culprit. I removed most of the automatically-generated details in this report because I wrote it on another system, but will supply any missing details required to track this down. busybox-static is installed, and initramfs-tools's BUSYBOX is set to "y".