Not sure if the original reporter had the exact same problem as me, but
I can add some analysis and confirm the conclusion "overlayroot
actually depends on busybox"


Note: My case, as well as the original report refers to bookworm,
however I see no changes in either klibc, overlayroot or the Debian
dependencies that would prevent the exact same problem from happening
on trixie.


In my case

- debootstrap bookworm
- apt install --no-install-recommends grub-pc overlayroot linux-image-amd64
- in /etc/overlayroot.local.conf set overlayroot_cfgdisk=/dev/xvdb
- in [/dev/xvdb]/overlayroot.conf set overlayroot=/dev/xvdb

the system booted, but overlayroot did not activate.

I eventually traced the failure down to line 474 of
/usr/share/initramfs-tools/scripts/init-bottom/overlayroot
where trying to mount the cfgdisk using

| mount -o ro "$cfgdev" "$mp" 

fails with the error message

| mount [-r] [-w] [-o options] [-t type] [-f] [-i] [-n] device directory


This error message comes from klibc's mount command.
klibc's utils get included in the initramfs as a fallback if busybox is
NOT installed (which is the case with the above setup).

The error message is a bit misleading: The actual cause of the error is
that the overlayroot script does not pass the filesystem type to the
mount command via the -t option.

klibc's mount implementation _requires_ the caller to specify the
filesystem type. (I reported the misleading error message as
https://lists.zytor.com/archives/klibc/2025-December/004856.html )

In this respect klibc's mount differs from busybox, where -t is
optional and busybox will iterate through the supported filesystems
until one works.

In the overlayroot script, mounting of the backing device in line 764
also calls mount without the -t option. This is where the non-cfgdisk
case would fail with klibc.


The conclusion is that overlayroot can not work with klibc's mount
implementation.

In other words: overlayroot needs busybox to work and therefore
should declare it as dependency.


Just like the original reporter, I can confirm that after installing
busybox, rebuilding the initramfs and rebooting, the overlayroot worked.

Reply via email to