Ubuntu – Installation of ubuntu system update was interrupted. Now I cannot boot. Please help


The problem: I was asked by a pop-up window whether I wanted to upgrade to a new version of Ubuntu. I clicked yes, and followed prompts. I then left it to get on with its thing as it seemed to be taking a while. Unfortunately my netbook, which wasnt plugged in, ran out of battery before the installation was completed. When I next attempted to boot up Ubuntu I just get the main loading page with the dots under the word ubuntu. It never progresses from that point. I need a fix.

I realise there are existing threads on this topic but I can't understand the responses to them. If you can help me to sort this problem out then its important for you to understand that I have zero knowledge of Ubuntu or how it works. A friend set me up on ubuntu in the first place and by and large I've never had any problems so haven't had to fiddle with code. I've been running Ubuntu alongside Windows (I'm on windows now), on a split hard drive. As I can no longer boot Ubuntu I can no longer access any of the files on the ubuntu half of the hardrive.

To give you an idea of where I'm at, I have a vague idea that there's a thing called a terminal and at a push I might work out how to open it. At this point, confronted by an utterly perplexing code, I give up. I repeat, I do not know what SUDO is. I do not know anything whatsoever about commands or how they work. I'm willing to learn but I need talking through this step by step. Assume I know nothing and you'll be spot on. If someone could help me with this I would be very grateful as there are an awful lot of files in limbo which I'd dearly like to regain access to.

Best Answer

First off, your main friend in this situation is a live CD or live USB. You need one before you can continue. If you don't have one, you'll need access to another machine. Follow the instructions on the Ubuntu.com website (in the download section) to create it.

The easiest--though not necessarily the best--approach is to boot from the live CD, rescue your files, and reinstall. Here's a better approach, but be warned: It depends heavily on the terminal.

First, find out the name of your root partition. You can use GParted for this (it's included on the live CD). It will probably be something like /dev/sda1 or /dev/sda2. Its format will probably be ext3 or ext4 and will definitely not be NTFS or FAT32. I'm assuming in this answer that your root partition is /dev/sda1, but be sure to change the commands below to reflect the actual partition!

First, mount the root partition on /mnt.

sudo mount /dev/sda1 /mnt

Now, bring across some important other parts of the filesystem via bind mounts (bind mounts make a particular directory available at some other location).

sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/shm /mnt/dev/shm
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

Now, chroot into your system. This means that your terminal will be operating in your install (not the live CD environment), so you can execute commands as if your machine were bootable.

sudo chroot /mnt
su - yourusername    # Replace with your login username

Now, you can try to recover your system. The first thing to try is this:

sudo aptitude install

If that fails, it will likely tell you a command to run. If so, follow the instructions given.

Hopefully, that'll do it for you. Once the process finishes, you should be able to reboot normally.

Related Question