You are not logged in.
Hello everyone,
First and foremost, I used Arch for around two years as a daily Desktop and it has been great. I recently came across the possibility to use docker-like machine with systemd-nspawn. In order to try it and simplify the network configuration, I read it was recommended to use systemd-networkd. As I was already using Network Manager, I have disabled it, removed any configuration files and then uninstalled it with pacman.
I have then configured only one network card with dhcp and start the service systemd-networkd. Everything work great, but the problem is, despite also having enabled the service, it doesn't start at boot. It seems it does not even try to start, as I am unable to find any network related message in journalctl. But if I manually start systemd-networkd OR network-online.target, then network work fines, which would prove that the problem does not come from misconfiguration.
I mentioned network-online.target because I suspect this target is never reached during boot process but can't be sure of that (I am not an expert at all of systemd). I tried to add this target in multi-user.target without success
Unfortunately, I didn't find any helpful help on the Web, so if someone has already experienced the same problem and found a solution, or a workaround, it would be greatly appreciated. I have triple checked that there is no other network manager
Anyway, here are everything that I can share, note network have obviously already been started, so no point to showing status. But before it shows as Inactive (Dead) despite being enabled:
02:34|root@arch:system $ systemctl list-unit-files | grep enabled
ckb-next-daemon.service enabled disabled
getty@.service enabled enabled
lm_sensors.service enabled disabled
sddm.service enabled disabled
systemd-fsck-root.service enabled-runtime disabled
systemd-homed.service disabled enabled
systemd-networkd-wait-online.service enabled disabled
systemd-networkd.service enabled enabled
systemd-pstore.service disabled enabled
systemd-remount-fs.service enabled-runtime disabled
systemd-resolved.service disabled enabled
systemd-timesyncd.service enabled enabled
systemd-userdbd.socket disabled enabled
machines.target disabled enabled
network-online.target enabled disabled
reboot.target disabled enabled
remote-cryptsetup.target disabled enabled
remote-fs.target enabled enabled
fstrim.timer enabled disabled
02:36|root@arch:system $ ls -l /etc/systemd/system
total 5
lrwxrwxrwx 1 root root 48 juil. 7 21:11 dbus-org.freedesktop.network1.service -> /usr/lib/systemd/system/systemd-networkd.service
lrwxrwxrwx 1 root root 49 juil. 4 22:42 dbus-org.freedesktop.timesync1.service -> /usr/lib/systemd/system/systemd-timesyncd.service
lrwxrwxrwx 1 root root 36 déc. 31 2019 display-manager.service -> /usr/lib/systemd/system/sddm.service
drwxr-xr-x 2 root root 1024 déc. 31 2019 getty.target.wants
drwxr-xr-x 2 root root 1024 juil. 7 22:08 multi-user.target.wants
drwxr-xr-x 2 root root 1024 juil. 7 21:11 network-online.target.wants
drwxr-xr-x 2 root root 1024 juil. 4 22:42 sysinit.target.wants
drwxr-xr-x 2 root root 1024 mars 23 2020 timers.target.wants
02:36|root@arch:system $ ls -l /etc/systemd/system/multi-user.target.wants/
total 0
lrwxrwxrwx 1 root root 47 janv. 28 2020 ckb-next-daemon.service -> /usr/lib/systemd/system/ckb-next-daemon.service
lrwxrwxrwx 1 root root 42 févr. 10 2020 lm_sensors.service -> /usr/lib/systemd/system/lm_sensors.service
lrwxrwxrwx 1 root root 45 juil. 7 21:48 network-online.target -> /usr/lib/systemd/system/network-online.target
lrwxrwxrwx 1 root root 40 déc. 31 2019 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 48 juil. 7 21:11 systemd-networkd.service -> /usr/lib/systemd/system/systemd-networkd.service
02:36|root@arch:system $ ls -l /etc/systemd/system/network-online.target.wants/
total 1
lrwxrwxrwx 1 root root 60 juil. 7 21:11 systemd-networkd-wait-online.service -> /usr/lib/systemd/system/systemd-networkd-wait-online.service
I don't know if it is worth mentioning, but I use KDE Plasma as DE and so sddm as login manager
This is my first post here and English is not my mother tongue, so feel free to correct me
Last edited by Django_Vega (2021-07-08 16:58:13)
Offline
Please post your system journal:
sudo journalctl -b
(if you ran journalctl w/o being root or in some admin group, it'll only show the session journal)
Online
Message removed
Last edited by Django_Vega (2021-07-08 17:04:23)
Offline
Hello,
I have had an Eureka moment and found the root cause of the problem. It was totally unrelated to systemd-networkd, just my plain stupidity. Some days ago, before I have switched network manager, I did replace a hard drive, and did copy some files on a the ssd where / is located. Unfortunately, the /etc of the previous hard drive is mounted before the true /etc So systemd was using the old /etc for boot process and then mount new /etc so that's why I find my network configuration files intact and had no problem to manually start the service
My bad for the time wasted, and thanks for trying to help me
Have a good day
[edit:grammar]
Last edited by Django_Vega (2021-07-08 17:06:19)
Offline
I just noticed that you posted "ls -l /etc/systemd/system" and that there doesn't seem to be
file /usr/lib/systemd/system/systemd-networkd.service
what raises the question how systemd-networkd is started tobegin with (and why that's not there)
pacman -Qikk systemd
if I manually start systemd-networkd
The service or the executable?
Edit: solved before I posted…
Last edited by seth (2021-07-08 17:07:59)
Online