0

I have a SSD that was used as a boot drive that was originally split the following way:

major minor  #blocks  name
   8        0  250059096 sda 
   8        1   61812736 sda1
   8        2          1 sda2
   8        3  184148992 sda3
   8        5    4094976 sda5

More partition info:

/dev/sda1      ext4        60842040    7325624   50425780      13% /
/dev/sda3      ext4       181259592  144077260   27974884      84% /media/1e977a7a-28c1-4f8f-a53b-c5a9a7379605

What happened is I went through a clean OS install from a USB stick. I only intended to overwrite sda1 but the install re-wrote the whole disk to one main large partition with a 10Gig swap partition at the end. I have tried to recover sda3 using testdisk and gparted but it does not detect the partition I am after.

Question is, can I recover this partition or at least pull off some files? Is there any other method I can try? Would the following link instructions work? http://www.tldp.org/HOWTO/Partition/recovering.html

A run of testdisk on deep scan shows the following information:

TestDisk 7.1-WIP, Data Recovery Utility, May 2017
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/sdc - 256 GB / 238 GiB - CHS 31130 255 63
     Partition               Start        End    Size in sectors
 D Linux                    0  32 33  6374  59 21  102400000
 D Linux                    0  32 33 29866  64 22  479799296
 D Linux                    9  78  6 29875 109 58  479799296
 D Linux                    9 110 38 29875 142 27  479799296
 D Linux                   11  23 13 29877  55  2  479799296
 D Linux                   14 200 59 29880 232 48  479799296
 D Linux Swap           29866  96 55 31130 223  5   20314112
 D Linux Swap           30621  18 54 31130 190 36    8187904


Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 245 GB / 228 GiB
Thomas
  • 4,225
  • 5
  • 23
  • 28
adamst85
  • 1
  • 1

1 Answers1

3

This depends entirely on how much has been overwritten. You may be able to recover anything from some files to the entire partition, but probably something will be broken.

The tutorial seems ok. If you want to test some methods, don't use them on the original drive but clone first. (That's also what you should have done before repartitioning a drive that's in use.)

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
  • Thanks for the reply @esa-jokinen . I have a backup of most of the important stuff but there is some other data that was not that I would like to get if possible. Anyway I have created an image of the HDD and tried finding the ext4 superblocks, but have had no luck. I think I will try [this](https://unix.stackexchange.com/a/103928) next and let it run. Don't have much hope for recovery at this point. – adamst85 May 22 '17 at 02:03