Skip to content

sysupdate: Unfixable error Source Type= must be one of url-file, url-tar, tar, regular-file, directory, subvolume. #42783

Description

@m-kuzmin

systemd version the issue has been seen with

260.1, 260.2 (was working on 259.3)

Used distribution

NixOS

Linux kernel version used

6.18.35

CPU architectures issue was seen on

x86_64

Component

other

Expected behaviour you didn't see

Given this 50-root.transfer file, running systemd-sysupdate should update the image to the newer version:

[Source]
Type=regular-file
MatchPattern[email protected]%a.raw
Path=/
PathRelativeTo=explicit

[Target]
MatchPartitionType=root
MatchPattern=fooOS-root_@v
Path=auto
Type=partition

[Transfer]
ProtectVersion=1

Unexpected behaviour you saw

The command fails with:

$ systemd-sysupdate update --definitions /etc/sysupdate.d --transfer-source . --image fooOS.raw
/run/systemd/mount-rootfs/etc/sysupdate.d/50-root.transfer:1: Source Type= must be one of url-file, url-tar, tar, regular-file, directory, subvolume.

Steps to reproduce the problem

I've created a bare-minimum example repository at https://github.com/m-kuzmin/sysupdate.example. It includes a Justfile to automate the commands. Using just flash update 2 on version 259.3, works as expected:

✨ Successfully installed update '2'.

After updating to the next available version of sysupdate on Cachix, the update fails with the following error:

nix develop . --override-input nixpkgs nixpkgs/01fbdeef22b76df85ea168fbfe1bfd9e63681b30 --command just flash update 2
...
systemd-sysupdate update --definitions /etc/sysupdate.d --transfer-source . --image fooOS.raw
/run/systemd/mount-rootfs/etc/sysupdate.d/50-root.transfer:1: Source Type= must be one of url-file, url-tar, tar, regular-file, directory, subvolume.
error: Recipe `update` failed on line 33 with exit code 1

The same issue occurs with version 260.2.

Additional program output to the terminal or log subsystem illustrating the issue

rm -f fooOS_1{,.root-*}.raw
systemd-repart -s v1 --definitions v1/repart.d --empty create --size auto --split true fooOS_1.raw
Failed to find TPM2 pcrlock policy file 'pcrlock.json': No such file or directory
Loaded shared library 'libcryptsetup.so.12' via dlopen().
Pre-populating ext4 filesystem of partition 50-root.conf twice to calculate minimal partition size
loop1: Acquired exclusive lock.
Successfully acquired /dev/loop1, devno=7:1, nr=1, diskseq=887
Formatting /dev/loop1 as ext4
Executing mkfs command: mkfs.ext4 -L fooOS-root_1 -U 8c323116-d99d-4c7f-8c66-fd3d3157a25d -I 256 -m 0 -E discard,lazy_itable_init=1,hash_seed=8c323116-d99d-4c7f-8c66-fd3d3157a25d -b 4096 -T default /dev/loop1
Successfully forked off '(mkfs)' as PID 742722.
mke2fs 1.47.3 (8-Jul-2025)
Discarding device blocks: done
Creating filesystem with 268435456 4k blocks and 67108864 inodes
Filesystem UUID: 8c323116-d99d-4c7f-8c66-fd3d3157a25d
Superblock backups stored on blocks:
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
	102400000, 214990848

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

'(mkfs)' succeeded.
/dev/loop1 successfully formatted as ext4 (label "fooOS-root_1", uuid 8c323116-d99d-4c7f-8c66-fd3d3157a25d)
Populating ext4 filesystem.
Loaded shared library 'libmount.so.1' via dlopen().
Successfully forked off '(sd-copy)' as PID 742724.
Mounting /dev/loop1 (ext4) on /run/systemd/mount-root (MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_NOATIME "")...
'(sd-copy)' succeeded.
Successfully populated ext4 filesystem.
Minimal partition size of ext4 filesystem of partition 50-root.conf is 32M
loop1: Acquired exclusive lock.
Successfully acquired /dev/loop1, devno=7:1, nr=1, diskseq=890
Formatting /dev/loop1 as ext4
Executing mkfs command: mkfs.ext4 -L fooOS-root_1 -U c4a2d744-89b1-43aa-82c6-0b804aeaea3f -I 256 -m 0 -E discard,lazy_itable_init=1,hash_seed=c4a2d744-89b1-43aa-82c6-0b804aeaea3f -b 4096 -T default /dev/loop1
Successfully forked off '(mkfs)' as PID 742731.
mke2fs 1.47.3 (8-Jul-2025)
Discarding device blocks: done
Creating filesystem with 8192 4k blocks and 2048 inodes

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

'(mkfs)' succeeded.
/dev/loop1 successfully formatted as ext4 (label "fooOS-root_1", uuid c4a2d744-89b1-43aa-82c6-0b804aeaea3f)
Populating ext4 filesystem.
Successfully forked off '(sd-copy)' as PID 742732.
Mounting /dev/loop1 (ext4) on /run/systemd/mount-root (MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_NOATIME "")...
'(sd-copy)' succeeded.
Successfully populated ext4 filesystem.
Automatically determined minimal disk image size as 33M.
Sized 'fooOS_1.raw' to 33M.
Not resizing partition table, as there currently is none.
Sector size of device is 512 bytes. Using default filesystem sector size of 4096 and grain size of 4096.
TYPE        LABEL        UUID                                 PART FILE         NODE          OFFSET OLD SIZE RAW SIZE    SIZE OLD PADDING RAW PADDING PADDING ACTIVITY
root-x86-64 fooOS-root_1 5dec8bff-9acf-41c0-9ee7-6e8a6eadb39f    0 50-root.conf fooOS_1.raw1 1048576        0 33554432   → 32M 0                     0    → 0B create
                                                                                                                       Σ = 32M                          Σ = 0B

 ░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░
       └─ 50-root.conf

Applying changes to fooOS_1.raw.
Copying in '/tmp/nix-shell.GLX0dZ/.#repart5b66134ba92b65e0' (32M) on block level into future partition 0.
Copying in of '/tmp/nix-shell.GLX0dZ/.#repart5b66134ba92b65e0' on block level completed.
Syncing future partition 0 contents to disk.
Block level copying and synchronization of partition 0 complete in 131.703ms.
Adding new partition 0 to partition table.
Writing new partition table.
Not telling kernel to reread partition table, since we are not operating on a block device.
All done.
rm -f fooOS.raw
systemd-repart --image fooOS_1.raw --definitions repart.d --empty create --size auto fooOS.raw
Failed to find TPM2 pcrlock policy file 'pcrlock.json': No such file or directory
Loaded shared library 'libcryptsetup.so.12' via dlopen().
Opened fooOS_1.raw in O_RDONLY access mode, with O_DIRECT enabled.
Determined sector size 512 based on discovered partition table.
loop1: Acquired exclusive lock.
Successfully acquired /dev/loop1, devno=7:1, nr=1, diskseq=893
Loaded shared library 'libblkid.so.1' via dlopen().
Kernel was quicker than us in adding partition 1.
Dissecting root partition with label fooOS-root_1 and UUID 5dec8bff-9acf-41c0-9ee7-6e8a6eadb39f.
Opened /dev/loop1p1 (fd=5, whole_block_devnum=7:1, diskseq=893).
Found for designator root: encrypted+encryptedwithintegrity+unprotected+unused.
Found for designator usr: absent.
Found for designator home: absent.
Found for designator srv: absent.
Found for designator esp: absent.
Found for designator xbootldr: absent.
Found for designator swap: absent.
Found for designator root-verity: absent.
Found for designator usr-verity: absent.
Found for designator root-verity-sig: absent.
Found for designator usr-verity-sig: absent.
Found for designator tmp: absent.
Found for designator var: absent.
Probed fstype 'ext4' on partition /dev/loop1p1.
Loaded shared library 'libmount.so.1' via dlopen().
Mounting /proc/self/fd/5 (ext4) on /run/systemd/mount-rootfs (MS_RDONLY|MS_NODEV "norecovery")...
No machine ID set, using randomized partition UUIDs.
Automatically found partition 259:10 of right type 4f68bce3e8cd4db196e7fbcaf984b709.
Automatically determined minimal disk image size as 201M.
Sized 'fooOS.raw' to 201M.
Not resizing partition table, as there currently is none.
Sector size of device is 512 bytes. Using default filesystem sector size of 4096 and grain size of 4096.
TYPE        LABEL        UUID                                 PART FILE           NODE          OFFSET OLD SIZE  RAW SIZE     SIZE OLD PADDING RAW PADDING PADDING ACTIVITY
root-x86-64 fooOS-root_1 5dec8bff-9acf-41c0-9ee7-6e8a6eadb39f    0 50-root-a.conf fooOS.raw1   1048576        0 104857600   → 100M 0                     0    → 0B create
root-x86-64 _empty       7546417c-409e-447c-8254-b273fcf9a6c8    1 51-root-b.conf fooOS.raw2 105906176        0 104857600   → 100M 0                     0    → 0B create
                                                                                                                          Σ = 200M                          Σ = 0B

 ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░
  │                                                                                                              └─ 51-root-b.conf
  └─ 50-root-a.conf

Applying changes to fooOS.raw.
Copying in '/dev/loop1p1' (32M) on block level into future partition 0.
Copying in of '/dev/loop1p1' on block level completed.
Syncing future partition 0 contents to disk.
Block level copying and synchronization of partition 0 complete in 248.368ms.
Adding new partition 0 to partition table.
Adding new partition 1 to partition table.
Writing new partition table.
Not telling kernel to reread partition table, since we are not operating on a block device.
All done.
rm -f fooOS_2{,.root-*}.raw
systemd-repart -s v2 --definitions v2/repart.d --empty create --size auto --split true fooOS_2.raw
Failed to find TPM2 pcrlock policy file 'pcrlock.json': No such file or directory
Loaded shared library 'libcryptsetup.so.12' via dlopen().
Pre-populating ext4 filesystem of partition 50-root.conf twice to calculate minimal partition size
loop1: Acquired exclusive lock.
Successfully acquired /dev/loop1, devno=7:1, nr=1, diskseq=895
Formatting /dev/loop1 as ext4
Executing mkfs command: mkfs.ext4 -L fooOS-root_2 -U 938de11b-4a62-4af3-9787-2b513041a9c1 -I 256 -m 0 -E discard,lazy_itable_init=1,hash_seed=938de11b-4a62-4af3-9787-2b513041a9c1 -b 4096 -T default /dev/loop1
Successfully forked off '(mkfs)' as PID 742740.
mke2fs 1.47.3 (8-Jul-2025)
Discarding device blocks: done
Creating filesystem with 268435456 4k blocks and 67108864 inodes
Filesystem UUID: 938de11b-4a62-4af3-9787-2b513041a9c1
Superblock backups stored on blocks:
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
	102400000, 214990848

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

'(mkfs)' succeeded.
/dev/loop1 successfully formatted as ext4 (label "fooOS-root_2", uuid 938de11b-4a62-4af3-9787-2b513041a9c1)
Populating ext4 filesystem.
Loaded shared library 'libmount.so.1' via dlopen().
Successfully forked off '(sd-copy)' as PID 742742.
Mounting /dev/loop1 (ext4) on /run/systemd/mount-root (MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_NOATIME "")...
'(sd-copy)' succeeded.
Successfully populated ext4 filesystem.
Minimal partition size of ext4 filesystem of partition 50-root.conf is 32M
loop1: Acquired exclusive lock.
Successfully acquired /dev/loop1, devno=7:1, nr=1, diskseq=898
Formatting /dev/loop1 as ext4
Executing mkfs command: mkfs.ext4 -L fooOS-root_2 -U c4a2d744-89b1-43aa-82c6-0b804aeaea3f -I 256 -m 0 -E discard,lazy_itable_init=1,hash_seed=c4a2d744-89b1-43aa-82c6-0b804aeaea3f -b 4096 -T default /dev/loop1
Successfully forked off '(mkfs)' as PID 742746.
mke2fs 1.47.3 (8-Jul-2025)
Discarding device blocks: done
Creating filesystem with 8192 4k blocks and 2048 inodes

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

'(mkfs)' succeeded.
/dev/loop1 successfully formatted as ext4 (label "fooOS-root_2", uuid c4a2d744-89b1-43aa-82c6-0b804aeaea3f)
Populating ext4 filesystem.
Successfully forked off '(sd-copy)' as PID 742747.
Mounting /dev/loop1 (ext4) on /run/systemd/mount-root (MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_NOATIME "")...
'(sd-copy)' succeeded.
Successfully populated ext4 filesystem.
Automatically determined minimal disk image size as 33M.
Sized 'fooOS_2.raw' to 33M.
Not resizing partition table, as there currently is none.
Sector size of device is 512 bytes. Using default filesystem sector size of 4096 and grain size of 4096.
TYPE        LABEL        UUID                                 PART FILE         NODE          OFFSET OLD SIZE RAW SIZE    SIZE OLD PADDING RAW PADDING PADDING ACTIVITY
root-x86-64 fooOS-root_2 5dec8bff-9acf-41c0-9ee7-6e8a6eadb39f    0 50-root.conf fooOS_2.raw1 1048576        0 33554432   → 32M 0                     0    → 0B create
                                                                                                                       Σ = 32M                          Σ = 0B

 ░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░
       └─ 50-root.conf

Applying changes to fooOS_2.raw.
Copying in '/tmp/nix-shell.GLX0dZ/.#repart33686ad322b78db0' (32M) on block level into future partition 0.
Copying in of '/tmp/nix-shell.GLX0dZ/.#repart33686ad322b78db0' on block level completed.
Syncing future partition 0 contents to disk.
Block level copying and synchronization of partition 0 complete in 135.947ms.
Adding new partition 0 to partition table.
Writing new partition table.
Not telling kernel to reread partition table, since we are not operating on a block device.
All done.
systemd-sysupdate update --definitions /etc/sysupdate.d --transfer-source . --image fooOS.raw
Opened fooOS.raw in O_RDWR access mode, with O_DIRECT enabled.
Determined sector size 512 based on discovered partition table.
loop1: Acquired exclusive lock.
Successfully acquired /dev/loop1, devno=7:1, nr=1, diskseq=901
Loaded shared library 'libblkid.so.1' via dlopen().
Kernel was quicker than us in adding partition 1.
Dissecting root partition with label fooOS-root_1 and UUID 5dec8bff-9acf-41c0-9ee7-6e8a6eadb39f.
Opened /dev/loop1p1 (fd=5, whole_block_devnum=7:1, diskseq=901).
Kernel was quicker than us in adding partition 2.
Found for designator root: encrypted+encryptedwithintegrity+unprotected+unused.
Found for designator usr: absent.
Found for designator home: absent.
Found for designator srv: absent.
Found for designator esp: absent.
Found for designator xbootldr: absent.
Found for designator swap: absent.
Found for designator root-verity: absent.
Found for designator usr-verity: absent.
Found for designator root-verity-sig: absent.
Found for designator usr-verity-sig: absent.
Found for designator tmp: absent.
Found for designator var: absent.
Probed fstype 'ext4' on partition /dev/loop1p1.
Successfully forked off '(fsck)' as PID 742751.
'fsck' succeeded.
Mounting /proc/self/fd/5 (ext4) on /run/systemd/mount-rootfs (MS_NODEV "")...
Resizing "/run/systemd/mount-rootfs" to 104857600 bytes...
Successfully resized "/run/systemd/mount-rootfs" to 100M bytes.
Skipping file '/run/systemd/mount-rootfsetc/sysupdate.d/50-root.transfer', suffix is not '.feature'.
/run/systemd/mount-rootfs/etc/sysupdate.d/50-root.transfer:1: Source Type= must be one of url-file, url-tar, tar, regular-file, directory, subvolume.
Loaded shared library 'libmount.so.1' via dlopen().
error: Recipe `update` failed on line 33 with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Programming errors, that need preferential fixingsysupdate

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions