0

I had accidentally installed Ubuntu 13.04 on Windows 8 while trying to Dual Boot. I had a single partition(973GB) which had windows with NTFS filesystem. But by the accidental install of ubuntu the filesystem had changed to ext4.

When I tried testdisk, it showed me three partitions:

  1. P EFI System (with very less data)

  2. P MS DATA (the large disk of around 950GB. I think this partition has all the data)

  3. P Linux Swap (same size as my ram)

Now when I tried searching, it showed that the partition MS Data cannot be recovered. I dont need the partition or the windows 8 back. I only need some of my important files that got deleted. Can I recover these files? Please help.

2

2 Answers 2

0

You can still recover them by using photorec which comes with testdisk after you install it. Type in a terminal photorec and select the hard drive / partition you wish to analyze and the place where you want to store all recovered files (Should be a place not on the same hard drive you are trying to recover from).

enter image description here

Your same case has also happened to me. Trying to recover files from a previous NTFS or FAT32 partition that was formatted to Ext3 or Ext4. In the end it recovered all files we needed.

5
  • Thanks for the answer. I have two more doubts. 1. Do I need to run photorec from livecd/liveusb or can I run it from ubuntu I installed on the same drive? 2. My HDD is 950GB approx. I had data of around 600GB. Can I use a usb drive of around 8/16GB to transfer my data to another computer in many trips?
    – Yasaswy K
    Sep 3, 2013 at 22:24
  • You can run it from the same drive but you might recover more info than the current HDD. Let's say you have a 1TB HDD but you have formatted the HDD 2 or 3 times. On each of this times, the HDD was 90% full (900 GB). This means that photorec might recover, not only the missing files in the current formatted partition but also from previous ones, recovering 900x3 = 2700 GB of information (Worst case exaggerated scenario). So you need in most cases a larger hard drive than the one you are recovering from. For using USB drives for it, it will not work. You can not unmount while recovering to it. Sep 4, 2013 at 0:25
  • I tried using photorec. But it always gets stuck at some sector while reading and does not go further. It happened twice. Is there any other way I can do it?
    – Yasaswy K
    Sep 12, 2013 at 4:42
  • Did you try doing an fsck to the hard drive. For example: sudo fsck /dev/sda1 -f Sep 12, 2013 at 5:48
  • 2
    This would be a good time to stop what you are doing. If it stops at a sector there is a good chance that the drive is damaged. Do a low-level copy with a clone tool and restore only from the copy.
    – Pascal
    Apr 10, 2018 at 21:11
0

Keep Calm if you formatted all of your drive too.

just keep patience .

we'll be recover all of your files for sure, whichever you want ;) .

#Recover (images,videos,docx,spreedsheet,cpp,xmls,mp3,mp4 and 291 types of more file too ;) )

The previous answer from Luis Alvarado is absolutely correct, worked 200% , i just explain it how to do in briefly.

You can recover old deleted files from any drive you want. Just keep patience and be cool ,good things takes times. you are in the right place ;)

i am new here so avoid grammatical mistakes and i didn't have permission for posting images yet,(due to, no reputation earned yet) so i will provide links for useful screenshots. please upvote if you found this post helpful.......that was really something for me ;)

I can tell you in briefly one by one steps -

  1. how to install photorec (testdisks utility) using terminal.

  2. Choosing which drive or which specific partition you want to recover files from.

  3. how to set destination/location where you want to save all of recovered files.

  4. how to recover only selected type of files. for exmple say- you only wish to recover .png & .jpeg & .mp4 type of files.

  5. after that,going through all above steps .finally, how to use photorec for start recovering deleted files from any drive

but before doing so,

i want to tell you a little fun moment happend with me,using this recovery software XD XD must read :p

:D :D The very first time. Few months ago, When i was going to install lubuntu in my pc, i had erased all of my disk and installed lubuntu in my pc ,using erase all disk and freshly install lubuntu option in ubuntu installer.

That time, i didn't know how to use and make different partitions, so i performed installation of lubuntu twice or thrice just for making partition as i want (that time i am new user so, making partition is so confusing for me ) . This process erased and formatted all of my disks completely and installed lubuntu successfully everytime.

My pc has only one HDD and installed windows that time in it and has 2 partitions one say local disk C and another partition is named local disk D. so i thought that has 2 saperated disks for each. So i was formatted disk completely and happy , thinking that only (operating system disk) local disk c is going to be formatted.

but... wait.... WHOOOOOAAAAAAA

All of my saved images,documents and all of files that are saved in local disk D went away in peace :O

and in front of me :O

A BLANK , NEW , FRESHLY INSTALLED LUBUNTU WAS THERE.

hahaha, that was fun. XD XD

OK, so there you go-------------------------------------------------------------------

  1. how to install photorec (testdisks utility) using terminal.
  • you can download it from terminal using this command.*

    sudo apt update

    sudo apt install testdisk

now, you have testdisk-utils installed in your system.

then type photorec in terminal hit enter and input your password then, photorec opened in your terminal.see below given image.

screenshot 1



  1. how to set destination/location where you want to save all of recovered files.

see screenshot 1 this is now cuurently showing in your terminals.

Here all of your drive available in your system shows up, there in my pc it is only one hard disk available. (it is shows for choosing - which hard drive you wish to recovering files from. )

 using ^ up and down arrow choose which harddrive you want to select  and
     hit proceed.

now you have this type of screen see this screenshot 2

It shows how much partition you have, of that disk

step 2 left----------------

Now, we are going to 4th step for choosing specific files like images or docs etc for recovery. after that , we continue to step 2 for choosing which partition we select for recovery-



  1. how to recover only selected type of files. for exmple say- you only wish to recover .png & .jpeg & .mp4 type of files.

by default, photorec selected all of the files type, that photorec has supported to recover. but, in my pc it has 291 types of files has available that photorec support so if i will continue with it . it takes a week or more for my pc to recover all of it.

so you have to choose only whatever file type you want to recover .you can select whichever files you want or You can All of 291 files too.... :p :p (its all matter of time what kind of fast processor&RAM you have )

so, now you have currently this screen see screenshot 2

you have to use '>' right left arrow and go to option {file opt}
given below and hit enter .

now you have this screen screenshot 3

you can press 's' for selecting all/deselect all files and mark
your own choice files with help of '>' '<' key. (up/down arrow for scrolling)

after selecting files press 'b' for save setting then it says setting recorded
successfully.

then, again hit 'enter' to go to main menu.


now, you marked which files you want to recover.

Again, step 2 left--

, you have this screen see screenshot 2

now, we have to select which partition you want to scan for recovery.

(some partition has linux system files ,some has ntfs type of file system etc.)

i was formatted entire disk so ,i will choose 1st option "No partition
.........whole disk"  for scanning all of sectors to recover file from.

(using '<' arrow go back to 'search' position given below.) and then hit **Enter**

now you have to choose filesystem type where the file were stored -

see this screenshot 4

here ,i'll choose FAT/NTFS..... because earlier all of my disk are is in ntfs/fat... file system.

[ ext2/ext3 ] ext2/ext3/ext4 filesystem are used by ubuntu/linux OS

[ Other ] FAT/NTFS/HFS+/ReiserFS/... filesystems are used by the windows

select whichever filesystem earlier you have,from which you want to recover.

or

if you have still doubt over it, you can choose both filesystem one by one and recover from both filesystem. By doing this process twice and select different filesystem.

now. currently i am going here with fat/ntfs filesystem and hit Enter.

now you have this screen see this screenshot 5

you had done. selected drive and partition for recover and what kind of file to be recover.



  1. how to set destination/location where you want to save all of recovered files.

screenshot 5

curently you have this screen redirected to default location /home/user

  • you can change location/directory for saving recovered file in any other drive .

press left arrow '<' twice and it go back to '/ directory' .

use up/down arrow and select 'media' in which you found your hard drive name .

goto wherever location you want to save files . lets say i m selected /media/arbaz/Arbaz directory in which i have created a folder named 'backup' to save files . go to that folder .

see this screenshot 6

thats it.

it is a location where it'll be saved



  1. how to use photorec for start recovering deleted files from any drive

just click 'c' key, after reaching your location

and it'll start recovering.

see this screenshot 7

it maybe recovered more files, which was formatted more than 4 years ago too. YUPP , that is true.same happened with me. files which i was deleted permanently from using windows will be back .though, i not needed but anyway.

it'll recovered 35000 jpeg files and more others in my pc. Truely insane software

----------------------------------------------------------------------------------------------------------------------------------------------------------

It takes time depending upon your computer speed, processor&RAM and size of harddisk.

because of mine has 1.2 Ghz Dual core, 1 core-1 thread ,intel celeron cpu on date (24/10/2020) with 1 GB RAM, that's why it is soo slow showing 37 hour remaining :D

;p ;p don't be sad. XD its working excellent , and i do lot of practices on codechef with it daily and it didn't lag. Thanks to Lubuntu OS :D :D

XD Will be purchase new one soon.................hope so,one day... :D


Thanks for giving your valuable time to read Must upvote if you recovered :D :D for any issue comment, will be reply whenever possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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