Web lists-archives.com

recovering a partition table




Whilst trying to create one partition out of two (using disks)  I
appear to have accidentally deleted the partition table of (almost) the
whole drive. It still has the swap partition and an unknown partition
of zero size apparently with 2tb of freespace. It was 10gb swap, 1tb,
50 gb, and two at roughly 500gb each at the end.

How do I recover the original partition table?

This is what gpart says but the partitions were ext4 so would like to
know if writing this will be OK and indeed how to write it considering
the reported errors further below. It seems to not understand the
extended partitions they sat in.

root@goodoldmusic:~# gpart /dev/sdb

Begin scan...
Possible partition(Linux swap), size(9536mb), offset(1mb)
Possible partition(Linux ext2), size(953673mb), offset(9538mb)
Possible partition(Linux ext2), size(476836mb), offset(963212mb)
Possible partition(Linux ext2), size(47683mb), offset(1440049mb)
Possible partition(Linux ext2), size(190733mb), offset(1487733mb)
Possible partition(Linux ext2), size(229261mb), offset(1678468mb)
End scan.

Checking partitions...

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

Guessed primary partition table:
Primary partition(1)
   type: 130(0x82)(Linux swap or Solaris/x86)
   size: 9536mb #s(19529728) s(2048-19531775)
   chs:  (0/32/33)-(1023/254/63)d (0/32/33)-(1215/203/12)r

Primary partition(2)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 953673mb #s(1953122304) s(19533824-1972656127)
   chs:  (1023/254/63)-(1023/254/63)d (1215/235/45)-(122792/42/2)r

Primary partition(3)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 476836mb #s(976560128) s(1972658176-2949218303)
   chs:  (1023/254/63)-(1023/254/63)d (122792/74/35)-(183580/88/60)r

Primary partition(4)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 47683mb #s(97654784) s(2949220352-3046875135)
   chs:  (1023/254/63)-(1023/254/63)d (183580/121/30)-(189659/52/25)r