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


Groups > linux.debian.kernel > #84721 > unrolled thread

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

Started byMarc Lehmann <debian-reportbug@plan9.de>
First post2024-12-03 14:40 +0100
Last post2025-03-02 22:30 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.debian.kernel


Contents

  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
    Bug#1088959: initramfs-tools: copy_exec copies file as symlink to the wrong binary instead Ben Hutchings <ben@decadent.org.uk> - 2025-03-02 15:30 +0100
    Processed: Re: initramfs-tools: copy_exec copies file as symlink  to the wrong binary instead "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-03-02 15:30 +0100
    Bug#1088959: marked as done (initramfs-tools: copy_exec copies  file as symlink to the wrong binary instead) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-03-02 22:30 +0100

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

FromMarc Lehmann <debian-reportbug@plan9.de>
Date2024-12-03 14:40 +0100
SubjectBug#1088959: initramfs-tools: copy_exec copies file as symlink to the wrong binary instead
Message-ID<JPBi9-dsAZ-1@gated-at.bofh.it>
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".

[toc] | [next] | [standalone]


#86281

FromBen Hutchings <ben@decadent.org.uk>
Date2025-03-02 15:30 +0100
Message-ID<KlSul-35m3-1@gated-at.bofh.it>
In reply to#84721

[Multipart message — attachments visible in raw view] — view raw

Control: tag -1 patch pending

This is fixed by
<https://salsa.debian.org/kernel-team/initramfs-tools/-/commit/d5c24307ad032932ccb42929ca739c9d76745be7>.

I will need to backport that to bookworm later.

Ben.

-- 
Ben Hutchings
Any smoothly functioning technology is indistinguishable
from a rigged demo.

[toc] | [prev] | [next] | [standalone]


#86283 — Processed: Re: initramfs-tools: copy_exec copies file as symlink to the wrong binary instead

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2025-03-02 15:30 +0100
SubjectProcessed: Re: initramfs-tools: copy_exec copies file as symlink to the wrong binary instead
Message-ID<KlSul-35m3-11@gated-at.bofh.it>
In reply to#84721
Processing control commands:

> tag -1 patch pending
Bug #1088959 [initramfs-tools] initramfs-tools: copy_exec copies file as symlink to the wrong binary instead
Added tag(s) pending and patch.

-- 
1088959: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1088959
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#86317 — Bug#1088959: marked as done (initramfs-tools: copy_exec copies file as symlink to the wrong binary instead)

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2025-03-02 22:30 +0100
SubjectBug#1088959: marked as done (initramfs-tools: copy_exec copies file as symlink to the wrong binary instead)
Message-ID<KlZ2N-39tJ-9@gated-at.bofh.it>
In reply to#84721

[Multipart message — attachments visible in raw view] — view raw

Your message dated Sun, 02 Mar 2025 21:18:17 +0000
with message-id <E1toqhV-00BAAs-Gd@fasolo.debian.org>
and subject line Bug#1088959: fixed in initramfs-tools 0.146
has caused the Debian Bug report #1088959,
regarding initramfs-tools: copy_exec copies file as symlink to the wrong binary instead
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1088959: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1088959
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web