I'm having an issue which I'm having a hard time trying to fix with a USB stick. I was trying to get this USB formatted cleanly and ready to be used for a USB Installer, but for some reason it's putting out an error that the GPT table backup is corrupt but the main is OK. I've briefly checked over the usage for gdisk to try and FIX the issue by wiping the GPT table completely and making a new one from scratch, [ as from this guide here ].

on first inspection of my USB stick, which is /dev/sde with gdisk is the following;

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

Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

I go through the list of available commends and entered x for Expert mode and selected z option to zap everything so I can just clean out all the GPT tables. But I go back into gdisk again to verify it, and nothings changed, it still holds it's corrupt GPT table backup, yet the main is OK, even though it should of been wiped completely with the z option.

What is wrong with this? it should of cleared and let me start fresh with a new GPT table with a fresh protective MBR table also. I can't even fix this with GParted either by selecting an entirely different partition table. I did try the r option with gdisk for recovery and transformation options but they didn't seem to work either. It wouldn't read the OK main GPT table and replace the corrupt backup GPT table with the valid one. I did make sure to use the w option to write everything to the disk and exit.

  • does something like wipefs -a nuke the backups? – thrig Nov 14 '17 at 17:22
  • I assume your USB stick is damaged. The backup table, iirc, is positioned at the end of the disk. I assume, since you tried re-writing it there several times, the disk is damaged. can you post the output of dmesg when you perform operations on the USB stick ? I am expecting I/O errors. – thecarpy Nov 14 '17 at 17:24
  • sudo dd if=/dev/zero of=/dev/sde bs=4K status=progress – Arpit Agarwal Nov 14 '17 at 17:58
  • First off your link seems to be confusing gparted with gpt fdisk (gdisk) which are different programs. Second Z doesn't do what you think it does. Instead do R then D option. – jdwolf Nov 14 '17 at 18:56

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.