REPART.D(5) repart.d REPART.D(5) (NAME) repart.d - systemd-repart (SYNOPSIS) /etc/repart.d/*.conf /run/repart.d/*.conf /usr/local/lib/repart.d/*.conf /usr/lib/repart.d/*.conf (DESCRIPTION) repart.d/*.conf . . systemd-repart(8) . . ( ) . GPT . : ( ) UUID . UUID UUID UUID UUID . . . . . systemd-growfs(8) . GrowFileSystem= (mount) . . [PARTITION] ([PARTITION] SECTION OPTIONS) Type= UUID GPT . UUID GPT 4f68bce3-e8cd-4db1-96e7-fbcaf984b709 . : 1. GPT +--------------------------+-----------------------------------+ | | | +--------------------------+-----------------------------------+ |esp | | | | EFI | +--------------------------+-----------------------------------+ |xbootldr | | | | | | | | | | (Extended Boot Loader Partition) | +--------------------------+-----------------------------------+ |swap | | | | | +--------------------------+-----------------------------------+ |home | | | | (/home/) | +--------------------------+-----------------------------------+ |srv | | | | | | | (/srv/) | +--------------------------+-----------------------------------+ |var | | | | | | | (/var/) | +--------------------------+-----------------------------------+ |tmp | | | | | | | (/var/tmp/) | +--------------------------+-----------------------------------+ |linux-generic | | | | | | | | | | | +--------------------------+-----------------------------------+ |root | | | | | | | | | | | | | ( | | | | | | | | | | | | | | | | | | | | | | | | root-x86-64) | +--------------------------+-----------------------------------+ |root-verity | Verity | | | | | | | | | | | | | | | | +--------------------------+-----------------------------------+ |root-verity-sig | | | | Verity | | | | | | | | | | | | | | | | +--------------------------+-----------------------------------+ |root-secondary | | | | | | | | | | | | | | | | ( | | | | | | | | | | | | ) | +--------------------------+-----------------------------------+ |root-secondary-verity | Verity | | | | | | | | | | | | | | | | +--------------------------+-----------------------------------+ |root-secondary-verity-sig | | | | Verity | | | | | | | | | | | | | | | | +--------------------------+-----------------------------------+ |root-{arch} | | | | | | | | | | | | | ( root-x86-64 | | | root-riscv64) | +--------------------------+-----------------------------------+ |root-{arch}-verity | Verity | | | | | | | | | | | | | | | | +--------------------------+-----------------------------------+ |root-{arch}-verity-sig | | | | Verity | | | | | | | | | | | | | | | | +--------------------------+-----------------------------------+ |usr | | | | | | | /usr/ | | | | | | ( | | | | | | | | | | | | | | | /usr/ | | | | | | | | | usr-x86-64) | +--------------------------+-----------------------------------+ |usr-verity | Verity | | | | | | | | | | | | /usr/ | | | | +--------------------------+-----------------------------------+ |usr-verity-sig | | | | Verity | | | | | | | | | | | | /usr/ | | | | +--------------------------+-----------------------------------+ |usr-secondary | | | | | | | /usr/ | | | | | | | | | ( | | | | | | | | | | | | ) | +--------------------------+-----------------------------------+ |usr-secondary-verity | Verity | | | | | | | | | | | | /usr/ | | | | +--------------------------+-----------------------------------+ |usr-secondary-verity-sig | | | | Verity | | | | | | | | | | | | /usr/ | | | | +--------------------------+-----------------------------------+ |usr-{arch} | | | | | | | /usr/ | | | | +--------------------------+-----------------------------------+ |usr-{arch}-verity | Verity | | | | | | | | | | | | /usr/ | | | | +--------------------------+-----------------------------------+ |usr-{arch}-verity-sig | | | | Verity | | | | | | | | | | | | /usr/ | | | | +--------------------------+-----------------------------------+ : alpha arc arm ( ) arm64 ( aarch64) ia64 loongarch64 mips-le mips64-le parisc ppc ppc64 ppc64-le riscv32 riscv64 s390 s390x tilegx x86 ( i386) x86-64 ( amd64). UUID UAPI.2 Discoverable Partitions Specification[1] . 245. Label= . . . ( ). . (specifier expansion) . 245. VolumeLabel= LUKS . ( Label= ) "luks-". . 259. UUID= UUID UUID . . UUID . UUID . "null" UUID . UUID . 246. Priority= -2147483648...2147483647 . . ( ). . . 0 . 0 . . 0 . 245. Weight= 0...1000000. ( SizeMinBytes= SizeMaxBytes=) 2000 1000 333 . 1000 . Weight= <<>> . SizeMinBytes= SizeMaxBytes= . 245. PaddingWeight= Weight= (<<>>) . . 0 . . 245. SizeMinBytes= SizeMaxBytes= . K M G T ... ( 1024) . SizeMinBytes= . SizeMaxBytes= . Weight= . SizeMinBytes= SizeMaxBytes= . 4096 ( ) . 4096 ( SizeMinBytes=) ( SizeMaxBytes=) . . Priority= ( ) . 10M . Format= ( ) . ESP/XBOOTLDR 100M ( 512 ) 260M ( 4K) . 245. PaddingMinBytes= PaddingMaxBytes= (<<>>) . SizeMinBytes= SizeMaxBytes= . PaddingWeight= . 245. CopyBlocks= "auto" . . . -- . /dev/urandom . "auto" ( --image= -- ) . ( Type= ) . "root" (/) -- "root" . "usr" /usr/ -- "usr" . Verity . "CopyBlocks=auto" <<->> . 512 . : SizeMinBytes= . . . : . Format= CopyFiles= . 246. Format= "ext4" "btrfs" "xfs" "vfat" "erofs" "squashfs" "swap" . ( ) . UUID UUID . : ( 4KiB ). (meta value) "empty" . "Label=_empty" "NoAuto=1" . . CopyBlocks= . CopyBlocks= . 247. CopyFiles= "source[:target[:options]]" . source . target . options "key[=value]" . Format= . CopyFiles= Format= "Format=" ( "vfat" "ESP" "XBOOTLDR" "ext4" ). . target source ( ). . options : fsverity= "off" ( ) "copy" . "off" fs-verity . "copy" fs-verity . 258. : . . CopyFiles= ( symlink fifo vfat) . systemd-repart . systemd-repart UID/GID . systemd-repart systemd-repart (user namespace) root root . CopyBlocks= . systemd-repart(8) --copy-source= . --copy-source= --image= --root= . CopyFiles= Format=xfs xfsprogs 6.17 . 247. ExcludeFiles= ExcludeFilesTarget= . CopyFiles= . . "/" . "/" . ExcludeFilesTarget= ExcludeFiles= . systemd-repart(8) --image= --root= . 254. MakeDirectories= . CopyFiles= 0755 root ( ) . CopyFiles= / . . CopyFiles= MakeDirectories= . ( / ). (mount) . /usr/ "usr" . systemd-tmpfiles(8) --image= ( inode) . 249. MakeSymlinks= . . . CopyFiles= MakeSymlinks= . systemd-tmpfiles(8) . systemd-confext(8) /var/lib/extensions.mutable confext . systemd-tmpfiles(8) --image= ( inode) . 257. Subvolumes= (subvolume) . . : 2. +------------+-----------------------------------+ | | | +------------+-----------------------------------+ |"ro" | | | | | | | | | | . | +------------+-----------------------------------+ |"nodatacow" | | | | CoW | | | | | | | | | . | +------------+-----------------------------------+ MakeDirectories= CopyFiles= . btrfs(8). --offline=yes btrfs-progs 6.12 . 255. DefaultSubvolume= (subvolume) . Subvolumes= . btrfs(8). --offline=yes btrfs-progs 6.12 . 256 . BlockDeviceReplace= (mountpoint) . (backing device) . btrfs . . . . () (live boot) . . --offline=yes . 261 . VolumeName= Encrypt= systemd-repart ( BlockDeviceReplace=) device mapper VolumeName= . . VolumeLabel= ( Label= ) . 261 . Encrypt= "off" "key-file" "tpm2" "key-file+tpm2" ( (boolean) "off" "key-file" ). "off" . "off" CopyBlocks= Format= LUKS2 . LUKS2 UUID UUID . "key-file" "key-file+tpm2" LUKS2 --key-file= systemd-repart . "tpm2" "key-file+tpm2" LUKS2 TPM2 (enroll) --tpm2-device= --tpm2-pcrs= systemd-repart . Format= CopyBlocks= LUKS2 ( ). . 247 . Discard= (boolean) . systemd-repart --discard=no Integrity=inline "no" "yes" . "yes" LUKS2 "allow-discards" (discard) . Encrypt=off . 261 . EncryptKDF= (KDF) (keyslots) LUKS2 . "argon2id" "pbkdf2" "minimal" . cryptsetup ( "argon2id") . Encrypt= "off" . "argon2id" "pbkdf2" KDF cryptsetup (benchmarked) . "minimal" PBKDF2 SHA-512 -- ( TPM) KDF LUKS2 . KDF Argon2 ( ) . kdump crashkernel "minimal" "pbkdf2" . Encrypt= "tpm2" TPM2 PBKDF2 . 261 . Verity= "off" "data" "hash" "signature" . "off" . "off" "data" CopyBlocks= CopyFiles= . "hash" verity verity . "signature" JSON verity verity . verity verity ( VerityMatchKey= ). UUID verity . UUID verity . verity systemd-repart . . Encrypt= . VerityMatchKey= verity ("Verity=data") verity ("Verity=hash") . 252 . VerityMatchKey= . verity (sibling) verity . Verity= . 252 . VerityDataBlockSizeBytes= verity . . systemd-repart 4K . 255 . VerityHashBlockSizeBytes= verity . . systemd-repart 4K . 255 . FactoryReset= (boolean) . (factory reset) . . off . 245 . Flags= GPT . . NoAuto= ReadOnly= GrowFileSystem= . ( "0x") ( "0b") ( ) . 249 . NoAuto=, ReadOnly=, GrowFileSystem= No-Auto Read-Only Grow-File-System ( ) UAPI.2 Discoverable Partitions Specification[1] . . Flags= . Flags= NoAuto=/ReadOnly=/GrowFileSystem= NoAuto=/ReadOnly=/GrowFileSystem= Flags= . (mount) systemd-gpt-auto-generator(8) --image= ( systemd-nspawn(1)) . mount(8) fstab(5) . ( ) : . NoAuto= off . ReadOnly= Verity on off . GrowFileSystem= on ( Verity off ). 249 . SplitName= (split artifacts) --split systemd-repart(8) . (specifier) . "%t" . SplitName= "-" . 252 . Minimize= "off" "best" "guess" ( (boolean) "off" "best" ). "off" . "best" CopyFiles= . "best" btrfs . "guess" CopyFiles= . btrfs systemd-repart repart . 253 . MountPoint= (mount) . (":") . . . fstab(5) . () : MountPoint="/path/with:colon":"zstd:1,noatime,lazytime" . btrfs(8) btrfs . --generate-fstab= systemd-repart . 256 . EncryptedVolume= . (":") . /dev/mapper/ . "luks-UUID" "UUID" LUKS UUID . crypttab . crypttab . crypttab(5) . crypttab . fixate-volume-key . LUKS crypttab fixate-volume-key=expected-hash crypttab . --generate-crypttab= systemd-repart . crypttab LUKS crypttab . 256 . TPM2PCRs= PCR LUKS2 Encrypt=tpm2 . systemd-cryptenroll(1) (enrollment) TPM2 . --tpm2-pcrs= (override) . 259 . KeyFile= . . LUKS2 Encrypt=key-file . --key-file= . --key-file= . 259 . Integrity= . Integrity=inline (authenticated disk encryption) LUKS2 . Encrypt= (online image build) . "off" . : cryptsetup (EXPERIMENTAL) . 260 . IntegrityAlgorithm= . Integrity=inline : "hmac-sha1" "hmac-sha256" () "hmac-sha512". 260 . Compression= Format= . . Format= ( btrfs(8) squashfs erofs(5)). systemd-repart : 3. +-------------------------------+--------------------------------------+-----------------------+ | | | | | | | | +-------------------------------+--------------------------------------+-----------------------+ |squashfs | gzip, lzo, lz4, xz, zstd, lzma | mksquashfs(1) | +-------------------------------+--------------------------------------+-----------------------+ |erofs | lz4, lz4hc, lzma, deflate, | mkfs.erofs(1) | | | libdeflate, zstd | | +-------------------------------+--------------------------------------+-----------------------+ |btrfs | zlib, lzo, zstd | mkfs.btrfs(8) | +-------------------------------+--------------------------------------+-----------------------+ 257 . CompressionLevel= Format= . . ( ). Format= Compression= . 257 . SupplementFor= "10-esp" . systemd-repart . (layout) systemd-repart . systemd-repart . : Weight= PaddingWeight= SizeMinBytes= PaddingMinBytes= SizeMaxBytes= PaddingMaxBytes= CopyFiles= ExcludeFiles= ExcludeFilesTarget= MakeDirectories= Subvolumes= () . CopyBlocks= Encrypt= Verity= . . . . $BOOT UAPI.1 Boot Loader Specification[2] . ESP $BOOT XBOOTLDR . : ESP XBOOTLDR ESP . systemd-repart(8) ESP ESP XBOOTLDR . /home (multi-boot) /home . /home : . ( systemd-homed.service(8)). : /home . systemd-repart /home . . 257 . AddValidateFS= (boolean) . (extended attributes) user.validatefs.gpt_label user.validatefs.gpt_type_uuid user.validatefs.mount_point inode UUID . Format= "swap" "vfat" on . systemd- validatefs@.service(8) . systemd-gpt-auto-generator(8) GPT . ( LUKS dm-verity) . 258 . FileSystemSectorSize= LUKS Verity . . ( ) . (firmware) . . . . 258 . (SPECIFIERS) Label= CopyBlocks= CopyFiles= MakeDirectories= SplitName= . : 4. +-------------------------------+--------------------------------+--------------------------------+ | | | | +-------------------------------+--------------------------------+--------------------------------+ |"%a" | | | | | | | | | | | | | | | | | | | | | | | | | | x86 x86-64 | | | | arm64. | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConditionArchitecture= | | | | systemd.unit(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%A" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IMAGE_VERSION= | | | | /etc/os-release. | | | | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | os-release(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%b" | | | | | (Boot ID) | | | | | | | | | | | | | . | | | | | | | | | | | | random(4) | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%B" | | | | | (Build ID) | | | | | | | | | | | | | | | | | BUILD_ID= | | | | /etc/os-release. | | | | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | os-release(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%H" | | | | | (Host name) | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%l" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%m" | | | | | (Machine ID) | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | machine-id(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%M" | | | | | | | | | | | | | | | | | | | | | | | | | | IMAGE_ID= | | | | /etc/os-release. | | | | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | os-release(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%o" | | | | | | | | | | | | | | | | | | | | | | ID= | | | | /etc/os-release. | | | | | | | | | | | | os-release(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%q" | | | | | (Pretty | | | | host name) | | | | | | | | | | | | | | | | | PRETTY_HOSTNAME= | | | | /etc/machine-info. | | | | | | | | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | machine-info(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%v" | | | | | (Kernel release) | uname -r. | +-------------------------------+--------------------------------+--------------------------------+ |"%w" | | | | | | | | | | | | | | | | | | | | | | | | | | VERSION_ID= | | | | /etc/os-release. | | | | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | os-release(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%W" | | | | | (Variant ID) | | | | | | | | | | | | | | | | | | | | | VARIANT_ID= | | | | /etc/os-release. | | | | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | os-release(5) | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ |"%T" | | /tmp | | | | | | | | "$TMPDIR" "$TEMP" | | | | "$TMP" | | | | | | | | . | | | | ( | | | | | | | | | | | | | | | | | | | | | | | | .) | +-------------------------------+--------------------------------+--------------------------------+ |"%V" | | /var/tmp | | | | | | | | "$TMPDIR" "$TEMP" | | | | "$TMP" | | | | | | | | . | | | | ( | | | | | | | | | | | | | | | | | | | | | | | | .) | +-------------------------------+--------------------------------+--------------------------------+ |"%%" | | | | | | | | | | | | | | "%%" | | | | "%" | | | | | | | | . | +-------------------------------+--------------------------------+--------------------------------+ SplitName= : 5. +-------------------------------+-----------------------+--------------------------------------+ | | | | +-------------------------------+-----------------------+--------------------------------------+ |"%T" | UUID | | | | | | | | | (UUID) | | | | Type= | | | | | | | | | +-------------------------------+-----------------------+--------------------------------------+ |"%t" | | | | | | | | | | UUID | | | | | +-------------------------------+-----------------------+--------------------------------------+ |"%U" | UUID | | | | | (UUID) | | | | | | | | UUID= | | | | | | | | | +-------------------------------+-----------------------+--------------------------------------+ |"%n" | | | | | | | | | | | | | | | +-------------------------------+-----------------------+--------------------------------------+ (ENVIRONMENT) : $SYSTEMD_REPART_MKFS_OPTIONS_BTRFS $SYSTEMD_REPART_MKFS_OPTIONS_XFS $SYSTEMD_REPART_MKFS_OPTIONS_VFAT $SYSTEMD_REPART_MKFS_OPTIONS_EROFS $SYSTEMD_REPART_MKFS_OPTIONS_SQUASHFS. mkfs.filesystem . . (EXAMPLES) 1. . # /usr/lib/repart.d/50-root.conf [Partition] Type=root 2. swap home home swap 1G 64M . > 0 swap swap . home swap . # /usr/lib/repart.d/60-home.conf [Partition] Type=home # /usr/lib/repart.d/70-swap.conf [Partition] Type=swap SizeMinBytes=64M SizeMaxBytes=1G Priority=1 Weight=333 3. B A/B Verity A/B ( Verity ) . Verity ( "A") Verity ( "B") . # /usr/lib/repart.d/50-root.conf [Partition] Type=root SizeMinBytes=512M SizeMaxBytes=512M # /usr/lib/repart.d/60-root-verity.conf [Partition] Type=root-verity SizeMinBytes=64M SizeMaxBytes=64M "A" ( 512M) Verity ( 64M) . (symlinks) "B" "A" . # ln -s 50-root.conf /usr/lib/repart.d/70-root-b.conf # ln -s 60-root-verity.conf /usr/lib/repart.d/80-root-verity-b.conf 4. verity /var/tmp/os-tree verity : # 50-root.conf [Partition] Type=root CopyFiles=/var/tmp/os-tree Verity=data VerityMatchKey=root Minimize=guess # 60-root-verity.conf [Partition] Type=root-verity Verity=hash VerityMatchKey=root # Explicitly set the hash and data block size to 4K VerityDataBlockSizeBytes=4096 VerityHashBlockSizeBytes=4096 Minimize=best # 70-root-verity-sig.conf [Partition] Type=root-verity-sig Verity=signature VerityMatchKey=root (SEE ALSO) systemd(1), systemd-repart(8), sfdisk(8), systemd-cryptenroll(1) (NOTES) 1. UAPI.2 Discoverable Partitions Specification https://uapi- group.org/specifications/specs/discoverable_partitions_specification 2. UAPI.1 Boot Loader Specification https://uapi- group.org/specifications/specs/boot_loader_specification systemd 261.2 REPART.D(5)