ostree/src/switchroot
Colin Walters 3564225917 Move ro /sysroot bind mount of /etc into initramfs
We recently disabled the read-only /sysroot handling:
e35b82fb89

The core problem was that a lot of services run early in the
real root and want write access to things like `/var` and `/etc`.

In trying to do remounts while the system is running we introduce
too many race conditions.

Instead, just make the `/etc` bind mount in the initramfs right
after we set up the main root.  This is much more natural really,
and avoids all race conditions since nothing is running in the
sysroot yet.

The main awkward part is that since we're not linking
`ostree-prepare-root` to GLib (yet) we have a hacky parser
for the config file.  But, this is going to be fine I think.

In order to avoid parsing the config twice, pass state from
`ostree-prepare-root` to `ostree-remount` via a file in `/run`.
2020-05-24 18:46:28 +00:00
..
ostree-mount-util.h Move ro /sysroot bind mount of /etc into initramfs 2020-05-24 18:46:28 +00:00
ostree-prepare-root.c Move ro /sysroot bind mount of /etc into initramfs 2020-05-24 18:46:28 +00:00
ostree-remount.c Move ro /sysroot bind mount of /etc into initramfs 2020-05-24 18:46:28 +00:00
ostree-system-generator.c switchroot: Move late /run/ostree-booted creation to ostree-system-generator 2018-07-09 00:11:31 +00:00
switchroot.sh switchroot: Document a bit more, add demo shell implementation 2017-04-19 18:52:05 +00:00