Distrobox lets you run any Linux distribution as a container and integrate it into your host system. But if your host is Void Linux, getting a systemd-based box like Arch to boot correctly takes a bit of extra work.
The problem
Void uses runit as its init system, not systemd. When you create a distrobox with --init and ask for a systemd container, it will hang forever printing:
waiting for systemd to come up... waiting for systemd to come up... waiting for systemd to come up...
Even after fixing the cgroup setup (which also requires attention on a non-systemd host), systemd inside the container will fail on several units that try to mount kernel filesystems — things like binfmt_misc, hugepages, and sys-kernel-debug. These units make no sense inside a container and will block the boot sequence.
The fix
The solution is to mask those units at creation time, before systemd ever tries to start them. The --init-hooks flag runs a shell command during container setup, so we can pre-create the /dev/null symlinks that systemctl mask would normally create:
distrobox create -i archlinux -n abox -H ~/home-abox --init --additional-packages "systemd" --additional-flags "--privileged" --init-hooks "mkdir -p /etc/systemd/system && for u in proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.mount sys-kernel-debug.mount sys-kernel-tracing.mount dev-hugepages.mount systemd-firstboot.service systemd-udevd.service; do ln -sf /dev/null /etc/systemd/system/\$u; done"
The --privileged flag gives systemd the capabilities it needs to manage its own cgroup namespace. The hook symlinks all the container-hostile units to /dev/null, which is exactly what masking does — just without needing systemctl to be running yet.
systemctl mask may not work reliably. Writing symlinks directly achieves the same result and works unconditionally.Result
After running this command, distrobox enter abox will boot straight through into a fully working Arch Linux shell with a live systemd instance — on a Void Linux host running runit.