Invalid GPT backup header

dweimer dweimer at
Mon Jul 9 20:11:48 UTC 2012

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.  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.

I have searched online for a solution to recreating the backup GPT 
header from the main header, but I have been unable to find anything.  
Not sure if I am missing something simple, if no one else has had this 
problem, or if others are just ignoring it since their system works even 
with it?  All the machines with the problem are VMware hosted machines, 
some on ESX, and some on VMware Workstations.

    Dean E. Weimer

More information about the freebsd-questions mailing list