Take the 2-minute tour ×

I have a 2TB SATA drive that was being used as file storage on my UBUNTU computer. I was re-imaging my windows box so I used that drive to back up some files to it. I did this by taking the drive from my windows PC and putting it in my UBUNTU PC, mounted it and copied the files over.

After the windows refresh I thought it would be easier to take the 2 TB drive and dock it in the external dock my Windows case has built in. Anyway it would recognize in BIOS but windows would not see it (because it was EXT3 or EXT4) so when I went into the disk manager it advised me the drive needed to be initialized. Me not thinking I initialized it as a GUID Partition table. Now it sees it as a blank drive, even in UBUNTU.

I have done nothing else to write or change the drive. I was wondering if there is a qay to repair the old partitioning and get access to my files back?

many thanks!

EDIT: I followed the instructions in the link @kniwor sent me. I used the command

sudo gpart -W /dev/sda /dev/sda

and here was the result:

Guessed primary partition table:
Primary partition(1)
   size: 0mb #s(1) s(2861671176-2861671176)
   chs:  (1023/254/63)-(1023/254/63)d (178130/202/1)-(178130/202/1)r

Primary partition(2)
   size: 0mb #s(1) s(3484550160-3484550160)
   chs:  (1023/254/63)-(1023/254/63)d (216903/55/1)-(216903/55/1)r

Primary partition(3)
   type: 000(0x00)(unused)

Primary partition(4)
   type: 000(0x00)(unused)

Not sure it found what I wanted. suggestions?

share|improve this question
askubuntu.com/questions/31450/… –  One Zero Feb 21 '12 at 21:07

1 Answer 1

As long as you have not written any data on the file, you can try recreating the old partition table and everything should be fine. This guide here has some tools that can help you do that


share|improve this answer
Thanks I am trying the command 'gpart -W /dev/sda /dev/sda' and it is running now. I was going to try doing 'sudo parted /dev/sda' then do 'rescue' but I am not sure what to put for the START and END paramets, the partition was the whole drive. –  TheJoester Feb 21 '12 at 23:52
Since you are trying to restore your entire partition table, gpart should do fine. –  ste_kwr Feb 22 '12 at 0:15

Your Answer


