From: Daan De Meyer Date: Wed, 20 Sep 2023 21:03:56 +0000 (+0200) Subject: Networking improvements X-Git-Tag: v18~48^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a987a95eee48b07047f2b18fdc0f5065b84c699;p=thirdparty%2Fmkosi.git Networking improvements - ip= is also parsed by the kernel and can cause significant boot delays. We can avoid these delays by passing ip=none as the final value which doesn't affect network-generator but does disable the kernel auto-probing. - Pull in network.target instead of network-online.target. This makes sure that systemd-networkd is started without introducing boot delays because we're waiting for an IP address to appear. --- diff --git a/mkosi/config.py b/mkosi/config.py index f2341464c..e91da6739 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -2178,13 +2178,13 @@ def load_kernel_command_line_extra(args: argparse.Namespace) -> list[str]: f"systemd.tty.rows.ttyS0={lines}", "console=ttyS0", # Make sure we set up networking in the VM/container. - "systemd.wants=network-online.target", + "systemd.wants=network.target", # Make sure we don't load vmw_vmci which messes with virtio vsock. "module_blacklist=vmw_vmci", ] if not any(s.startswith("ip=") for s in args.kernel_command_line_extra): - cmdline += ["ip=enp0s1:any", "ip=enp0s2:any", "ip=host0:any"] + cmdline += ["ip=enp0s1:any", "ip=enp0s2:any", "ip=host0:any", "ip=none"] if not any(s.startswith("loglevel=") for s in args.kernel_command_line_extra): cmdline += ["loglevel=4"]