Update system from live session

I have a faulty system that refuses to show anything on the screen (the Kubuntu logo appears ok but no sddm for login).

I was hopping to update the system (since it is a fresh install) with any updates that could be available (or even enabling the proposed repos or reinstalling packages or installing propietary GPU drivers).

So the question is, how to boot from a live [usb], change to the installed file system and run apt-get or similar so the installed system gets updated (even if the update affects the kernel)?

The running version is Kubuntu 15.04.


Solution 1:

Step one: boot whatever live media you use, usb or cd.

Step two: access to tty1 once you get to the "Try Ubuntu" vs "Install Ubuntu" screen and press Ctrl-Alt-F1; alternatively , click "Try Ubuntu" and access gnome-terminal once you get to live desktop

Step three: run the commands bellow

sudo mount /dev/sda1 /mnt

sudo mount --bind /dev /mnt/dev

sudo mount --bind /proc /mnt/proc

sudo mount --bind /sys /mnt/sys

sudo chroot /mnt

Step four: run whatever updates you need, sudo apt-get upgrade or sudo apt-get update.

This method is used for failed updates mostly or password recovery, or in my case - installing the coreutils package which I deleted when I got grep into apg-get --remove by accident (and that was not fun!)