-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct way to add top-level mountpoints to disk images #814
Comments
We talked about this before I thought? We currently require the mountpoints to be created as part of the container image. |
Yes, that works. Is there no way to do it with a base image that doesn't have the mountpoints, using a base image without deriving just to create a top-level directory? I'm wondering if we can find a way to create arbitrary mountpoints after the fact, without needing to modify the base image. If not, that's fine, we'll just have to document it and maybe, if we want to be pro-active, we can check for the directories and validate the mountpoint configuration in bootc-image-builder ahead of time. |
Why? We expect people to start by creating custom images in general. I think there's a conceptual mismatch here in that bootc expectation is the center of gravity should be container builds as much as possible. Certainly it does feel annoying to need to do something both in the container and in an external partitioning config...and I think as you know, I had really hoped to solve that by embedding the partitioning in the container image. We know that's actually what's required in many dynamic cases anyways - i.e. partitioning on firstboot or each boot via mount units, repart, custom LVM commands, etc. ultimately invoked by systemd units. Now I would say a valid use case in general to make a disk image with custom partitioning from a container image that one didn't own...but wanting to make a custom toplevel mountpoint for an image you don't own starts to become a big corner case I think. Such use cases can probably opt-in to having
Right. So I think the short term deliverable here is just docs. |
I'm not sure it's that far off into the corner as this implies, based on some of the moves I'm seeing with base images being promoted as ready-made products. But that's besides the point here, I suppose.
We've been circling this topic for a while now without much concrete progress. Let me experiment with some ideas and see if I can have something to show for this on Monday. |
I agree it's a real issue. Ultimately this one is rooted in a decision made long ago on the ostree side that And the problem is that basically because people do put things outside of Anyways will see about updating the docs.
Cool! It'd be nice if in Fedora derivatives we had...fewer...partitioning languages but I guess something like |
To expand on this a bit more see |
We want to be clear that toplevel directories for mountpoints need to be created in the container build. Also, this moves the transient root and stateoverlay to markdown level 2, where they should have been. Closes: containers#814 Signed-off-by: Colin Walters <[email protected]>
In bootc-image-builder we now support adding custom mountpoints to images, but we restrict it to mountpoints under
/var/
(with some exceptions).We're getting a lot of requests to support adding top-level mountpoints (e.g.
/data
) and I've been struggling to figure out the correct to do this without breaking the system. The script below sort of replicates how BIB does disk image building, for reference:(forgive the jankiness of the script; it's just for illustrative purposes).
The
/var/data
mount works great, but if the fstab entry is changed to mount it to/data
, the system fails to boot.I partially understand the reasons why this is happening, with the live
/
mountpoint on the system being a read-only composefs overlay. I suspect this can be solved by generating a mount unit and carefully configuring it to run at the right time during boot (withAfter
andBefore
directives). I wanted to ask here though to understand the details of the problem fully instead of just resorting to trial and error.The text was updated successfully, but these errors were encountered: