0

I am newby to ubuntu, trying to install ubuntu-server 20.04. During my 1st installation, the network was working good. Per my memory, there was a "enxxx" item at Network Connections page, but I deleted it somehow when I was messing with it.

For some reasons, I have to reinstall the system, but this time I can't find the item indicating the ethernet card. Worse, I can't get any tool since no access to the Internet after installation, say, sudo apt-get install ifconfig is impossible.

I hv tried edit the netplan /etc/netplan, as the answer suggested. also I'd checked the bios, the mac of the ethernet is there.

Please advise how I can solve this issue, or any hint is most welcome. Thanks.

btw, the newly-installed system even doesn't know auto command.

the regular network connection page

Screen when installing Screen when installing

result for ip a ip a

result for lshw lshw

result for lspci lspci

I can find the ethernet controller with sudo lshw -class Net but can't make it work.

lshw -class Net

for better understanding, here is my lshw -c network and netplan

  *-network UNCLAIMED
       description: Ethernet controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 1f.6
       bus info: pci@0000:00:1f.6
       version: 11
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list
       configuration: latency=0
       resources: memory:53300000-5331ffff

netplan

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
Lorenz Keel
  • 9,511

1 Answers1

0

This assumes that you're installing Ubuntu Server 20.04...

Confirm that /etc/network/interfaces (if it exists) contains only this:

auto lo
iface lo inet loopback

Confirm that /etc/NetworkManager/NetworkManager.conf contains this:

[ifupdown]
managed=false

We'll change /etc/netplan/*.yaml...

cd /etc/netplan # change directory

ls -al # find the filename

sudo pico the_filename_shown_above.yaml # edit the file

Change this:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

To this:

# Let systemd-networkd manage all devices on this system
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: true

Save the file.

sudo netplan generate

sudo netplan apply

reboot

heynnema
  • 73,649