Download of files successful. Power failed about halfway through build. Have used the tools in grub, e.g fsck to no avail. Is there a root command that will restart the build from the new files? I'm unable to get to login, network, etc. I can get in as root from grub restore menu. Norm13
-
1have you tried this https://askubuntu.com/questions/748289/how-to-repair-ubuntu-installation-after-interrupted-dist-upgrade-without-losing or this https://ubuntuforums.org/showthread.php?t=1863385 – Joshua Besneatte May 09 '18 at 20:19
1 Answers
It appears as if something has been broken due to the power failure mid-upgrade. Here are some steps to try:
Run fsck
The first thing to try is to boot into /bin/bash
, you can do this by:
- reboot
- edit grub:
edit the grub entry by pressing 'e' edit the kernel line by pressing 'e'
add the following at the end of the kernel line: init=/bin/bash
press enter to save and 'b' to boot
- The init=/bin/bash statement boots straight into a shell, so no password is required.
From here
After you get the root shell, run:
fdisk -l
to get a list of all disks and sizes. Find the one where your install lives(likely /dev/sda1
), and run:
fsck /dev/sda1
or replace /dev/sda1
with your install location.
If you're already here, you can also try:
mount -o remount,rw /
dpkg --configure -a
If you're lucky, and on ethernet, you can try:
ifconfig eth0 up
apt update
apt install -f
apt upgrade
Use an older kernel
It's likely that the kernel was updated during the Ubuntu upgrade process. In this case, try booting into an older kernel. You can do this by:
While booting when GRUB appears with entries select the second entry i.e., Advanced options for Ubuntu there you can see different older kernel versions which was installed previously, you can select one among them which works good for you.
this answer If this does fix your problem, resume the upgrade. I would recommend running the following first:
sudo apt update
sudo dpkg --configure -a
sudo apt install -f
sudo apt upgrade
sudo update-grub
some help from here
Live CD
If all else fails, boot from a Live CD, and copy your files(/home/usernamehere
) to an external drive. Then, re-install, and copy all your files back over. You can get some help here, but the main points are:
You have to find your hard disk, which is listed on the left side of any file browser window, near the top. Mount that (or if there's more than one volume listed, mount the one for your Ubuntu system, or if you're not sure, mount them all and go through them to see). As Mark Rooney commented, you can just click on it to mount it. Then find the home folder in there.
That will probably be sufficient to enable you to copy your files out. Remember that copying them, say, to the desktop of the live CD system would be useless, as they would go away when you reboot. Instead you must:
- copy them to an external drive or USB flash drive (but if you're booted from a USB flash drive, not that one, unless it has a persistent area and you really know what you're doing), or
- put them on another machine on the network, or email them to yourself, or otherwise store them on an Internet server (for example, with a service like Ubuntu One), or
- burn them to a CD/DVD.

- 3,808
-
Thanks for your help. Problem solved by other means: 1) The computer has always hung intermittently, and that caused the problem in this case. 2) I purchased a new computer, added the old drive as a slave, loaded Ubuntu-16.04 and copied all of my files over to the new system drive. Norm13 – norm13 May 11 '18 at 13:04