2

I have been prompted to install Ubuntu 16.04, and I accepted.

Now, after the reboot, a black screen where I could type letter but nothing happened.

After a time of wait, I gave up and shut the PC down (it showed some commands while shutting down).

Then I tried booting into secure mode, and sure enough it worked in text mode, but no connection to internet, and I tried startx - it crashed.

What should I do? Can I enable somehow connection to internet while in secure mode to try updating? Can I change the boot mode by default to text so that I can boot in normal mode and hope it does not crash?

Please let me know what info is relevant to post for the question and I'll quickly provide it.

7
  • I tried rfkill. Seems like the wifi is enabled, since it says it is not blocked? It doesn't work, and neither cable Aug 2, 2016 at 18:57
  • When I ping it says 'network is unreachable' Aug 2, 2016 at 18:58
  • Please don't run startx as root. Can you log in normally and then access a text shell by pressing <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>F2</kbd> and then signing in with your user name and password?
    – mchid
    Aug 2, 2016 at 19:13
  • @mchid I can. I tried deleting Xauthority as suggested and running startx, but since the connection is down it refused to update Aug 2, 2016 at 19:18
  • @mchid I can log in to a tty. Neither wifi nor ethernet seem to work. Aug 2, 2016 at 19:24

1 Answer 1

3

FIRST:

Using a live cd.

Boot the Ubuntu Live CD, choose "try without installing" and then establish an internet connection.

Press CTRL + ALT + T to open a terminal.

Assuming Ubuntu is on /dev/sda7, run the following commands:

sudo mount /dev/sda7 /mnt

cd /mnt

sudo mkdir -p /mnt/boot/efi

sudo mount /dev/sda1 /mnt/boot/efi

sudo mount --bind /dev /mnt/dev

sudo mount --bind /dev/pts /mnt/dev/pts

sudo mount --bind /proc /mnt/proc

sudo mount --bind /sys /mnt/sys

sudo chroot /mnt

echo 'nameserver 208.67.222.222' | tee /etc/resolv.conf

echo 'nameserver 208.67.220.220' | tee -a /etc/resolv.conf

apt-get update

apt-get -f install

apt-get dist-upgrade

Click here for more info.


NEXT

Proceed with the following instructions if you still cannot update.

If you can ping 8.8.8.8 but you get a cannot resolve error when you run apt-get update, run the following commands.

The following commands will first make a copy of your /etc/apt/sources.list file. Then, switch the URLs to IP addresses allowing you to finish the update and then when a successful update is done, switch the old backup copy with the new one (note: this skips the security updates so be sure to do those later).

Run these commands after you chroot into your partition:

sudo cp /etc/apt/sources.list /etc/apt/sourceslist
sudo sed -i 's|http.*archive.canonical.com|http://91.189.92.191|g' /etc/apt/sources.list
sudo sed -i 's|http.*archive.ubuntu.com|http://91.189.91.26|g' /etc/apt/sources.list
sudo sed -i 's/^.*security.*$//g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get -f install
sudo apt-get dist-upgrade

At this point pleas post any errors. If there are no errors, continue:

sudo mv /etc/apt/sourceslist /etc/apt/sources.list

Exit the chroot environment and run the following command to reboot:

sudo reboot

ALSO

To manually create this file run the following command (again, in the chroot environment of course):

sudo nano /etc/apt/sources.list

Here is an example of the lines that should be in the file.

deb http://91.189.91.26/ubuntu/ xenial main restricted universe multiverse
deb http://91.189.91.26/ubuntu/ xenial-updates main restricted universe multiverse
deb http://91.189.91.26/ubuntu/ xenial-backports main restricted universe multiverse
deb http://91.189.92.191/ubuntu xenial partner

Press CTRL + o and then press ENTER to save the file. Press CTRL + x to exit nano.

The following is a copy of /etc/apt/sources.list provided for reference with all of the repositories enabled:

deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse

deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .