9

I have successfully installed Arch Linux on VirtualBox but the internet is not working in it. There was no issue with the internet connection during the installation but when I boot from the virtual hard drive (using syslinux bootloader) I'm unable to connect to the internet.

When I boot from the installation CD and mount the root partition and then use installed system from # arch-chroot internet works well without doing anything at all and # ip link shows two interfaces lo and eth0

When I try to use # systemctl enable dhcpcd@enp3s0.service command, it gives an error 'Operation failed: No such file or directory however # ip link says there are two interfaces lo and enp3s0.

I want to know why there are two different names for the same ethernet port? and more important how do I solve this problem?

10

Installing Archlinux as a Guest on Virtualbox

March 15, 2013 11:54 pm

Essentially, you can follow this guide, but there are several additional steps to take. https://wiki.archlinux.org/index.php/Installation_guide#Installation

To fix the network:

/usr/sbin/dhcpcd enp0s3 to check that you can load the dhcp client.
ln -s '/usr/lib/systemd/system/dhcpcd@.service' '/etc/systemd/system/multi-user.target.wants/dhcpcd@enp0s3.service'
change the references to eth0 in /etc/ifplugd/ifplugd.conf
create a profile for enp0s3 in /etc/network.d/interfaces by copying the example (this seems to be overwritten by the netcfg-auto-wired).
start and enable the auto service with systemctl

Remember that you can’t get packages from the net without the network :(

Relevant Links

Beginner’s Guide: https://wiki.archlinux.org/index.php/Beginners%27_guide#Installation
Fixing the network: https://bbs.archlinux.org/viewtopic.php?pid=1243601

  • This worked!!! but would you let me know why ethernet port is eth0 when i use arch-chroot and why enp0s3 when i boot from bootloader – Parth Parikh Aug 24 '13 at 19:20
  • 1
    Due to the new udev version, the devices will be renamed by default to names like enp0s3. This is not done by the kernel and no driver issue, just a renaming at boot time done by udev. Source: us.generation-nt.com/answer/… – vfbsilva Aug 25 '13 at 1:20
  • 1
    6/2/14, almost a year later and this works for me. Thank you. – Paul Nelson Baker Jun 2 '14 at 19:30
  • @vfbsilva If you want the eth0 instead of enp0s3 then you need to add net.ifnames=0 biosdevname=0 to every line that contains /boot/vmlinuz-linux in the file /boot/grub/grub.cfg So all those lines should be similar to linux /boot/vmlinuz-linux root=UUID=8bfcc0b4-e13e-4d56-8eb9-85cd22f950cb rw net.ifnames=0 biosdevname=0 quiet . But please note that the arch community strongly discourages this. see unix.stackexchange.com/questions/81834/… – enthusiasticgeek Dec 5 '14 at 17:48
  • @Matt this is arch linux, you setup the distro as you wish. Why would it be enabled by default is the right question. Why to load any service by dfefault in fact? – vfbsilva Dec 27 '18 at 2:33
7

I just ran into the same problem. Solution turned out simple: systemctl start dhcpcd.service

Everything (ping, pacman, etc.) started working after that.

BTW: # systemctl enable dhcpcd@enp3s0.service has a typo. Should be enp0s3. Explains your No such file or directory error ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.