Problems with login in Ubuntu 18.04 - Failed to start Load Kernel Modules
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.
![Andrea Caldiroli](https://lh3.googleusercontent.com/-3vEG_eZXHeQ/AAAAAAAAAAI/AAAAAAAAAeo/c0B7ynwCfY0/photo.jpg?sz=256)
Andrea Caldiroli
Updated on September 18, 2022Comments
-
Andrea Caldiroli almost 2 years
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:So I restarted in recovery mode, used the root shell to run
sudo systemctl status systemd-modules-load.service
, and that's the result: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 messageCould not resolve 'archive.ubuntu.com'
(i.e., there is no internet connection), while fordpkg --configure -a
I getdpkg: error: unable to access dpkg status area: Read-only file system
.Running
ifconfig
I see this result: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
:-
Joshua Besneatte almost 6 yearswhat kind of connection? wifi or eth? have you seen this? ubuntuforums.org/showthread.php?t=1124454
-
Joshua Besneatte almost 6 yearsalso, if possible, it's better to copy/paste text from command output into your question instead of posting an image of it. thanks!
-
Joshua Besneatte almost 6 yearsalso, for ifconfig, did you do:
ifconfig -a
to show all interfaces? -
Andrea Caldiroli almost 6 yearsI tried both wifi and eth. I looked at the link you posted but didn't help. I posted above the result from
ifconfig -a
. I'm currently unable to connect to network or using any kind of GUI, so I'm writing from another computer, my only possibility is to take pictures. I'm sorry ( I know copying and pasting would be much better) -
Joshua Besneatte almost 6 yearsdo you have a wired or wireless connection?
-
Andrea Caldiroli almost 6 yearsI can connect directly to my router via ethernet cable or use the wifi
-
Joshua Besneatte almost 6 yearsok, use the direct ethernet connection... I posted an answer, let me know if that works out for you
-
-
Andrea Caldiroli almost 6 yearsIt finally worked! Thank you a lot! 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 usingsudo mv resolv.conf /etc/resolv.conf
-
Andrés Parada almost 5 yearsI followed your procedure but something failed, I noticed that now, trying again
resolv.conf
isn't modified as the above steps required. It seems upon reboot I am loosing this... -
Joshua Besneatte almost 5 yearsresolve.conf will be rewritten at reboot.... this is OK as once you get your system fixed in recovery mode, you will likely need to reconfigure via network settings gui once you get booted into normal mode