1

I booted from a Ubuntu live cd to format but I used Disks to view the partitions and accidentally fast formatted the disk without saving the files to my pendrive.

Then I installed gpart to view the start and end areas so I can restore the partitions with parted.

sudo gpart /dev/sda returns:

* Warning: more than 4 primary partitions: 8.
Partition(Linux ext2 filesystem): primary 
Partition(Linux ext2 filesystem): primary 
Partition(Linux ext2 filesystem): primary 
Partition(Linux ext2 filesystem): primary 
Partition(Linux ext2 filesystem): invalid primary 
Partition(Linux swap or Solaris/x86): invalid primary 
Partition(Linux ext2 filesystem): invalid primary 
Partition(Linux ext2 filesystem): invalid primary 
Ok.

Guessed primary partition table:
Primary partition(1)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 477mb #s(976896) s(6144-983039)
   chs:  (0/97/34)-(61/48/51)d (0/97/34)-(61/48/51)r

Primary partition(2)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 14648mb #s(29999104) s(983040-30982143)
   chs:  (61/48/52)-(1023/254/63)d (61/48/52)-(1928/140/4)r

Primary partition(3)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 14648mb #s(29999104) s(30982144-60981247)
   chs:  (1023/254/63)-(1023/254/63)d (1928/140/5)-(3795/231/20)r

Primary partition(4)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 19531mb #s(39999488) s(60981248-100980735)
   chs:  (1023/254/63)-(1023/254/63)d (3795/231/21)-(6285/193/52)r

Then I used parted to rescue with partitions typing the start and end of this 4 partitions, the problem is the last 4 partitions that gpart doesn't show, that partitions have all the important data.

Does someone know how to get the start and end of the 4 last partitions or other way to recover them?

1 Answers1

0

I solved this. This is what I did:

I installed TestDisk and selected to not save any logs, then the partition type GPT and proceeded to scan for partitions. It found all the partitions.

After that, with parted /dev/sda > rescue and adding the start and end numbers of each partition from TestDisk I recovered everything.