]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
nspawn: Add --suppress-sync=yes by default
authorDaan De Meyer <daan@amutable.com>
Thu, 19 Feb 2026 10:28:55 +0000 (11:28 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 19 Feb 2026 11:27:35 +0000 (12:27 +0100)
We're doing development containers, so making sure changes actually
hit the disk isn't all that important. Let's add --suppress-sync=yes
by default to speed things up. This prevents
systemd-machine-id-commit.service from delaying the boot by 5s every
first boot of a container.

mkosi/__init__.py

index b18c6ae4085988741152c3e2bdc0d5b596f74271..2349d63391f4c6a812288f8e2760897f5b13e67b 100644 (file)
@@ -4260,7 +4260,7 @@ def run_shell(args: Args, config: Config) -> None:
     if config.output_format.use_outer_compression() and config.compress_output:
         die(f"Cannot {opname} compressed {config.output_format} images with systemd-nspawn")
 
-    cmdline: list[PathString] = ["systemd-nspawn", "--quiet", "--link-journal=no"]
+    cmdline: list[PathString] = ["systemd-nspawn", "--quiet", "--link-journal=no", "--suppress-sync=yes"]
 
     if config.runtime_network == Network.user:
         cmdline += ["--resolv-conf=auto"]