Skip to content

initramfs: tolerate pre-existing /run/systemd/volatile-root symlink#2276

Queued
ricardosalveti wants to merge 1 commit into
bootc-dev:mainfrom
ricardosalveti:volatile-root-eexist
Queued

initramfs: tolerate pre-existing /run/systemd/volatile-root symlink#2276
ricardosalveti wants to merge 1 commit into
bootc-dev:mainfrom
ricardosalveti:volatile-root-eexist

Conversation

@ricardosalveti

Copy link
Copy Markdown

ostree-prepare-root is growing the same gpt-auto workaround for composefs roots (creating the /run/systemd/volatile-root symlink so systemd's blockdev_get_root() can resolve the backing device, see systemd/systemd#35017), proposed in ostreedev/ostree#3608. It runs before bootc-root-setup.service, so once that lands the symlink already exists by the time gpt_workaround() runs, and the unconditional symlink() call makes the service fail.

Both creators point the symlink at the /dev/block/MAJ:MIN alias of the same physical root device, so simply ignore EEXIST, matching how ensure_dir() handles already-existing directories.

ostree-prepare-root is growing the same gpt-auto workaround for
composefs roots (creating the /run/systemd/volatile-root symlink so
systemd's blockdev_get_root() can resolve the backing device, see
systemd/systemd#35017), proposed in
ostreedev/ostree#3608. It runs before
bootc-root-setup.service, so once that lands the symlink already
exists by the time gpt_workaround() runs, and the unconditional
symlink() call makes the service fail.

Both creators point the symlink at the /dev/block/MAJ:MIN alias of the
same physical root device, so simply ignore EEXIST, matching how
ensure_dir() handles already-existing directories.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
@bootc-bot bootc-bot Bot requested a review from henrywang July 3, 2026 03:05

@cgwalters cgwalters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

(That said, not related to your PR but I think what we really want to do is actually add the overlayfs API to query backing layers)

@cgwalters cgwalters added this pull request to the merge queue Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants