From 96deebbcda444554113a49a304e1b6ce563ab2c1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 12 May 2020 17:11:27 +0200 Subject: [PATCH] man: document new --empty=create and --size= switches to repart --- man/systemd-repart.xml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/man/systemd-repart.xml b/man/systemd-repart.xml index f55be4f328..74c6ba95b1 100644 --- a/man/systemd-repart.xml +++ b/man/systemd-repart.xml @@ -58,7 +58,7 @@ The root partition may be grown to cover the whole available disk space - A /home/, swap or /srv partition can be added in + A /home/, swap or /srv/ partition can be added in A second (or third, …) root partition may be added in, to cover A/B style setups where a second version of the root file system is alternatingly used for implementing update schemes. The deployed image would carry only a single partition ("A") but on first boot a second @@ -145,6 +145,12 @@ also be set explicitly, formatted as UUID via the option. By hashing these UUIDs from a common seed images prepared with this tool become reproducible and the result of the algorithm above deterministic. + + The positional argument should specify the block device to operate on. Instead of a block device + node path a regular file may be specified too, in which case the command operates on it like it would if + a loopback block device node was specified with the file attached. If is + specified the specified path is created as regular file, which is useful for generating disk images from + scratch. @@ -165,9 +171,9 @@ Takes one of refuse, allow, - require or force. Controls how to operate on block devices that - are entirely empty, i.e. carry no partition table/disk label yet. If this switch is not specified the - implied default is refuse. + require, force or create. Controls how to + operate on block devices that are entirely empty, i.e. carry no partition table/disk label yet. If + this switch is not specified the implied default is refuse. If refuse systemd-repart requires that the block device it shall operate on already carries a partition table and refuses operation if none is found. If @@ -176,7 +182,9 @@ exists so far, and refuse operation if one already exists. If force it will create a fresh partition table unconditionally, erasing the disk fully in effect. If force no existing partitions will be taken into account or survive the - operation. Hence: use with care, this is a great way to lose all your data. + operation. Hence: use with care, this is a great way to lose all your data. If + create a new loopback file is create under the path passed via the device node + parameter, of the size indicated with , see below. @@ -186,7 +194,20 @@ the implied default. Controls whether to issue the BLKDISCARD I/O control command on the space taken up by any added partitions or on the space in between them. Usually, it's a good idea to issue this request since it tells the underlying hardware that the covered blocks - shall be considered empty, improving performance. + shall be considered empty, improving performance. If operating on a regular file instead of a block + device node, a sparse file is generated. + + + + + + Takes a size in bytes, using the usual K, M, G, T suffixes. If used the specified + device node path must refer to a regular file, which is then grown to the specified size if smaller, + before any change is made to the partition table. This is not supported if the specified node is a + block device. This switch has no effect if the file is already as large as the specified size or + larger. The specified size is implicitly rounded up to multiples of 4096. When used with + this specifies the initial size of the loopback file to + create.