[systemd-devel] How to use systemd-repart partitions?

Lennart Poettering lennart at poettering.net
Wed May 20 13:21:10 UTC 2020


On Mi, 20.05.20 13:58, Tobias Hunger (tobias.hunger at gmail.com) wrote:

> > To deliver the others, I want to add Encrypt= and Format= as
> > mentioned. To cover the 2nd usecase I then also want to provide
> > CopyBlocks= and CopyFiles=.
>
> I assume CopyBlocks= will just dd and so does not need a formatted
> partition?

Correct.

> CopyFiles= obviously does.

Yes.

> > The former would stream data into a
> > partition that is created on the block level. Primary usecase would be
> > to copy a partition 1:1 from the installer medium onto the host
> > medium. The latter would copy in a file tree on the fs level.
>
> What about things like create subvolumes on BTRFS? systemd-tmpfiles
> does support that.

If this is desirable we could probably add MakeSubvolume= or so which
is applied before CopyFiles= is run, or so.

> > Well, my thinking was to mostly rely on the "gpt-auto" logic,
> > i.e. that simply because they carry correct gpt type uuids systemd
> > would discover and find them.
>
> gpt-auto is not enough. I will want to set up pretty complex things
> like dm/crypto/etc.

gpt-auto can cover LUKS/dm-crypt as well as dm-verity just fine. What
else do you need?

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list