From 090a607919116d9f40b74260f5bceb1eac045da6 Mon Sep 17 00:00:00 2001 From: Alberto Planas Date: Thu, 24 Apr 2025 15:57:56 +0200 Subject: [PATCH] repart: use --append-fstab=auto if available When generating images there is a chance that a pre-existent /etc/fstab is present in the mkosi buildroot. systemd-repart can merge the already existing fstab with the one generated, separating the sections in a way that the systemd-repart can be reused several times. Signed-off-by: Alberto Planas --- mkosi/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 17de70603..5f97fa642 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -3401,6 +3401,8 @@ def make_image( "--generate-fstab=/etc/fstab", "--generate-crypttab=/etc/crypttab", ] + if tabs and systemd_tool_version("systemd-repart", sandbox=context.sandbox) >= 258: + cmdline += ["--append-fstab=auto"] for d in definitions: cmdline += ["--definitions", workdir(d)]