Showing posts with label void. Show all posts
Showing posts with label void. Show all posts

Saturday, March 28, 2026

volid linux: install hplip and enable cupsd

sudo xbps-install -S hplip sudo ln -s /etc/sv/cupsd /var/service sudo sv status cupsd

Friday, March 20, 2026

void linux with docker: distrobox hangs when a container with --init and systemd is created.

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.

Why symlinks instead of systemctl? At hook execution time systemd hasn't started yet, so 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.

Posted March 2026

Tuesday, March 17, 2026

Void Linux: "/" is not a shared mount, this could cause issues or missing mounts with rootless containers

When running distrobox with podman:
"/" is not a shared mount, this could cause issues or missing mounts with rootless containers Just add mount --make-rshared / to your /etc/rc.local

Void Linux, podman and distrobox: unable to apply cgroup configuration

Error: unable to start container "0a58490ca8d4b9cf464483b8a776e53616ebfc60cc89aa25e60b0d910d907eb2": runc: runc create failed: unable to start container process: unable to apply cgroup configuration: rootless needs no limits + no cgrouppath when no permission is granted for cgroups: mkdir /sys/fs/cgroup/0a58490ca8d4b9cf464483b8a776e53616ebfc60cc89aa25e60b0d910d907eb2: permission denied: OCI permission denied
Create ~/.config/containers/containers.conf: [containers]
cgroupns = "host"


[engine]
cgroup_manager = "cgroupfs"
runtime = "crun"

sudo xbps-install -S crun

Remove the container, and install it again, e.g.: distrobox stop abox
distrobox rm abox
podman system reset
distrobox create -i archlinux -n abox -H ~/home-abox
distrobox-enter abox

Void Linux: podman and distrobox: short-name "archlinux" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.con

Error: short-name "archlinux" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"
Edit: /etc/containers/registries.conf and add:

unqualified-search-registries = ["docker.io"]