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

Obviously, initrd images require a different binary to function properly.
Currently such binary is not available in the deb package...

Also, the one from installer's nbd-client udeb package, doesn't work either
(it is missing libnl-genl-3).

Personally, I resolved the problem by building a custom version of the nbd-
client
from sources, with possibly minimal dependencies:
# ldd nbd-client
        linux-gate.so.1 (0xb7f60000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7d54000)
        /lib/ld-linux.so.2 (0xb7f62000)

and changing the initramfs hook to use it.

Reply via email to