2

When I run from a LiveCD to try to recover a non-booting system, I run gdisk /dev/sda and get

Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

so I think I'm supposed to do r then e but when I do e it says:

e   load main partition table from disk (rebuilding backup)
Recovery/transformation command (? for help): e
Warning! This will probably do weird things if you've converted an MBR to
GPT form and haven't yet saved the GPT! Proceed? (Y/N): Y

but now I guess I have to write to disk, but when I select w it threatens to overwrite my old partition table like:

Recovery/transformation command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

so I say 'no' for now and then v to verify things, to which it responds:

Recovery/transformation command (? for help): v
No problems found. 3309 free sectors (1.6 MiB) available in 2
segments, the largest of which is 2014 (1007.0 KiB) in size.

So does that mean it fixed things and it would be okay to overwrite the existing partitions yet? I've already made a backup of the partition table using the b menu.

batflaps
  • 121
  • 1
  • Is drive MBR or gpt? There even is hybrid, which is part MBR, part gpt which is not recommended. You have to do the w to write a new gpt table. If you have Windows 7 it probably was MBR and you do not want to convert to gpt. http://askubuntu.com/questions/460233/cant-restore-my-gpt-data-with-gdisk OR: http://askubuntu.com/questions/460233/cant-restore-my-gpt-data-with-gdisk – oldfred Jul 13 '16 at 03:31
  • Here's what I get when I run gdisk: `GPT fdisk (gdisk) version 0.8.10 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT.` I'm running Debian Jessie. I used `w` and it wrote stuff, we'll see how it works, now running fsck.ext4, it's fixing lots of stuff and taking awhile. – batflaps Jul 13 '16 at 19:52

0 Answers0