Every hand-built Linux image eventually grows the same wart: a shell script that pipes commands into sfdisk , calls partprobe , runs resize2fs , and hopes the device really was /dev/sda .
It works exactly once. Change the disk, add a partition, or boot the same image on a board that enumerates storage differently, and the script either fails halfway or, worse, succeeds against the wrong device. The deeper problem is that the script encodes positions . What you actually mean is "this disk should have a swap partition and a root partition that fills the rest."
systemd-repart is the declarative version of that idea. You write small .conf files describing the partitions that should exist, and the tool makes the partition table match. It is incremental by design: existing partitions are matched by type, missing ones are appended, and when the table already matches the configuration it does nothing at all.…