Conversation
mkosi runs a host-side finalize script as the invoking user in a rootless build, so systemd-tmpfiles could not chown the rootfs directories to root and failed with EINVAL, aborting every rootless image build. Run it through mkosi-chroot, which becomes root in the image. mkosi-chroot bind-mounts /etc/resolv.conf, so that one link is made from outside. Signed-off-by: Kevin Wang <wy721@qq.com>
This was referenced Sep 25, 2026
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1331 moved
rootfs.tmpfilesintomkosi.finalize, which runs on the host as the invoking user in a rootless build.systemd-tmpfilesthen cannot chown thed ... root rootentries and every rootlessmake os-imagefails:CI is unaffected because it runs mkosi as root. Apply the file through
mkosi-chroot(root in the image) instead;mkosi-chrootbind-mounts/etc/resolv.conf, so that link is created from outside.Verification
0755 0/0/0700 0/0with the/etc/resolv.conf,/tappand/usr/sbin/initlinks; the PR 841 physical-TDX sweep passes with this change (together with fix(os/mkosi): keep the TPM keystore root-owned 0755 at runtime #1413 for the runtime keystore mode).