From 64167ab768f829be02bf02e1cd202ff159bb036e Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 19 Feb 2026 14:00:52 +0100 Subject: [PATCH] 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. --- mkosi/qemu.py | 6 ------ 1 file changed, 6 deletions(-) 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() -- 2.47.3