From: Daan De Meyer Date: Thu, 19 Feb 2026 13:00:52 +0000 (+0100) Subject: Stop setting hostname via kernel command line X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4183%2Fhead;p=thirdparty%2Fmkosi.git Stop setting hostname via kernel command line This overrides the hostname from other sources, such as the nspawn config file. Given we have DEFAULT_HOSTNAME= now, let's have users use that and stop setting it explicitly ourselves. --- diff --git a/mkosi/qemu.py b/mkosi/qemu.py index 60db6e01e..dc84644c9 100644 --- a/mkosi/qemu.py +++ b/mkosi/qemu.py @@ -789,12 +789,6 @@ def finalize_kernel_command_line_extra(args: Args, config: Config) -> list[str]: if not any(s.startswith("SYSTEMD_SULOGIN_FORCE=") for s in config.kernel_command_line_extra): cmdline += ["SYSTEMD_SULOGIN_FORCE=1"] - if ( - not any(s.startswith("systemd.hostname=") for s in config.kernel_command_line_extra) - and config.machine - ): - cmdline += [f"systemd.hostname={config.machine}"] - if args.verb != Verb.boot: columns, lines = shutil.get_terminal_size() term = finalize_term()