Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1222573

Bug#1088959: initramfs-tools: copy_exec copies file as symlink to the wrong binary instead

From Marc Lehmann <debian-reportbug@plan9.de>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1088959: initramfs-tools: copy_exec copies file as symlink to the wrong binary instead
Date 2024-12-03 14:40 +0100
Message-ID <JPBi9-dsAZ-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


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

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#1088959: initramfs-tools: copy_exec copies file as symlink to the wrong binary instead Marc Lehmann <debian-reportbug@plan9.de> - 2024-12-03 14:40 +0100

csiph-web