From: Alberto Planas Date: Thu, 24 Apr 2025 13:57:56 +0000 (+0200) Subject: repart: use --append-fstab=auto if available X-Git-Tag: v26~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=585a47705dfc9b366030e5947fa219bbd8fda56b;p=thirdparty%2Fmkosi.git 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 --- 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)]