I have a corrupt the partition table on the laptop that is running Ubunutu 10.4.

Before the partition table was corrupt I had the following partitions: 2 primary partitions: 1st - NTFS 2nd - Extended 4 logical partitons that are built within 2nd extended: 1st NTFS (68 Gib) 2nd Linux (19 Gib) 3rd Swap (1.4 Gib) 4th Linux (24 Gib)

The physical order of these partitions was the following: ( 4th Linux ) - ( 1st NTFS ) - ( 2nd Linux ) - ( 3rd Swap ) The logical order of the partition was different: ( 1st NTFS ) - ( 2nd Linux ) - ( 3rd Swap ) ( 4th Linux )

NTFS partition was big and it resided between 2 Linux partitions, neither of these partitions had enough space to install Oracle 11g. Therefore, I decided to a) either move the NTFS partion to the left or b) remove it completely and extend partition where Linux resides.

As I tool I have chosen GParted. But unfortunately it was not able to move the partition because he found that in NTFS partition there are some blocks that are referenced multiple times. Also it was not able to remove the partition neither, because in this case the partitions that follow it ( 2nd Linux ) - ( 3rd Swap ) have to be in his opinion also removed, because the organization of extended partition is a linked list.

Since GParted was not able to do such thing I was trying to find another tool. I found diskdrake tool on PSLinuxOS distribution of linux. That tool silently deleted ( 1st NTFS ) partition and I thought that everything was fine. But diskdrake has damaged the partition in a way that I am not able either to boot from the hard disk nor to see the partitions with GParted and even with diskdrake itself!

Fortunately I have a live CD of Ubuntu 8.10 and I am able to boot and see hard disk.

I have 2 ideas how I can solve the problem: 1) Manually change disk partitions and point them to the correct partitions. 2) Create partition table with GParted that as much as possible is the same with the previous one

I find the 2nd approach less time consuming but some data will be lost because of is not possible to place borders of the partitions exactly how it was before. And moreover I am not sure if such approach would work, for example, if the OS is able to locate files after repartitioning. I feel like that it will but not 100% sure.

Are there some ideas how the problem may be solved?

  • Unfortunately, none of the ideas you have are programming-related. I think you'll get a more targeted response over at superuser.
    – user53528
    Feb 16, 2011 at 4:56
  • or I was thinking about ask ubuntu
    – Timofey
    Feb 16, 2011 at 5:01
  • @paxdiablo: I think the 1st idea perfectly suits to a system programming: write a tool that allows accessing /dev/sda and change contents of MBR and a set of EBRs
    – Timofey
    Feb 16, 2011 at 5:06

1 Answer 1


Your best bet is probably to recover the partitions using testdisk. You will probably have to go through steps similar to the ones described here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .