Control: tags -1 unreproducible thanks Hi Tomasz,
On Mon, May 22, 2023 at 09:03:12AM +0200, Tomasz Wolak wrote: > Package: nbd-client > Version: 1:3.21-1+deb11u1 > Severity: important > Tags: d-i > X-Debbugs-Cc: tomas.wo...@gmail.com > > > The nbd-client binary (/sbin/nbd-client), while working fine on the regular > system, > is not working inside initrd images (which have very limited set of > libraries). > During system startup, it is failing with: > /sbin/nbd-client: error while loading shared libraries: libgnutls.so.30: > cannot > open shared object file: No such file or directory > > Currently the nbd-client used for building initrd images is copied the > initramfs hook > /usr/share/initramfs-tools/hooks/nbd > which uses the regular /sbin/nbd-client, which has the following dependencies > (the example is for i386, but, of course, similar for others): > > # ldd /sbin/nbd-client > linux-gate.so.1 (0xb7f3f000) > libgnutls.so.30 => /lib/i386-linux-gnu/libgnutls.so.30 (0xb7cf5000) > libnl-genl-3.so.200 => /lib/i386-linux-gnu/libnl-genl-3.so.200 > (0xb7cec000) > libnl-3.so.200 => /lib/i386-linux-gnu/libnl-3.so.200 (0xb7cc7000) > libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7adf000) > libp11-kit.so.0 => /lib/i386-linux-gnu/libp11-kit.so.0 (0xb798a000) > libidn2.so.0 => /lib/i386-linux-gnu/libidn2.so.0 (0xb7968000) > libunistring.so.2 => /lib/i386-linux-gnu/libunistring.so.2 > (0xb77e6000) > libtasn1.so.6 => /lib/i386-linux-gnu/libtasn1.so.6 (0xb77cf000) > libnettle.so.8 => /lib/i386-linux-gnu/libnettle.so.8 (0xb7784000) > libhogweed.so.6 => /lib/i386-linux-gnu/libhogweed.so.6 (0xb773b000) > libgmp.so.10 => /lib/i386-linux-gnu/libgmp.so.10 (0xb76ab000) > libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7689000) > /lib/ld-linux.so.2 (0xb7f41000) > libffi.so.7 => /lib/i386-linux-gnu/libffi.so.7 (0xb767f000) > libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7679000) > > which, as one can expect, are not met inside an initrd... So, actually, this bit is not true. /usr/share/initramfs-tools/hooks/nbd looks like this: -----8<----- #!/bin/sh # We don't have any prerequirements case $1 in prereqs) exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions manual_add_modules nbd auto_add_modules net copy_exec /sbin/nbd-client /sbin ----->8----- The "copy_exec" in there is a shell function, defined in the /usr/share/initramfs-tools/hook-functions library, which copies a program *and all the libraries it requires* into the initramfs. I checked, and on my system the initramfs does in fact contain all the necessary libraries. You can check yourself; for instance, to check libnettle you would do: wouter@pc220518:~/scratch$ lsinitramfs /boot/initrd.img-$(uname -r)|grep libnettle usr/lib/x86_64-linux-gnu/libnettle.so.8 usr/lib/x86_64-linux-gnu/libnettle.so.8.6 or for gnutls: wouter@pc220518:~/scratch$ lsinitramfs /boot/initrd.img-$(uname -r)|grep gnutls usr/lib/x86_64-linux-gnu/libgnutls.so.30 usr/lib/x86_64-linux-gnu/libgnutls.so.30.34.3 If this doesn't work for you for some reason, then either you have misconfigured initramfs-tools or something else is going on -- but at any rate it is not a problem in nbd-client. I'm leaving this open for the time being in case I missed something; but unless you can show me that something is going wrong in the nbd-client package, I'm going to close this bug a few weeks from now. Thanks, -- w@uter.{be,co.za} wouter@{grep.be,fosdem.org,debian.org} I will have a Tin-Actinium-Potassium mixture, thanks.