I tried to upgrade from Ubuntu 16.04 to 18.04 using the do-release-upgrade
command and post upgrade DNS resolution is failing. My actual intention is to go to 20.04, but since I am on 16.04, I have to go to 18.04 first.
Ping works fine for the google IP but DNS alone fails. I added nameserver 8.8.8.8
in /etc/resolv.conf
and /etc/resolvconf/resolv.conf.d/head
based on solution provided in No internet after upgrade from 16.04 to 18.04, but when I try to restart networking (sudo /etc/init.d/networking restart), it fails with the below error:
Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "journalctl -xe" for details.
failed!
systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2023-09-05 08:25:00 IST; 22s ago
Docs: man:interfaces(5)
Process: 4082 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 4070 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
Main PID: 4082 (code=exited, status=1/FAILURE)
How to fix this? Or is there a way to do a clean upgrade again which will fix all these issues?