Ubuntu – Problems with login in Ubuntu 18.04 – Failed to start Load Kernel Modules

18.04do-release-upgradekernel

I upgraded my Ubuntu release from 16.04 to 18.04 using sudo do-release-upgrade and following the instructions; the system boots correctly to the login page, but when I click on my user name, it says automatically (I do not enter any password) "Autentication error". Then the screen goes black in just a second and a message "Failed to start Load Kernel Modules" appears, along with many other lines:

Modules Load Error

So I restarted in recovery mode, used the root shell to run sudo systemctl status systemd-modules-load.service, and that's the result:

Modules Load Status

As suggested in many other topics (for example: What to do after Failed to start Load Kernel Modules), I tried to enter

apt-get update
apt-get dist-upgrade
apt-get -f install

but I get the message Could not resolve 'archive.ubuntu.com' (i.e., there is no internet connection), while for

dpkg --configure -a

I get dpkg: error: unable to access dpkg status area: Read-only file system.

Running ifconfig I see this result:

Ifconfig Output

so I cannot connect to any network.

I could appreciate any help in resolving this (I'm not an expert in Ubuntu)


EDIT:

Result from ifconfig -a:

ifconfig -a result

Best Answer

First thing you need to do in recovery mode is remount the main drive read/write:

sudo mount -o remount,rw /

Then you can try to reconfigure your packages:

sudo dpkg --configure -a

You might need to add a DNS server to connect to the internet:

sudo nano /etc/resolv.conf

and add the following to the end:

nameserver 8.8.8.8

Save and close.

NOTE - Op had issues writing directly to /etc/resolv.conf:

The only difficulty I encountered was to save the resolv.conf file in /root directory first and then move it manually to /etc/resolv.conf manually using

sudo nano resolv.conf
sudo mv resolv.conf /etc/resolv.conf

Then restart networking:

sudo service networking restart
sudo ifconfig enp2s0f0 up
sudo dhclient enp2s0f0

Then try to run your updates:

sudo apt update
sudo apt upgrade && sudo apt dist-upgrade
sudo apt -f install

If all goes well reboot.

Related Question