|
55 | 55 | partition slot greater than the highest slot number currently in use. Any existing partitions that have |
56 | 56 | no matching partition file are left as they are.</para> |
57 | 57 |
|
58 | | - <para>Note that these partition definition files do not describe the contents of the partitions, such as |
59 | | - the file system used. Separate mechanisms, such as |
60 | | - <citerefentry><refentrytitle>systemd-growfs</refentrytitle><manvolnum>8</manvolnum></citerefentry> and |
61 | | - <command>systemd-makefs</command> maybe be used to initialize or grow the file systems inside of these |
62 | | - partitions.</para> |
| 58 | + <para>Note that these definitions may only be used to created and initialize new partitions or grow |
| 59 | + existing ones. In the latter case it will not grow the contained files systems however; separate |
| 60 | + mechanisms, such as |
| 61 | + <citerefentry><refentrytitle>systemd-growfs</refentrytitle><manvolnum>8</manvolnum></citerefentry> may be |
| 62 | + used to grow the file systems inside of these partitions.</para> |
63 | 63 | </refsect1> |
64 | 64 |
|
65 | 65 | <refsect1> |
|
327 | 327 | data is never overwritten. Note that the data is copied in before the partition table is updated, |
328 | 328 | i.e. before the partition actually is persistently created. This provides robustness: it is |
329 | 329 | guaranteed that the partition either doesn't exist or exists fully populated; it is not possible that |
330 | | - the partition exists but is not or only partially populated.</para></listitem> |
| 330 | + the partition exists but is not or only partially populated.</para> |
| 331 | + |
| 332 | + <para>This option cannot be combined with <varname>Format=</varname> or |
| 333 | + <varname>CopyFiles=</varname>.</para></listitem> |
| 334 | + </varlistentry> |
| 335 | + |
| 336 | + <varlistentry> |
| 337 | + <term><varname>Format=</varname></term> |
| 338 | + |
| 339 | + <listitem><para>Takes a file system name, such as <literal>ext4</literal>, <literal>btrfs</literal>, |
| 340 | + <literal>xfs</literal> or <literal>vfat</literal>, or the special value <literal>swap</literal>. If |
| 341 | + specified and the partition is newly created it is formatted with the specified file system (or as |
| 342 | + swap device). The file system UUID and label are automatically derived from the partition UUID and |
| 343 | + label. If this option is used, the size allocation algorithm is slightly altered: the partition is |
| 344 | + created as least as big as required for the minimal file system of the specified type (or 4KiB if the |
| 345 | + minimal size is not known).</para> |
| 346 | + |
| 347 | + <para>This option has no effect if the partition already exists.</para> |
| 348 | + |
| 349 | + <para>Similar to the behaviour of <varname>CopyBlocks=</varname> the file system is formatted before |
| 350 | + the partition is created, ensuring that the partition only ever exists with a fully initialized |
| 351 | + file system.</para> |
| 352 | + |
| 353 | + <para>This option cannot be combined with <varname>CopyBlocks=</varname>.</para></listitem> |
| 354 | + </varlistentry> |
| 355 | + |
| 356 | + <varlistentry> |
| 357 | + <term><varname>CopyFiles=</varname></term> |
| 358 | + |
| 359 | + <listitem><para>Takes a pair of colon separated absolute file system paths. The first path refers to |
| 360 | + a source file or directory on the host, the second path refers to a target in the file system of the |
| 361 | + newly created partition and formatted file system. This setting may be used to copy files or |
| 362 | + directories from the host into the file system that is created due to the <varname>Format=</varname> |
| 363 | + option. If <varname>CopyFiles=</varname> is used without <varname>Format=</varname> specified |
| 364 | + explicitly, <literal>Format=</literal> with a suitable default is implied (currently |
| 365 | + <literal>ext4</literal>, but this may change in the future). This option may be used multiple times |
| 366 | + to copy multiple files or directories from host into the newly formatted file system. The colon and |
| 367 | + second path may be omitted in which case the source path is also used as the target path (relative to |
| 368 | + the root of the newly created file system). If the source path refers to a directory it is copied |
| 369 | + recursively.</para> |
| 370 | + |
| 371 | + <para>This option has no effect if the partition already exists: it cannot be used to copy additional |
| 372 | + files into an existing partition, it may only be used to populate a file system created anew.</para> |
| 373 | + |
| 374 | + <para>The copy operation is executed before the file system is registered in the partition table, |
| 375 | + thus ensuring that a file system populated this way only ever exists fully initialized.</para> |
| 376 | + |
| 377 | + <para>This option cannot be combined with <varname>CopyBlocks=</varname>.</para></listitem> |
| 378 | + </varlistentry> |
| 379 | + |
| 380 | + <varlistentry> |
| 381 | + <term><varname>Encrypt=</varname></term> |
| 382 | + |
| 383 | + <listitem><para>Takes a boolean parameter, defaulting to false. If true the partition will be |
| 384 | + formatted with a LUKS2 superblock, before the blocks configured with <varname>CopyBlocks=</varname> |
| 385 | + are copied in or the file system configured with <varname>Format=</varname> is created.</para> |
| 386 | + |
| 387 | + <para>The LUKS2 UUID is automatically derived from the partition UUID in a stable fashion. A single |
| 388 | + key is added to the LUKS2 superblock, configurable with the <option>--key-file=</option> switch to |
| 389 | + <command>systemd-repart</command>.</para> |
| 390 | + |
| 391 | + <para>When used this slightly alters the size allocation logic as the implicit, minimal size limits |
| 392 | + of <varname>Format=</varname> and <varname>CopyBlocks=</varname> are increased by the space necessary |
| 393 | + for the LUKS2 superblock (see above).</para> |
| 394 | + |
| 395 | + <para>This option has no effect if the partition already exists.</para></listitem> |
331 | 396 | </varlistentry> |
332 | 397 |
|
333 | 398 | <varlistentry> |
|
0 commit comments