Dear Maintainer, please provide a busybox build specificly to be used in initrds like initramfs-tools and dracut. If you are open to the idea, I can come up with the list of applets to build and a patch for it.
08.05.2026 12:23, Benjamin Drung wrote: What's missing in the regular busybox build for this purpose for you? Thanks, /mjt
08.05.2026 12:23, Benjamin Drung wrote: What's missing in the regular busybox build for this purpose for you? Thanks, /mjt
It's the opposite. The busybox binary provides more applets that are needed for the initrd use case. Ubuntu has currently a patch for busybox to build an specific binary for initramfs-tools which is much smaller: # ls -alh /usr/bin/busybox /usr/lib/initramfs-tools/bin/busybox -rwxr-xr-x 1 root root 827K Jan 14 15:50 /usr/bin/busybox -rwxr-xr-x 1 root root 323K Jan 14 15:50 /usr/lib/initramfs-tools/bin/busybox # ldd /usr/bin/busybox linux-vdso.so.1 (0x0000769a0daff000) libresolv.so.2 => /usr/lib/x86_64-linux-gnu/libresolv.so.2 (0x0000769a0da12000) libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x0000769a0d7f1000) /lib64/ld-linux-x86-64.so.2 (0x0000769a0db01000) # ldd /usr/lib/initramfs-tools/bin/busybox linux-vdso.so.1 (0x000073e539db4000) libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x000073e539b38000) /lib64/ld-linux-x86-64.so.2 (0x000073e539db6000)
If your concern is the size, I'd suggest you to address two (two!) libcs in initrd. The main system uses one libc (glibc), while initrd, which is supposed to be small, contains two - glibc and klibc. Yes, klibc is much smaller, but all functionaity of it is already provided by glibc. But the size of busybox + glibc is a tiny fraction of debian's initrd. The main size comes from modules and firmware. These are significantly larger than busybox. For comparison, here's my initrd, with busybox but not klibc: