Systemd/src
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
..
ac-power
activate tree-wide: clean up --help texts a bit 2019-11-18 15:14:43 +01:00
analyze analyze: badness if neither of RootImage and RootDirectory exists 2019-12-18 20:38:04 +02:00
ask-password
backlight util-lib: move shall_restore_state() to shared/reboot-util 2019-09-16 18:08:01 +02:00
basic time-util: also use 32bit hack on EOVERFLOW 2019-12-19 12:46:24 +01:00
binfmt tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
boot Merge pull request #14196 from keszybz/gpt-auto-generator-debugging 2019-12-16 09:24:02 +01:00
busctl tree-wide: clean up --help texts a bit 2019-11-18 15:14:43 +01:00
cgls tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
cgroups-agent tree-wide: drop socket.h when socket-util.h is included 2019-11-04 00:30:32 +09:00
cgtop Remove path_compare_func() alias for path_compare() 2019-11-15 14:47:45 +01:00
core dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
coredump tree-wide: clean up --help texts a bit 2019-11-18 15:14:43 +01:00
cryptsetup cryptsetup-pkcs11: just return zero on success, no need to return anything else 2019-12-17 18:54:07 +01:00
debug-generator initrd: fix systemd.debug-shell & friends 2019-12-03 14:48:27 +01:00
delta tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
detect-virt
dissect dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
environment-d-generator
escape
firstboot
fsck tree-wide: drop stdio.h when stdio-util.h is included 2019-11-04 00:30:32 +09:00
fstab-generator Allow overriding /etc/fstab with $SYSTEMD_FSTAB 2019-11-13 22:04:51 +01:00
fuzz json: add flags parameter to json_parse_file(), for parsing "sensitive" data 2019-12-02 09:47:00 +01:00
getty-generator tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
gpt-auto-generator dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
hibernate-resume hibernate-resume-generator: wait "infinitely" for the resume device 2019-12-03 17:20:19 +01:00
hostname tree-wide: clean up --help texts a bit 2019-11-18 15:14:43 +01:00
hwdb tree-wide: clean up --help texts a bit 2019-11-18 15:14:43 +01:00
id128 id128: fix initializer element is not constant 2019-11-20 10:59:25 +01:00
import [import] fix stdin/stdout pipe behavior in import/export tar/raw 2019-12-17 23:14:53 +09:00
initctl
journal Merge pull request #14329 from anitazha/user_invocation_id 2019-12-20 10:20:21 +01:00
journal-remote tree-wide: use SD_ID128_STRING_MAX where appropriate 2019-12-10 11:56:18 +01:00
kernel-install
libsystemd Merge pull request #14376 from poettering/sd-event-no-stack 2019-12-18 17:18:07 +01:00
libsystemd-network network: DHCP4 introduce send decline 2019-12-21 00:26:44 +09:00
libudev tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
locale tree-wide: clean up --help texts a bit 2019-11-18 15:14:43 +01:00
login core: create inaccessible nodes for users when making runtime dirs 2019-12-18 11:09:30 -08:00
machine machine: fold machine_stop_scope() into machine_stop() 2019-11-22 10:24:32 +01:00
machine-id-setup machine-id-setup: avoid unexpected aborting 2019-10-25 13:35:37 +09:00
modules-load tree-wide: drop libkmod.h when module-util.h is included 2019-11-04 00:30:32 +09:00
mount basic/fs-util: change CHASE_OPEN flag into a separate output parameter 2019-10-24 22:44:24 +09:00
network network: link should not become configured state during ACD probing 2019-12-21 00:26:44 +09:00
notify notify: add color to --help 2019-11-28 11:41:24 +01:00
nspawn dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
nss-myhostname tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
nss-mymachines
nss-resolve tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
nss-systemd
partition growfs: port over to resize_fs() 2019-12-05 10:15:49 +01:00
path
portable dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
pstore tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
quotacheck
random-seed tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
rc-local-generator
remount-fs Allow overriding /etc/fstab with $SYSTEMD_FSTAB 2019-11-13 22:04:51 +01:00
reply-password tree-wide: drop socket.h when socket-util.h is included 2019-11-04 00:30:32 +09:00
resolve resolved, networkd: don't resolve the user if not root 2019-12-07 18:55:54 +02:00
rfkill util-lib: move shall_restore_state() to shared/reboot-util 2019-09-16 18:08:01 +02:00
run tree-wide: clean up --help texts a bit 2019-11-18 15:14:43 +01:00
run-generator core: use SPECIAL_DEFAULT_TARGET more 2019-11-28 09:13:45 +01:00
shared dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
shutdown umount: when we fail to detach a loopback device, set the auto-clear flag 2019-12-20 18:37:24 +01:00
sleep tree-wide: drop stdio.h when stdio-util.h is included 2019-11-04 00:30:32 +09:00
socket-proxy tree-wide: drop socket.h when socket-util.h is included 2019-11-04 00:30:32 +09:00
stdio-bridge
sulogin-shell tree-wide: normalize includes of public headers 2019-11-28 09:14:22 +01:00
sysctl tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
system-update-generator util-lib: move runlevel_to_target() to shared/unit-file 2019-09-16 18:08:00 +02:00
systemctl systemctl: show what verbs support --dry-run in the help page 2019-12-17 11:08:00 +01:00
systemd network: DHCP4 introduce send decline 2019-12-21 00:26:44 +09:00
sysusers Revert "sysusers: properly mark generated accounts as locked" 2019-10-22 17:59:11 +09:00
sysv-generator
test dissect: introduce new recognizable partition types for /var and /var/tmp 2019-12-23 14:43:59 +01:00
time-wait-sync tree-wide: drop signal.h when signal-util.h is included 2019-11-04 00:30:32 +09:00
timedate tree-wide: clean up --help texts a bit 2019-11-18 15:14:43 +01:00
timesync tree-wide: drop socket.h when socket-util.h is included 2019-11-04 00:30:32 +09:00
tmpfiles tmpfiles: create with correct MAC label on option C 2019-11-28 12:18:04 +01:00
tty-ask-password-agent tree-wide: drop signal.h when signal-util.h is included 2019-11-04 00:30:32 +09:00
udev udev: sort alternative names 2019-12-18 00:05:50 +09:00
update-done
update-utmp tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
user-sessions
vconsole tree-wide: drop stdio.h when stdio-util.h is included 2019-11-04 00:30:32 +09:00
veritysetup id128: introduce ID128_UUID_STRING_MAX for sizing UUID buffers 2019-12-10 11:56:18 +01:00
version
volatile-root basic/fs-util: change CHASE_OPEN flag into a separate output parameter 2019-10-24 22:44:24 +09:00