Skip to content

Defer reading prepare-root config when using `--source-imageref #1410

Open

Description

@cgwalters

What is the purpose of this file and why bootc needs it?

It looks like it uses it to know if to turn on fs-verity on the repo:

if prepare_root_composefs.requires_fsverity() || repo_verity_state.desired == Tristate::Enabled

But yeah, I think the main gap here is that one would expect that with --source-imgref, the prepare-root.conf to check comes from the target image and not the host environment. The problem of course is that at that point, the container image hasn't been pulled yet (because the filesystem we're pulling it into is still being initialized!).

So... one seemingly obvious fix here is to delay turning on fs-verity until after we deploy the container image? I think the main downside of that is that it's much more expensive because you now have a lot more objects to iterate over. It's the same amount of I/O (I think) total, but when done upfront it's amortized over the whole ostree import operation. And obviously, we could do this only in the --source-imgref case.

Originally posted by @jlebon in #1400 (reply in thread)

Activity

  1. added
    area/install
    triaged
    on Jul 16, 2025
  2. cgwalters commented on Jul 22, 2025

    @cgwalters
    MemberAuthor

    A workaround for now is to just create the file; this won't correctly handle the fsverity enabled case, but I don't think that's critical.

  3. elkoniu commented on Jul 22, 2025

    @elkoniu

    I have created the empty file but end result is that I am facing next error then - SELinux one:
    Loading SELinux policy: SELinux enabled, but no policy found in root. I was wondering if this is not the result of prepare-root.conf configuration missing or some another broken dependency on the Anaconda side, which is presented in the container environment.

  4. cgwalters commented on Jul 22, 2025

    @cgwalters
    MemberAuthor

    That's a different issue, I filed #1438

  5. added
    area/install-source-imgref
    on Jul 22, 2025
  6. 22 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/installarea/install-source-imgreftriaged

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions