Hi, I want to duplicate partition 1 and partition 2 using systemd-repart. This is for SBC, I use mkosi to create the OS image.
By default, it needs 2 partitions 1. Boot partition: FAT32 used by 1st stage bootloader 2. Root partition: EXT4 This works fine. Then I want to create "recovery mode", it needs 4 partition 1. Default Boot partition 2. Default Root partition 3. Secondary Boot partition 4. Secondary Root partition Partition [3] should be copied from partition [1] and partition [4] should be copied from partition [2]. I've configured the systemd-repart to run in initrd, I've also configured udev rules to create symlink to device node: 1. /dev/gpt-part-boot -> /dev/nvme0n1p1 2. /dev/gpt-part-root -> /dev/nvme0n1p2 (mounted on /sysroot, systemd-repart need this path because it's hardcoded in the source code) But when I specify CopyBlocks=/dev/gpt-part-boot in the repart.d conf file, it failed with this error message: "Failed to open '/dev/gpt-part-boot': No such file or directory" The systemd-repart failed in initrd, but then it will run again after switch-root, and it works fine. Any hints? I want the systemd-repart to run fine in initrd, not after switch-root. Thank you.