Installed Ubuntu and accidently gave all the hard disk space to Ubuntu

When I booted and installed Ubuntu, I gave all of the hard disk space to Ubuntu -- my whole hard disk was formatted.

I had plenty of pictures, videos and music on my Local Disk [D] drive and I don't want to lose this media.

Now I have only one 500GB partition.

How do I recover my files?


Solution 1:

DO NOT WRITE NEW DATA TO THE DRIVE!

All or most of your old data is still there, it's just the partition table that has been replaced. However, any new data may end up overwriting the old, so the first thing you should do is unmount the drive to make sure nothing can be written to it.

If the data is important to you, your best bet is to contact a professional. You may be able to recover it by yourself, but doing so is risky at best.

If you do try it yourself, there are numerous tools available. One way is to boot into a live CD and use GParted to attempt to recover the deleted partition table. First choose the drive you wish to perform the data recovery on, then go to 'Device > Attempt Data Rescue'.

Solution 2:

  1. ubuntu rescue remix

    it is livecd for recoveringdata enter image description here

  2. testdisk

TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.

TestDisk can

Fix partition table, recover deleted partition
Recover FAT32 boot sector from its backup
Rebuild FAT12/FAT16/FAT32 boot sector
Fix FAT tables
Rebuild NTFS boot sector
Recover NTFS boot sector from its backup
Fix MFT using MFT mirror
Locate ext2/ext3/ext4 Backup SuperBlock
Undelete files from FAT, exFAT, NTFS and ext2 filesystem
Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions. 

Installation

sudo apt-get install testdisk 

Links

  • http://ubuntu-rescue-remix.org/
  • http://www.linuxlinks.com/article/20100226122928107/DataRecovery.html
  • http://www.cgsecurity.org/wiki/TestDisk
  • https://www.linux.com/news/enterprise/storage/8257-how-to-recover-lost-files-after-you-accidentally-wipe-your-hard-drive