Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had a problem where my ubuntu installer would not recognize my windows partition, so i looked it up, and someone suggested 'zapping' GPT from my hdd with sudo gdisc /dev/sdb followed by x, z, y, n. (expert mode, zap gpt, yes to remove gpt, no to wipe MBR).

This, it was explained would fix my problem, but saying no to wiping MBR would mean my windows partition wasn't lost. Which then turned out not to be the case, so I'm not finding my OS anymore, and being a retard i didn't do any backups or anything like that. Is all hope lost for me? Or is there some way to restore the GP tables ?

I'm pretty horrible with partitions.

share|improve this question
    
I've never personally use the zap command in gdisc but it should be possible to rebuild your main gpt table using the backup gpt table stored at the end of disk but that's only if the command didn't also wipe the backup table. –  Flint Dec 16 '13 at 1:07
    
Great, how would i go about doing that? –  Kasper HJ Dec 16 '13 at 1:25
    
@Flint, zap gets rid of both copies, otherwise it wouldn't be very useful. –  psusi Dec 16 '13 at 2:09
    
If you also did not erase MBR and did convert all partitions to MBR, then you should be able to use gdisk to convert back to gpt. If you erased MBR also then testdisk may find old partitions. UEFI Windows only boots from gpt partitioned drives. –  oldfred Dec 16 '13 at 5:32
add comment

1 Answer 1

Your best bet is to run TestDisk on your system. It searches for filesystem information and can create fresh partition table entries for any filesystem(s) it finds. This is most likely to work easily if the disk hasn't been significantly repartitioned, though -- if you've repeatedly resized, moved, or created new partitions, leftover fragments of old partitions may confuse TestDisk. Even if you've done this, though, it's worth trying. I believe that TestDisk is available in the Ubuntu testdisk package, so you should be able to install and use it from an Ubuntu live CD.

share|improve this answer
    
Thanks, I did try this, and I believe it IS the best bet - unfortunately, I think I'd been trying too invasive stuff at that point, and ended up redoing the computer. Is flagging your comment as an accepted answer appropriate? –  Kasper HJ Jan 12 at 15:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.