Saturday, January 19, 2013

Arch Linux: eth0 Down on Boot

I finally decided to give Arch a try after a handful of people recommending it to me. Having never installed it before I followed along with their Beginners' Guide in the wiki. Everything went smoothly through the installation all the way up to rebooting the system. After the reboot I started to go about installing programs I would need, but found that I had no internet connection. First I wanted to see what ip would say about my wired connection:
aerotachyon % ip link
In the output I noticed 2 things:
  1. The interface was down
  2. The interface was named enp2s0
The first one I expected, but the second I did not because on installation it was know as eth0. I assume this has to do with udev naming networking interfaces differently than in the past, as noted in the installation guide, but I expected it to happen when I booted off the installation disk.

To fix this, I went back to the networking part of the guide looking for where I set up eth0. The command I had issued was:
aerotachyon % systemctl enable dhcpcd@eth0.service
I had to disable eth0 first then enable enp2s0 using the following two commands:
aerotachyon % systemctl disable dhcpcd@eth0.service
aerotachyon % systemctl enable dhcpcd@enp2s0.service
From my understanding this should have worked, but after rebooting I still had the same issue. I had noticed after issuing the enable command a file was created.
aerotachyon % ls /etc/systemd/system/multi-user.target.wants/ dhcpcd@eth0.service
The relevant file should have been for the enp2s0 but, as indicated by it's file name, it was for eth0. All that was needed to correct the problem was changing the file name to:
dhcpcd@enp2s0.service
After a quick reboot to confirm, I was good to go.