Ubuntu: Deleted files after installing Ubuntu


I installed Ubuntu on my laptop over the windows, I had 2 partitions on one hard disk. It seems like old partition is gone with all my files (photos, music, etc.). How can I recover old files. Files weren't on same partition as windows.


It is unlikely that your other partition is actually deleted, and much more likely that it is simply not mounted in Ubuntu. Unlike Windows, where partitions are given a drive letter automatically in almost all cases, Linux typically leaves them unmounted/disconnected.

Find the missing partition by running:

sudo fdisk -l  

This will list all of the partitions on the machine, you just need to find the one that is not mounted. To see a list of already mounted partitions, run:

sudo mount  

Now all you need to do is mount the drive to a folder, and the contents will be available there. Replace /dev/sda2 with the device of your partition. It will be the one which shows up in fdisk -l, but not in mount.

sudo mkdir /mnt/spare_partition  sudo mount /dev/sda2 /mnt/spare_partition  

If the files really are deleted, there is a way to get at least some of them back, but we can discuss that after you rule out the obvious problem first!

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »