Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I had a few issues on Ubuntu that I did not know how to solve. This included not being unable to boot. I discovered that I could reinstall Ubuntu from an USB pendrive.

It has been said that the files would be safe if I reinstalled and used the same username and password.

I did that but all my files are missing.

How do I recover my files?

share|improve this question
Where did you store your files? Which partition held /home ? – Hennes Apr 7 '13 at 10:06
All my files were on the system, the partition that held home was /dev/sda2 – Eddie Skinner Apr 7 '13 at 10:10
Did you mount /dev/sda2 again as /home? (I am assuming you did not reformat / mke2fs it). – Hennes Apr 7 '13 at 10:11
I didn't refomat i found somewhere it said to mount to "/" – Eddie Skinner Apr 7 '13 at 10:13
Feel free to edit the OP with details rather than adding lots of comments. Also add the output of fdisk -l (small letter L, not the number 1) and (as root or with sudo) try a mount /dev/sda2 /mnt && ls -l /mnt. Post the results of that. – Hennes Apr 7 '13 at 10:15

It has been said that the files would be safe if I reinstalled and used the same username and password.

Whoever said that lied to you. Unless you had /home on a separate partition, and in the new install chose to not format that partition, your files are unrecoverably gone. And even if /home was separate, if it was encrypted I hope you backed up the encryption key. Otherwise the files are still gone.

share|improve this answer
I had no backup because I thought everything would be safe but I guess not... – Eddie Skinner Apr 7 '13 at 10:29

You most likely read a tutorial about an ubuntu setup where your /home is on a seperate partition. Did you have an /home Partition on your hard drive on your earlier ubunut? If so, how did you reinstall ubuntu (which version btw?). If you simply clicked the 'install ubuntu on hard drive' but yiu have a seperat /home partition your files should be still out there but simply not mounted. More likely however is, that you formatted you whole drive and your files are more or less lost. I personally never used them but there are several tools to recover lost files. You might want to have a look into photorec or testdisk. I think Testdisk should be your main candidate, as it is able to recover whole partitions. Have a look at the following articles: and

share|improve this answer
I did it by usb version 12.10 I didnt have a home partition, I was looking at the tools you mentioned but I don't think they'll help me – Eddie Skinner Apr 7 '13 at 10:29

On re-installing Ubuntu use option "Upgrade" to not wipe all home directories. You may then have created a new account rather than using the existing one. In case your file system was not encrypted your data may still be present in the home directory of your previous user. To test this open Nautilus and point it to "File System -> /home. See what directories are there.

If your old HOME does exist you can point your new user account to this directory by installing gnome-system-tools Install gnome-system-tools and run Users & Gropus as was further elaborated in this question:

After Unlock settings with your administrator credentials you may from "Advanced Settings" change the location of a users's home directory:

enter image description here

Choose the directory of your old user account to recover all your data there.

In case your installation did overwrite your previous data you may be able to recover those data that have not been overwritten yet. See the following:

share|improve this answer
My old username was the same as the new one, and when I went in my filesystem's home it was the default, also I unlocked my user but can't change the home directory like the above image – Eddie Skinner Apr 7 '13 at 11:08
No nothing of mine was there. A "Data Recovery" can bring them back? – Eddie Skinner Apr 7 '13 at 11:17
I don't know if they're encrypted or not but I have to try something, How can I do this? – Eddie Skinner Apr 7 '13 at 11:22
I used the test disk and when rebooted I couldn't and it says error: file "/boot/grub/i386-pc/normal.mod" not found grub rescue> – Eddie Skinner Apr 7 '13 at 12:31

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.