fstab-generator: if usr= is specified, mount it to /sysusr/usr/ first
authorLennart Poettering <lennart@poettering.net>
Fri, 26 Mar 2021 21:40:40 +0000 (22:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Apr 2021 16:26:17 +0000 (18:26 +0200)
commit29a24ab28e9790680348b1ffab653a321fa49a67
tree6bf35850f80c21a86728106ed767e88a72bc4658
parentee7561d014d073944779e155271d7042d7ea5572
fstab-generator: if usr= is specified, mount it to /sysusr/usr/ first

This changes the fstab-generator to handle mounting of /usr/ a bit
differently than before. Instead of immediately mounting the fs to
/sysroot/usr/ we'll first mount it to /sysusr/usr/ and then add a
separate bind mount that mounts it from /sysusr/usr/ to /sysroot/usr/.

This way we can access /usr independently of the root fs, without for
waiting to be mounted via the /sysusr/ hierarchy. This is useful for
invoking systemd-repart while a root fs doesn't exist yet and for
creating it, with partition data read from the /usr/ hierarchy.

This introduces a new generic target initrd-usr-fs.target that may be
used to generically order services against /sysusr/ to become available.
src/basic/special.h
src/fstab-generator/fstab-generator.c
units/initrd-usr-fs.target [new file with mode: 0644]
units/initrd.target
units/meson.build
units/systemd-repart.service.in
units/systemd-volatile-root.service.in