#1135987 busybox: please provide busybox-initrd

Package:
busybox
Source:
busybox
Description:
Tiny utilities for small and embedded systems
Submitter:
Benjamin Drung
Date:
2026-05-14 17:47:02 UTC
Severity:
normal
#1135987#5
Date:
2026-05-08 09:23:15 UTC
From:
To:
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.

#1135987#10
Date:
2026-05-14 08:24:44 UTC
From:
To:
08.05.2026 12:23, Benjamin Drung wrote:

What's missing in the regular busybox build for this purpose for you?

Thanks,

/mjt

#1135987#15
Date:
2026-05-14 08:24:44 UTC
From:
To:
08.05.2026 12:23, Benjamin Drung wrote:

What's missing in the regular busybox build for this purpose for you?

Thanks,

/mjt

#1135987#20
Date:
2026-05-14 15:05:48 UTC
From:
To:
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)

#1135987#25
Date:
2026-05-14 17:46:01 UTC
From:
To:
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: