0

I use a Dell Latitude E6520 laptop with Ubuntu 20.04.

I booted my laptop as usual and was greeted with a "Oh no! Something has gone wrong." message that told me to log out.

enter image description here

When I clicked OK, the system crashed and ever since then it boots to a black screen with a white underscore at the top (not blinking).

I saw many similar problems like this described and solved on here and other pages, but so far no solution worked for me.

I have tried going into recovery mode and choosing the "repair broken packages" option. This led to the message "Not enough free disk space. The upgrade has aborted. The upgrade needs a total of 134 M free space on disk '/'."

When I try the "Try to make free space" option in recovery mode, it says there are 0 packages to remove.

The first times around I was able to access terminal and try out "sudo apt-get clean/autoremove". None of that worked, I think it also just said that there was nothing to remove. But now I can't access terminal any more.

I tried pressing ctrl + alt + all F keys and nothing happened, so I pressed random different combinations. At some point it looked like terminal came up, but when I tried to type in the login space, nothing happened, pressing enter didn't have any effect either.

I'm not tech savvy, and don't know what any of this means or why it happened. I have been using Ubuntu 20.04 for many months and didn't try to install anything new.

EDIT/UPDATE: I have now been able to erase Ubuntu 20.04 and re-install it. So far there is no problem with booting.

Before re-installing, I tried the command "sudo parted", as suggested in the chat, and this was the result:

terminal screenshot 1

screenshot /dev/sda1

/dev/sdb

After the re-install, this was the result:

terminal screenshot 2

After the re-install, there also appeared a new error message:

error message

Thoughts?


SECOND EDIT/UPDATE:

The chat seems to be gone, the page cannot be found. I ran through the suggested commands, and this was the outcome:

It doesn't seem to recognise the - - configure -a part of the command. (screenshot removed)

Gdisk was already installed, and it installed gparted with no problem.

I don't remember everything from the chat, but the bit about trying to see how much space was used "through the installation media" confused me. Does that mean to use the USB-stick again and "try Ubuntu"?

I also wanted to ask if upgrading to 22.04 would be a good idea, as it keeps reminding me after updates. Does that carry any risk?

THIRD UPDATE

Well done spotting the error in the command. I think I typed it correctly now, but it had no result.

sudo dpkg --configure -a

Thanks for explaining. I ran gparted again and not much space is being used (I didn't transfer any saved files from the external hard drive).

It's been such a long time, I forgot what we are still trying to do. The laptop is working again, but I guess it will forever remain a mistery what the problem was? Unless you want to suggest anything else (not sure what the lack of reaction to the gpkg command means), I'll mark my question as answered/solved.

LBC
  • 3

1 Answers1

0

It would advise you to use a live session that matches the target system - especially when updating the OS although I don't actually know if this is a requirement.

As a starting point you want to backup all your data. You should be able to do this using files (nautilus) and somewhere to write the data to.

You then want to make some space on the disk if there is not enough for the OS. You might have to remove something to make space. You should be able to use the command df (disk free) to show the disk usage.


Update Failure

You do this AT YOUR OWN RISK

(If you have mounted any of your target machine other than the CD/USB you should unmount them before proceeding.)

If there was an update that made your system non-bootable, you can use the Live CD/USB to run apt apt-get and dpkg to get the new files to fix your system.

This first part is to mount your target OS from the USB OS. To do this you have to first identify your target system. Use the command df to identify you target system mount point to find x and y in the first command.

Boot the Ubuntu Live CD/USB.
Press Ctrl-Alt-F1

sudo mount /dev/sdxy /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt

The last command is crucial as it sets your PC as the target and not the live session USB.

Note: the commands, above, will not show any output. It is not attempting to fix anything.

To attempt a fix you can try the following:-

sudo dpkg --configure -a
sudo apt update --fix-missing
sudo apt-get install -f
sudo apt install -f

If they return

0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded

Then it has failed.

Next thing to try is:

sudo apt-get -u dist-upgrade

dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary.

If it shows any held packages, it is best to eliminate them. Packages are held because of dependency conflicts that apt cannot resolve.

For more information on this and details of iteratively removing packages see the answers at

How do I resolve unmet dependencies after adding a PPA?

I suspect it is too complicated for this answer but feel free to have a go.

After you finished: -

sudo apt clean
sudo apt update

for more details see the following links: -

https://help.ubuntu.com/community/LiveCdRecovery

https://phoenixnap.com/kb/ubuntu-fix-broken-packages

david
  • 937