Page 1 of 1

Need help to choose the partitions to recover

Posted: 17 Jan 2018, 22:44
by Bramart
I have a Vaio laptop with a dual-boot ubuntu 16.04 / windows 10. I tried to shrink the windows partition (from windows), but after that the computer refused to boot. I ran boot-repair, which was not successful, and said that there was no Linux OS installed. So I ran TestDisk, with the help of the tutorial https://www.cgsecurity.org/wiki/TestDisk_Step_By_Step . I performed the quicksearch, and here is what I got:

Code: Select all

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63
     Partition               Start        End    Size in sectors
 P MS Data                     2048     616447     614400
 P MS Data                   616448     819199     202752 [NO NAME]
 P MS Data                  1081344  364627304  363545961
 D MS Data                  1081344  871796696  870715353
 D MS Data                411022432  411025311       2880 [EFISECTOR]
 D MS Data                411349248  411352127       2880 [EFISECTOR]
 D MS Data                452124072  452128807       4736 [NO NAME]
 D MS Data                516935488  516938367       2880 [EFISECTOR]
 D MS Data                600276948  600281491       4544 [NO NAME]
 D MS Data                606371456  606374335       2880 [EFISECTOR]
 D MS Data                606374336  606377215       2880 [EFISECTOR]
 D MS Data                611675518  611878269     202752 [NO NAME]
 D MS Data                617335352  617338231       2880 [EFISECTOR]
>D MS Data                676370860  676553195     182336 [NO NAME]
 D MS Data                676555391  676558270       2880 [NO NAME]
 P MS Data                871796736  966053887   94257152
 D Linux Swap             966053888  974196719    8142832
 D MS Data                972544001  974196736    1652736
 D MS Data                974196736  975849471    1652736
 D MS Data                974925825  975849472     923648
 D MS Data                975849472  976773119     923648


Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
FAT16, blocksize=2048, 93 MB / 89 MiB
My problem is that I don't know which partition I should recover. I have seen that the third primary partition is the shrunk windows partition, the first deleted partition is the old windows partition, and the fourth primary partition is the ubuntu partition (most files appear red, which means that they have been deleted if I am not mistaken). But should I also recover other partitions, particularly in order to be able to boot ? The first two primary partitions were labelled primary by default by TestDisk, so I should probably recover them, but I have no other clue. And is there an easy way to recover all the files in the ubuntu partition ? Thank you for your answers !

Re: Need help to choose the partitions to recover

Posted: 18 Jan 2018, 18:09
by cgrenier
All partition with 2880 sectors are floppy image or equivalent. You can ignore them.
Use 'p' to list the files from each partition. If it looks like a partition you want, set the partition to P(rimary).
If you see partition structure bad, it means that some partitions overlaps....


But before trying to rewrite the partition table, check in the Advanced menu that you can list your files.
If you can, do not use analyse, quick search/deeper search/...
Instead read https://www.cgsecurity.org/testdisk.pdf chapter "How to make the system bootable again"

Re: Need help to choose the partitions to recover

Posted: 19 Jan 2018, 19:07
by Bramart
Thank you for your help !
I have checked in the advanced menu, but I didn't manage to list any file, and no partition was listed as bootable. So I am wondering if I should recover other partition than those containing the files I had in windows and ubuntu ? The third and fourth primary partitions contain all the files I want, but other partitions (particularly the second primary partition) seem to contain OS material: for instance the second primary partition contains a folder EFI, with three folders Microsoft, Boot, and ubuntu.