Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hello I am in a very embarrassing situation, I was trying to upgrade to ubuntu 10.04 from ubuntu 9.10 yesterday and while updating I forgot to put my laptop on charger and the battery ran out. Since we know that there is no track back process in linux, all I get now is a blank terminal screen at the start up. Even if I login, I still am stuck on that blank screen.

So the only way I see is to, format and reinstall my windows and linux instances. So before I format it, I am trying to save all my data that is in the linux partition. I am using ext2explore to save all my files. I wanted to know if there was any possible way to export a database or a few tables into a file from my windows partition??

I need to back up my database in the linux partition using my windows partition!!

share|improve this question
If you login at the "black screen" in Ubuntu, do you get a commandline then? It's probably possible to continue the installation from there... – JanC Oct 31 '10 at 1:43
First you could try to leave X11 (Ctrl+alt+F1) and log in from the terminal. Finish your upgrade (sudo apt-get dist-upgrade) and perhaps you will be able to log in again. – Kristof Provost Oct 31 '10 at 10:07

I don't understand why you think you have to reinstall Linux (or Windows, for that matter). You seem to have had the bad luck that the power loss in the middle of the upgrade made your Linux installation unusable (or at least not easily usable), but that doesn't mean it's not recoverable.

The easiest way to recover would be to boot from a live CD or USB disk (preferably from Ubuntu 10.04, though any recent enough Linux should work). (It's probably possible to repair your installation by booting it in a particular way, but the live CD approach is a little easier.) The following commands assume you have a shell (command line) running as root (administrator).

  • If you have an interface that offers to mount your existing Linux installation, do what it tells you. Otherwise, do it manually: use fdisk -l to see what partitions you have and locate the system partition. Mount it to some place. Also mount procfs and sysfs under it. For example, if your Linux partition is on /dev/sda99, run

    mkdir /media/linux
    mount /dev/sda99 /media/linux
    mount -t proc proc /media/linux/proc
    mount -t sysfs sysfs /media/linux/sys
  • Start a “subsession” in the Linux installation with chroot:

    chroot /media/linux
  • You should now have a shell in your Linux installation. Run apt-get install or dpkg --configure -a to continue the upgrade. (Sometimes running these commands a few times can get rid of errors, or at least let a lot of things progress even if a few packages are blocked by an error.) It's possible that the crash left the system in a state where those commands aren't enough; if so, ask again, reporting the error messages you see.

Note that I do not recommend accessing your Linux partition from Windows if the purpose is to extract important data. Windows tools for Linux filesystem access are not fully reliable, especially if the filesystem was not unmounted cleanly.

share|improve this answer

Why use ext2explore if you can boot from Ubuntu LiveCD? Are you sure you need to reinstall Windows too? It's unlikely that it get corrupted during the course of installation.

Backup procedures may vary for different database engines, you better check the docs for your database first.

share|improve this answer

If you have database backups, it's probably easiest to use those.

If you really need the databases, and you were using MySQL, then you can find them under /var/lib/mysql/ on the linux partition. You will probably need all the files in that directory and its subdirectories. Note that archiving those files from inside Ubuntu is probably a better idea, because that would preserve permissions (there probably is a question on this site already how to do that).

And like said in my comment to your question, it might be possible to continue the upgrade from the commandline instead.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.