On 2026-10-08, Robert Heller wrote:
> And typically it is build as a *static* executable, with no shared library
> dependices, which makes it useful as the "shell" used in init ramdisk images
Perhaps you check busybox-static. For busybox it is only almost static :)
I have:
# dpkg -l busybox busybox-static
[...]
ii busybox 1:1.37.0-6+b9 amd64 Tiny utilities for small and
embedded systems
un busybox-static <none> <none> (no description available)
# file /usr/bin/busybox
/usr/bin/busybox: ELF 64-bit LSB pie executable, [...]
# ldd /usr/bin/busybox
linux-vdso.so.1 (0x00007f29ab199000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2
(0x00007f29ab095000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f29aaea1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f29ab19b000)
But as you said it is useful in initrd due to its small size and number
of libraries:
# ls -l /usr/bin/busybox
-rwxr-xr-x 1 root root 826128 12 juil. 19:12 /usr/bin/busybox