SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / ubuntu / Questions / 111563
Accepted
Ryan McClure
Ryan McClure
Asked: 2012-03-10 10:37:04 +0800 CST2012-03-10 10:37:04 +0800 CST 2012-03-10 10:37:04 +0800 CST

Lost power during upgrade, how do I recover?

  • 772

I was attempting to update my 11.10 install to 12.04beta. During the install step, I accidentally lost power to my laptop (the power cable came unplugged) and it shut down. Whenever I go to boot now, I can select my install via Grub and it loads up to where the sign-in should happen, but I get a display that looks like what you see as soon as you shut down. It looks like it locks after checking for the battery.

Is there anyway, with or without Live media, to restore my machine's install/update to 12.04 but still keep my settings/applications/files?

shutdown upgrade
  • 2 2 Answers
  • 52843 Views

2 Answers

  • Voted
  1. Best Answer
    pestilence
    2012-03-10T10:50:20+08:002012-03-10T10:50:20+08:00

    Did you try booting into the recovery mode (selected via grub)? You could then try to restart the upgrade with

    sudo apt-get update
    sudo apt-get upgrade
    

    You may need to run

    sudo dpkg --configure -a
    

    to fix the partially installed packages.

    If the recovery mode is also broken, you could try booting off a live cd and then chroot'ing into your hard drive installation and performing the above steps.

    To chroot into your hard drive installation, first boot off a live cd. You can use the ubuntu install CD for this task, just choose the option "try ubuntu" rather than installing. Once booted, open a terminal and mount your root partition. If your root partition is /dev/sda1 (to find out your root partition, there is a guide at https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows#The_terminal_way):

    sudo mkdir -p /media/ubuntu
    sudo mount /dev/sda1 /media/ubuntu
    

    Then you need to mount the proc, dev, and sys filesystems into your new environment:

    sudo mount --bind /dev /media/ubuntu/dev
    sudo mount --bind /proc /media/ubuntu/proc
    sudo mount --bind /sys /media/ubuntu/sys
    

    Enable networking:

    cp /etc/resolv.conf /media/ubuntu/etc/resolv.conf
    

    Finally, chroot into it:

    sudo chroot /media/ubuntu
    

    From here you can run apt-get and dpkg to fix your system. This is identical to the way that people fix grub using chroot, in case you run into problems you can google something like "grub chroot ubuntu livecd" and find more info.

    • 35
  2. Gengis Toledo Ramírez
    2019-02-27T07:21:24+08:002019-02-27T07:21:24+08:00

    Debian and Ubuntu are similar and for these kind of problems the same solutions works.

    During Debian update, my workstation experimented a power lost. Grub worked and MS Windows does, but Debian entry didn't. Setup crashed with an unusual prompt in text mode.

    The solution was quite simple. Run the computer with a Debian CD and choosing the Advanced options->Rescue Mode (something like that) on the main and initial menu.

    Network is not important.

    I chose the option of the bottom "continue without mounting or installing root file system" (this provided reduced functionalities)... but I required just them...

    Once in the prompt I used

    #fdisk -l to list my partitions.
    

    My root partition was in /dev/sdb1

    I used:

    #fsck /dev/sdb1 
    

    to fix my problem... giving "yes" to all questions.

    When it finished I repeated the command. Obtaining in this case no questions and quick finish (because problems were fixed in the first invocation of the command) Just to be sure.

    I reboot my system without the Live CD and it was able to run again the Linux System... during setup many problems with other partitions were found and fixed but the system setup was successfully.

    I hope this experience will be useful.

    • 0

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    How to delete a non-empty directory in Terminal?

    • 4 Answers
  • Marko Smith

    How to unzip a zip file from the Terminal?

    • 9 Answers
  • Marko Smith

    How can I copy the contents of a folder to another folder in a different directory using terminal?

    • 8 Answers
  • Marko Smith

    How do I install a .deb file via the command line?

    • 11 Answers
  • Marko Smith

    How do I run .sh scripts?

    • 16 Answers
  • Marko Smith

    How do I install a .tar.gz (or .tar.bz2) file?

    • 14 Answers
  • Marko Smith

    What command do I need to unzip/extract a .tar.gz file?

    • 8 Answers
  • Marko Smith

    How to list all installed packages

    • 24 Answers
  • Marko Smith

    Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

    • 25 Answers
  • Marko Smith

    Change folder permissions and ownership

    • 9 Answers
  • Martin Hope
    ubuntu-nerd How to unzip a zip file from the Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    pandisvezia How can I copy the contents of a folder to another folder in a different directory using terminal? 2011-12-11 17:19:37 +0800 CST
  • Martin Hope
    Scott Szretter Where is the cron / crontab log? 2011-08-12 04:06:43 +0800 CST
  • Martin Hope
    TheXed How do I install a .deb file via the command line? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    EmmyS What command do I need to unzip/extract a .tar.gz file? 2011-02-09 14:50:41 +0800 CST
  • Martin Hope
    Ivan How to list all installed packages 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry How do I determine the total size of a directory (folder) from the command line? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "The following packages have been kept back:" Why and how do I solve it? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford How can PPAs be removed? 2010-07-30 01:09:42 +0800 CST

Related Questions

Trending Tags

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve