I have a small arm server that runs Arch. I wanted to use only dhcpcd for my ethernet connection so I disabled netctl.service and netctl-ifplugd.service. Turns out that didn't work and I have no means of connecting to the machine anymore.
Did you make sure to enable dhcpcd after disabling netctl?
How can I "systemctl enable netctl.service" by manipulating files and/or symlinking files on that usb?
The equivalent alternative question is, what does "systemctl enable netctl.service" do?
All systemctl enable
does is create symlinks from /usr/lib/systemd/system/
or /etc/systemd/system/
to the appropriate target directories in /etc/systemd/system/
, with services in the latter directory overriding ones in the former.
From the systemctl(1) manpage:
enable NAME...
Enable one or more unit files or unit file instances, as
specified on the command line. This will create a number
of symlinks as encoded in the "[Install]" sections of the
unit files.
Instead of using systemctl enable
you could enable the netctl service manually with the following command:
ln -s /usr/lib/systemd/system/netctl.service \
/etc/systemd/system/multi-user.target.wants/netctl.service
And to disable it manually you could use the following command to remove the symlink created with the previous ln
command:
rm /etc/systemd/system/multi-user.target.wants/netctl.service
The appropriate target directory can be found by looking for the WantedBy
setting in the [Install]
section of the service file in question, though older service files sometimes has Alias
instead of WantedBy
and you may want to switch to using WantedBy
instead, but either will work just as well.
Instead of reverting to using netctl you could first check that the dhcpcd service was enabled properly, and if it was you can use journalctl
's --directory
or --root
flags to check the logs of the dhcpcd service after mounting the filesystem on your other machine and see if that can give any clues as to why it failed to work properly.
systemctl enable netctl && systemctl start netctl
, orsystemctl enable dhcpd && systemctl start dhcpd
from the machine you can't connect to.