[systemd-devel] Strange partition layout from systemd-repart

Tobias Hunger tobias.hunger at gmail.com
Thu Jun 4 14:42:18 UTC 2020


Hello!

I have a 32GB USB stick and used dd to put a ~2.5GB image onto it. The
image contains three partitions (ESP, root, root-verity). I would like
to make the remaining space on the USB stick available to users.

So I created a set of files for systemd-repart:

00_esp.conf:
[Partition]
Type=esp

10_root.conf
[Partition]
Type=root

20_vrty.conf
[Partition]
Type=root-verity

30_data.conf
[Partition]
Type=home

I had expected that the three existing partitions stay as they are and
a new partition of Type home would be created, taking the remaining
space.

But systemd-repart wants to do something else:

It wants to keep the esp and root at the size they have already. That
is expected.

The verity partition is supposed to get assigned (almost) all the
remaining space, resizing that from 20MB to about 27GB.

The new home partition is then pressed into the remaining space and gets 1MB.

The actual output is this:

------------------------------------------------------------------------------------------------
TYPE               LABEL               UUID                FILE
      NODE SIZE          PADDING
esp                EFI System Partiti… a755fc66-70f7-994d… 00_esp.conf
 /dev/sdb1 59.0M         0B
root-x86-64        clrm_20200604.1554  308e3eb0-84b4-f6e0…
10_root.conf /dev/sdb2 2.3G          0B
root-x86-64-verity vrty_20200604.1554  eb01acbc-0dde-cc9b…
20_vrty.conf /dev/sdb3 20.0M → 27.4G 27.3G → 0B
home               home                7f4c8a40-c486-4b2b…
30_data.conf /dev/sdb4 → 1.0M        → 0B

           Σ = 29.8G     Σ = 0B
------------------------------------------------------------------------------------------------

I tried adding Weights and such, but to no avail.

Any ideas what I can do to get the desired behavior?

Best Regards,
Tobias


More information about the systemd-devel mailing list