1

I made a mistake and I removed multiple partitions from my partition table.

I want to rewrite my partition table. I tested "TestDisk" but when I wanted to set the type, I always got "Structure Bad" error. I can only select four partition with "TestDisk" for write.

When I scan with gpart I have this :

Checking partitions...

* Warning: more than 4 primary partitions: 9.
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary 
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary 
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary 
Partition(Linux swap or Solaris/x86): primary 
Partition(Linux ext2 filesystem): invalid primary 
Partition(Linux ext2 filesystem): invalid primary 
Partition(Linux ext2 filesystem): invalid primary 
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): invalid primary 
Partition(Linux ext2 filesystem): invalid primary 
Ok.

I want to set all primary and the first must be the booting partition.

When I type:

gpart -W /dev/sda /dev/sda

I can just write the first four partitions.

Can you help me please ?

  • One from first 4 should be extended. And the rest (after 4) should be logical – Romeo Ninov Mar 17 '16 at 12:30
  • Ok, how i can write this in my partition table ? – OOM Mar 17 '16 at 12:31
  • You can recreate them one by one and write the result. But you should be very precise about the sizes, borders and types of each of them. Otherwise you risk to mess the things even more – Romeo Ninov Mar 17 '16 at 12:35
  • The only way it's to write one by one in the partition table ? No automatic way to do that ? – OOM Mar 17 '16 at 12:38
  • There are products you can use to restore, i saw EaseUS Partition Recovery can do this (have no affiliation with manufacturer). But you need running OS – Romeo Ninov Mar 17 '16 at 12:40

Your Answer

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

Browse other questions tagged or ask your own question.