From: Pyfisch Date: Sun, 11 Sep 2022 18:36:26 +0000 (+0200) Subject: Start nspawn containers with read/write permissions X-Git-Tag: v14~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61dab52b90b1393b7c3391dac3ae8556059a11ea;p=thirdparty%2Fmkosi.git Start nspawn containers with read/write permissions Don't set the --read-only flag for nspawn containers if just the root partition is read-only. Don't set the --volatile=overlay flag for images created with usr-only or a generated root. If the --volatile=overlay flag is set the container won't find the shell or init program. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 333a3ea53..0afc9ef19 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -7534,9 +7534,6 @@ def run_shell_cmdline(config: MkosiConfig, pipe: bool = False, commands: Optiona cmdline = [nspawn_executable(), "--quiet", target] - if config.read_only: - cmdline += ["--read-only"] - # If we copied in a .nspawn file, make sure it's actually honoured if config.nspawn_settings is not None: cmdline += ["--settings=trusted"] @@ -7551,9 +7548,6 @@ def run_shell_cmdline(config: MkosiConfig, pipe: bool = False, commands: Optiona if nspawn_knows_arg(console_arg): cmdline += [console_arg] - if is_generated_root(config) or config.verity: - cmdline += ["--volatile=overlay"] - if config.netdev: if ensure_networkd(config): cmdline += ["--network-veth"]