Score:2

No network from minimum net install

mx flag
xpt
  • I did a minimum net install, but my new system is not starting the network automatically -- No IP address with my eth0 device.
  • I installed dhclient package myself but that doesn't help. I thought it should have been taken care of by the post-install of the dhclient package.
  • Searching for the answer myself, I found this page, hinting that I have to write such systemd unit for myself.
  • If so, I have to first understand what's systemd unit activate vs enable, whereas previously in init5, all I need to do is to install a service package and its post-install will take care of enabling the service itself.

All these have been way too complicated than it should, I believe. Somebody help please.

UPDATE:

OK, maybe the reason is that this is a minimum net install, and I don't have all those things required. Here is more info:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:0c:29:56:d8:4c brd ff:ff:ff:ff:ff:ff
    altname enp2s1
    altname ens33

$ ls /etc/netplan
ls: cannot access '/etc/netplan': No such file or directory

$ sudo service NetworkManager status
Unit NetworkManager.service could not be found.

$ ls /usr/lib/systemd/system/dhcpcd.service
ls: cannot access '/usr/lib/systemd/system/dhcpcd.service': No such file or directory

But still, if I run dhclient myself manually, I will get IP under such minimum install. I.e., the NetworkManager is not absolutely necessary, I hope. And I hope there is a fix for situation like this, whether using dhcpcd or dhclient.

guiverc avatar
cn flag
What OS & release are you asking about?
mx flag
xpt
The 20.04 LTS @guiverc
chili555 avatar
cn flag
Please edit your question to show the result of these terminal commands: `ip a` and also: `cat /etc/netplan/*.yaml` and finally: `sudo service NetworkManager status | grep Active` I doubt that a post on an Arch forum that is nine years old is valid here.
mx flag
xpt
Thanks @chili555, basically, this is a minimum net install, and I don't have all those things you requested. See my updated OP.
Score:2
th flag

You don't have network-manager installed, so your host cannot obtain an IP address. You have two choices: 1) manually configure the eth0 interface in /etc/network/interfaces or 2) install network-manager

  1. Manually Configure

cd /etc/network/

nano interfaces

Add these lines at the bottom:

auto eth0

iface eth0 inet dhcp

  1. Install Network Manager

sudo apt install network-manager

After whichever approach you choose, reboot the machine. Do not do both, as network-manager will ignore what's in interfaces once enabled. Tested and confirmed Ubuntu 20.x and Debian Bullseye.

mx flag
xpt
Third option would be Installing the `dhcpcd`, and it got my IP fixed, so the NetworkManager is not absolutely necessary. But I'll upvote for you.
oemb1905 avatar
th flag
@xpt ideally, a static configuration in interfaces would better than all three, especially if this is public facing as you don’t want to just blindly accept dhcp server solicitations … but yeah that works too, since it is the dhcp portion of network manager, but likely that’s less skinny than a simple configuration if space and minimalism is your intent. ;)
chili555 avatar
cn flag
I believe that /etc/network/interfaces is deprecated in 20.04 in favor of netplan.
oemb1905 avatar
th flag
This is legacy fix for sure, but it’s for a minimal install, still works, and is very elegant.
oemb1905 avatar
th flag
Also, interfaces is only deprecated on desktop Ubuntu, not server Ubuntu and/or Debian.
Score:1
mx flag
xpt

Installing the dhcpcd got my IP, but only for IPv6, no IPv4 address. So I'm closing this one and opening another one for that instead.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.