Ubuntu – Help – Updates failed and lost all files


Our laptop initially had 12.04 LTS, and then we upgraded to 14.04 LTS. But the 14.04 version had so many errors, I had to disable further updates.

Skip a year later, laptop crashes frequently and my father suggested re-enabling the updates. I enable them, updating process starts and doesn't end. It got to around 70% and stopped. I used the power key to shutdown the laptop.
The next day, my mother calls me and tells me that the laptop wouldn't start. I go back home and I try starting it. It doesn't start up at all.

I had several options and I chose to revert to 12.04. Unfortunately, that just erased ALL files. Everything. 3 years worth of work gone in a minute.

I believe it was a factory reset, but I am not sure.

Is it possible to restore some of the files?


Best Answer

If your /home folder along with all your files are missing from the drive it's the results of a deleted or reformatted partition. You had best not use the drive while you perform steps to recover your data.

A very robust application for this is Testdisk.

Using Testdisk to recover files

  1. Boot from DVD/CD/USB drive as not to use the HDD any more. (even better would be to take a full copy onto another HDD and recover from there)

  2. Install Testdisk.
    (The dollar sign $ is the command prompt. It's showing that you are typing a command in the terminal. The text highlighted in bold are the actual items that you click on while performing the steps.)

        $ sudo apt install testdisk
  1. Run these steps (taken from TestDisk Step By Step and tested by me to recover files):

    $ sudo testdisk
    1: Select Create       - ENTER
    2: Select Create       - ENTER
    3: Select Disk         - Proceed
    4: Select Intel        - ENTER
    5: Select Analyse      - ENTER
    6: Select Quick Search - ENTER

This procedure is to recover your important files. The steps provided will give you options to try to recover the entire partion. If that fails you'll then have an option to recover individual files. Try to have a media such as a USB drive to recover your important data to.

Related Question