Systemd/src/nspawn
Lennart Poettering d4dffb8533 dissect: introduce new recognizable partition types for /var and /var/tmp
This has been requested many times before. Let's add it finally.

GPT auto-discovery for /var is a bit more complex than for other
partition types: the other partitions can to some degree be shared
between multiple OS installations on the same disk (think: swap, /home,
/srv). However, /var is inherently something bound to an installation,
i.e. specific to its identity, or actually *is* its identity, and hence
something that cannot be shared.

To deal with this this new code is particularly careful when it comes to
/var: it will not mount things blindly, but insist that the UUID of the
partition matches a hashed version of the machine-id of the
installation, so that each installation has a very specific /var
associated with it, and would never use any other. (We actually use
HMAC-SHA256 on the GPT partition type for /var, keyed by the machine-id,
since machine-id is something we want to keep somewhat private).

Setting the right UUID for installations takes extra care. To make
things a bit simpler to set up, we avoid this safety check for nspawn
and RootImage= in unit files, under the assumption that such container
and service images unlikely will have multiple installations on them.
The check is hence only required when booting full machines, i.e. in
in systemd-gpt-auto-generator.

To help with putting together images for full machines, PR #14368
introduces a repartition tool that can automatically fill in correctly
calculated UUIDs on first boot if images have the var partition UUID
initialized to all zeroes. With that in place systems can be put
together in a way that on first boot the machine ID is determined and
the partition table automatically adjusted to have the /var partition
with the right UUID.
2019-12-23 14:43:59 +01:00
..
meson.build meson: make source files including nspawn-settings.h depend on libseccomp 2019-04-30 19:31:22 +02:00
nspawn-cgroup.c util-lib: move some functions from basic/cgroup-util to shared/cgroup-setup 2019-09-16 18:08:00 +02:00
nspawn-cgroup.h nspawn: Move cgroup mount stuff from nspawn-mount.c to nspawn-cgroup.c 2018-07-20 12:12:02 -04:00
nspawn-def.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nspawn-expose-ports.c nspawn-expose-ports: fix a typo in error message 2019-04-26 23:42:55 +02:00
nspawn-expose-ports.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nspawn-gperf.gperf nspawn: add support for executing OCI runtime bundles with nspawn 2019-03-15 15:41:28 +01:00
nspawn-mount.c core: create inaccessible nodes for users when making runtime dirs 2019-12-18 11:09:30 -08:00
nspawn-mount.h nspawn-mount: Remove unused parameters 2019-12-12 20:15:10 +01:00
nspawn-network.c nspawn: do not fail if udev is not running 2019-12-05 08:22:16 +09:00
nspawn-network.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nspawn-oci.c nspawn-oci: use new json_variant_strv() helper 2019-12-02 09:47:00 +01:00
nspawn-oci.h nspawn: add support for executing OCI runtime bundles with nspawn 2019-03-15 15:41:28 +01:00
nspawn-patch-uid.c tree-wide: drop magic.h when missing_magic.h is included 2019-11-04 00:30:32 +09:00
nspawn-patch-uid.h tree-wide: remove various unused functions 2018-12-02 13:35:34 +09:00
nspawn-register.c Merge pull request #13866 from keszybz/nspawn-restarts 2019-10-30 10:53:28 +01:00
nspawn-register.h nspawn: when stopping the machine, just deregister the machine 2019-10-29 10:54:45 +01:00
nspawn-seccomp.c nspawn: log syscalls we cannot add at debug level 2019-11-22 10:23:32 +01:00
nspawn-seccomp.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nspawn-settings.c nspawn: allow Capability=all in systemd.nspawn [EXEC] section 2019-11-29 14:42:27 +01:00
nspawn-settings.h Rework cpu affinity parsing 2019-05-29 10:20:42 +02:00
nspawn-setuid.c tree-wide: drop pwd.h and grp.h when user-util.h is included 2019-11-04 00:30:32 +09:00
nspawn-setuid.h nspawn: refactor setuid code a bit 2019-03-15 15:33:09 +01:00
nspawn-stub-pid1.c tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
nspawn-stub-pid1.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nspawn.c dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
test-nspawn-tables.c test-nspawn-tables: add another "tables" test 2018-05-28 10:40:00 +02:00
test-patch-uid.c util-lib: move yes_no() and friends to string-util.h 2019-09-16 18:06:20 +02:00