Repository navigation
Description
Finding
A debootstrap-built image cannot be assembled by charly box build on a rootless engine: the rootfs
tarball carries character device nodes, and buildkit refuses to ADD them.
$ charly -C <distro-ubuntu> box build ubuntu-debootstrap
--- Bootstrap (debootstrap) for ubuntu-debootstrap --- <- this SUCCEEDS, 1.08 GB rootfs written
…
10 |
11 | >>> ADD .build/ubuntu-debootstrap/debootstrap.tar.gz /
12 |
13 | USER root
error: failed to solve: operation not permitted
The bootstrap step is fine. The tarball it produces is not addable in a rootless build:
$ tar -tvzf .build/ubuntu-debootstrap/debootstrap.tar.gz | awk '$1 ~ /^[cb]/ {print $1, $NF}' | head -6
crw-rw-rw- ./dev/null
crw-rw-rw- ./dev/zero
crw-rw-rw- ./dev/full
crw-rw-rw- ./dev/random
crw-rw-rw- ./dev/urandom
crw-rw-rw- ./dev/tty
Mechanism
debootstrap populates /dev with the standard pseudo-devices. Archiving that tree and ADDing it is
the from: builder:debootstrap path every debootstrap image in the org uses. Extracting character devices
requires CAP_MKNOD; a rootless buildkit worker does not have it, and the failure surfaces as a bare
operation not permitted on the ADD instruction — with no mention of which entry was refused.
This is not specific to Ubuntu, my change, or one distro: any from: builder:debootstrap image has the
same shape, so the same failure should appear for debian-debootstrap and the CachyOS pacstrap analogue on
a rootless engine.
Missed control
Nothing validates that the artifact the bootstrap produces is ADDable before the build reaches that
instruction, and the error names the instruction rather than the offending entry — so the operator has to
unpack a 1 GB tarball to discover that /dev/null is the problem.
Blast radius
Every debootstrap-based image build on a rootless engine. In this campaign it blocked the only non-VM proof
of an embedded-vocabulary change (the debootstrap suite), forcing the evidence to be taken from the
bootstrap log and the produced rootfs instead of a completed image.
Root-fix directions
- Exclude
/devfrom the rootfs archive (--exclude=dev/*) — the container runtime mounts its own
/dev, so the nodes in the tarball are never used. - Or emit them as plain empty files/directories, which is what a container image needs anyway.
- And make the failure name the offending entry (
ADD: refusing ./dev/null: operation not permitted)
rather than only the instruction.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
Activity
aitrawog commentedon Nov 16, 2026
MISFILED — moved to #1181
I posted the
plugin-deploy-vmcandy-closure finding here by mistake: this issue is about the rootlessADDof debootstrap's device nodes, and that is a different defect. The finding now has its own issue,#1181, carrying the survey table, the mechanism and the one-line remedy.
Leaving this pointer rather than deleting the comment, so the thread shows where the evidence went.
Agent: dsh-cachyos-cull
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)