From df27f1dbcaed66c45563f69774faf9bc61804cea Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 11 Mar 2021 21:35:24 +0100 Subject: [PATCH] doc: mention that choosing root/usr partitions by strverscmp() on the partition label is OK --- docs/DISCOVERABLE_PARTITIONS.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/DISCOVERABLE_PARTITIONS.md b/docs/DISCOVERABLE_PARTITIONS.md index 9ce4ebc9407..81d07f88a65 100644 --- a/docs/DISCOVERABLE_PARTITIONS.md +++ b/docs/DISCOVERABLE_PARTITIONS.md @@ -162,7 +162,14 @@ partition is listed in `/etc/fstab` or with `root=` on the kernel command line, it _must_ take precedence over automatically discovered partitions. If a `/home/`, `/usr/`, `/srv/`, `/boot/`, `/var/`, `/var/tmp/`, `/efi/` or `/boot/` directory is found to be populated already in the root partition, the automatic -discovery _must not_ mount any discovered file system over it. +discovery _must not_ mount any discovered file system over it. Optionally, in +case of the root, `/usr/` and their Verity partitions instead of strictly +mounting the first suitable partition an OS might choose to mount the partition +whose label compares the highest according to `strverscmp()` or a similar +logic, in order to implement a simple partition-based A/B versioning +scheme. The precise rules are left for the implementation to decide, but when +in doubt earlier partitions (by their index) should always win over later +partitions if the label comparison is inconclusive. A *container* *manager* should automatically discover and mount the root, `/usr/`, `/home/`, `/srv/`, `/var/`, `/var/tmp/` partitions inside a container