DEV Community

ivnilv
ivnilv

Posted on

Missing network configuration on fresh Ubuntu Server offline installation

Installing Ubuntu Server 24.04 LTS in an offline mode (no LAN cable or WiFi connected) leaves you with an unmanaged network interface which requires manual configuration post-install.

The interface enp4s0 is unmanaged by systemd-networkd and also the service itself is disabled.

NOTE: This guide applies to Ubuntu server. On Ubuntu desktop you have the NetworkManager service installed and the steps would be different.

To fix the problem follow the steps below:

  • Create a Brand New Netplan Configuration File

Look into /etc/netplan. You will probably see the dir is empty. This means the installer completely gave up on configuring the network and didn't create any profiles. Create a new file, e.g. vim /etc/netplan/01-netcfg.yaml.

  • Paste the following configuration
network:
  version: 2
  renderer: networkd
  ethernets:
    enp4s0:
      dhcp4: true
Enter fullscreen mode Exit fullscreen mode

This makes the interface managed by networkd instead of the desktop NetworkManager.

  • Fix permissions
    The new file needs to be readable only by root so fix it's permissions chmod 600 /etc/netplan/01-netcfg.yaml.

  • Enable network service
    Enable the network service and make it start on boot:

systemctl enable systemd-networkd
systemctl start systemd-networkd
Enter fullscreen mode Exit fullscreen mode
  • Run netplan Finally, we need to tell Ubuntu to use our new configuration and activate the network
netplan generate
netplan apply
Enter fullscreen mode Exit fullscreen mode

Network should be up!

ip a
Enter fullscreen mode Exit fullscreen mode

Top comments (0)