Score:0

Ubuntu 20.04 stuck in emergency mode with 90% of commands not working

ml flag

I'm in a bit of a situation here and quite a Ubuntu/linux newbie, plus I didn't find any working solution for us in other posts facing similar problem, hence every help is more than welcome. In summary: I tried to update our production server but it started to give an error related with info_silent folder

Followed this procedure:

sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_silent
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
sudo apt-get -f install

Till here everything good, the server started to upgrade again but lost traces of old upgrades (before the problem the OS was signaling 1 update, after more than 600, more than 800 running apt update).

The big issue came when I did the following and restarted the system

sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_silent
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info_silent /var/lib/dpkg/info

It restarted in emergency mode and every command is gone, not even mount or umount are available.

mount error, the message is always the same changing only the name of the resource fired

I tried to recover the folders as they where (/var/lib/dpkg/info folder is still here with all the files) by following the same first three cmds above but I got stucked in the "Read-only file system". I tried to restart in recovery mode but the behavior is the same plus it often request root pwd messing with the GUI. I tried fsck to unlock the file system but w/out success, always says the dev is in use (and I cannot unmount).

Ubuntu version is: Ubuntu Server 20.04 LTS 64bit with no desktop, full command line.

I hope there is a solution other than formatting the whole system, not so much for the data (we have yesterday's backup) as for all the configurations...

Organic Marble avatar
us flag
What were you trying to do (or fix) in the first place, that got you into this mess?
LM_I avatar
ml flag
Hi @OrganicMarble, everything started with the impossibility of upgrading existing packages or installing new ones, according to OS messages because of several issue with kernel 5.4.0.117. Trying to fix this we ended up to install also two additional kernels: .120 and .135 (don't remember the command,, maybe --fix-broken) then we though to made some cleaning in the /boot folder following another stackoverflow suggestion to a similar case. After that step we moved forward a little bit but still incapable of upgrading/installing packages, hence the last try as described in this post.
Score:0
ml flag

We ended up formatting and reinstalling the whole machine, so we're not in need anymore. However if possible I would keep the post open, just in case someone find a different solution and want to share here to help others.

I sit in a Tesla and translated this thread with Ai:

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.