Description
While moving into the brave new bootc install to-filesystem
world for bootc-image-builder I noticed that we need a way to write a "correct" /etc/fstab (this might actually be a larger topic but let's focus on this use-case).
Currently bib uses a fairly standard partition table [0] but the booted image generated with bootc install to-filesystem
will only contain /boot
in the fstab (it looks like it's using a hardcoded method here [1]?). But it seems preferable to have a complete fstab with "/", "/boot" and "/boot/efi" [2]. bib/osbuild have ways to generate the correct fstab but there is currently no way (afaict) to put it into the deployment.
Interestingly it seems even though /boot
is part of fstab it's not mounted (but that might be a fedora:eln issue)
So my questions are:
- Should we fix this on the bootc level (probably given that
bootc install to-disk
writes the same (incomplete) /etc/fstab ? Probably yes so that install to-disk has the right information but the "install to-filesystem" case is more tricky - Bib could use install: Add
--copy-etc
#267 and push the bib generated /etc/fstab this way. The downside here is that /etc/fstab will be untracked state. Which is bad because if the bootc image ever changes their opinion about mounts it can no longer do it via /etc/fstab (but systemd mount units are a thing). - This touches on a more general issue - the mess that /etc is today (in general on linux), partly admin owned state, partly state shipped by packages/bootc images. But here it seems to me like /etc/fstab should not be something the bootc owns, it should be user configuration that is injected from bib or bootc install (we won't solve the general problem short term but finding a way for /etc/fstab as a starting point and maybe even establishing a pattern would be a nice start).
I hope this makes sense, I still have huge gaps in my understanding of the details of ostree (sorry for that).
[0] https://github.com/osbuild/bootc-image-builder/blob/main/bib/cmd/bootc-image-builder/partition_tables.go#L19
[1] https://github.com/containers/bootc/blob/main/lib/src/install.rs#L600
[2] Also with the goal of bootc to be a generic tool it seems users will want to customize /etc/fstab and have their /backup mounts in there etc.
Activity