Invalid GPT backup header

Warren Block wblock at
Tue Jul 10 00:49:19 UTC 2012

On Mon, 9 Jul 2012, dweimer wrote:

> I have had a few virtual machine installations come up with "gptboot: invalid 
> GPT backup header" error message while booting. (some immediately on first 
> boot after install) They still boot fine, and run without problems, but I 
> would like to find a way to fix the problem.  Does anyone know how you can 
> write a new GPT backup header to the partition table.

See the gpart recover command covered in the RECOVERING section in 

> I have even gone to the extent of adding a second virtual disk, using 
> gpart to create a partition table and then add new partitions and 
> setup bootstrap then use cpio to copy data over and switched the drive 
> SCSI IDs within the virtual machines configuration to boot from the 
> second drive instead.  Still same error message when booting off the 
> new drive.  I did however leave out the size option when creating the 
> last UFS partition so it may have filled to the end and overwrote the 
> backup GPT table.

gpart will not overwrite the backup GPT with a partition.  Other stuff 
may not be GPT-aware.

More information about the freebsd-questions mailing list