{"id":2647,"date":"2022-08-30T15:26:36","date_gmt":"2022-08-30T15:26:36","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/04\/lost-power-during-upgrade-how-do-i-recover-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:26:36","modified_gmt":"2022-08-30T15:26:36","slug":"lost-power-during-upgrade-how-do-i-recover-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/lost-power-during-upgrade-how-do-i-recover-collection-of-common-programming-errors\/","title":{"rendered":"Lost power during upgrade, how do I recover?-Collection of common programming errors"},"content":{"rendered":"<p>Did you try booting into the recovery mode (selected via grub)? You could then try to restart the upgrade with<\/p>\n<pre><code>sudo apt-get update\nsudo apt-get upgrade\n<\/code><\/pre>\n<p>You may need to run<\/p>\n<pre><code>sudo dpkg --configure -a\n<\/code><\/pre>\n<p>to fix the partially installed packages.<\/p>\n<p>If the recovery mode is also broken, you could try booting off a live cd and then chroot&#8217;ing into your hard drive installation and performing the above steps.<\/p>\n<p>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 &#8220;try ubuntu&#8221; rather than installing. Once booted, open a terminal and mount your root partition. If your root partition is \/dev\/sda1:<\/p>\n<pre><code>sudo mkdir -p \/media\/ubuntu\nsudo mount \/dev\/sda1 \/media\/ubuntu\n<\/code><\/pre>\n<p>Then you need to mount the proc, dev, and sys filesystems into your new environment:<\/p>\n<pre><code>sudo mount --bind \/dev \/media\/ubuntu\/dev\nsudo mount --bind \/proc \/media\/ubuntu\/proc\nsudo mount --bind \/sys \/media\/ubuntu\/sys\n<\/code><\/pre>\n<p>Enable networking:<\/p>\n<pre><code>cp \/etc\/resolv.conf \/media\/ubuntu\/etc\/resolv.conf\n<\/code><\/pre>\n<p>Finally, chroot into it:<\/p>\n<pre><code>sudo chroot \/media\/ubuntu\n<\/code><\/pre>\n<p>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 &#8220;grub chroot ubuntu livecd&#8221; and find more info.<\/p>\n<p id=\"rop\"><small>Originally posted 2014-02-04 12:12:23. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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 &#8211;configure -a to fix the partially installed packages. If the recovery mode is also broken, you could try booting off a live [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2647","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2647"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2647\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}