From 37a99e76c0a929ce1d8c8d1f9659d1a36dae53da Mon Sep 17 00:00:00 2001 From: Vincent Dahmen Date: Mon, 29 Dec 2025 20:20:08 +0100 Subject: [PATCH 1/2] lib/network: adds symlink to configure systemd-resovled properly --- archinstall/lib/installer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 0021c9301e..064a13de50 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -754,6 +754,8 @@ def post_install_enable_iwd_service(*args: str, **kwargs: str) -> None: for psk in psk_files: shutil.copy2(psk, f'{self.target}/var/lib/iwd/{os.path.basename(psk)}') + # Add symlink to enable systemd-resolved + os.symlink('/run/systemd/resolve/stub-resolv.conf', f'{self.target}/etc/resolv.conf') # Copy (if any) systemd-networkd config files if netconfigurations := glob.glob('/etc/systemd/network/*'): if not os.path.isdir(f'{self.target}/etc/systemd/network/'): From a70e2bbadc52591a36401a31ba7692bcdc7f3609 Mon Sep 17 00:00:00 2001 From: Vincent Dahmen Date: Mon, 29 Dec 2025 20:49:01 +0100 Subject: [PATCH 2/2] lib/network: adds overwrite mechanism to enforce resolved symlink --- archinstall/lib/installer.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 064a13de50..e30d86b053 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -754,8 +754,13 @@ def post_install_enable_iwd_service(*args: str, **kwargs: str) -> None: for psk in psk_files: shutil.copy2(psk, f'{self.target}/var/lib/iwd/{os.path.basename(psk)}') - # Add symlink to enable systemd-resolved - os.symlink('/run/systemd/resolve/stub-resolv.conf', f'{self.target}/etc/resolv.conf') + # Enable systemd-resolved by (forcefully) setting a symlink + # For further details see https://wiki.archlinux.org/title/Systemd-resolved#DNS + resolv_config_path = Path(f'{self.target}/etc/resolv.conf') + if resolv_config_path.exists(): + os.unlink(resolv_config_path) + os.symlink('/run/systemd/resolve/stub-resolv.conf', resolv_config_path) + # Copy (if any) systemd-networkd config files if netconfigurations := glob.glob('/etc/systemd/network/*'): if not os.path.isdir(f'{self.target}/etc/systemd/network/'):