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 [email protected] 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?

1
  • lo is a loopback interface. Commented Aug 24, 2013 at 19:03

2 Answers 2

11

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/[email protected]' '/etc/systemd/system/multi-user.target.wants/[email protected]'
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

8
  • 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 Commented Aug 24, 2013 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/… Commented Aug 25, 2013 at 1:20
  • 1
    6/2/14, almost a year later and this works for me. Thank you. Commented Jun 2, 2014 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/… Commented Dec 5, 2014 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? Commented Dec 27, 2018 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 [email protected] has a typo. Should be enp0s3. Explains your No such file or directory error ;)

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.