Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] How to fix "Alternate GPT is invalid, using primary GPT"?

Need help with peripherals or devices?
Post Reply
Message
Author
Xflash2006
Posts: 8
Joined: 2024-02-02 19:49
Has thanked: 1 time

[Solved] How to fix "Alternate GPT is invalid, using primary GPT"?

#1 Post by Xflash2006 »

In the kernel logs provided by the dmesg command it says "Alternate GPT is invalid, using primary GPT.".
If I verify the /dev/nvme0n1 disk with the gdisk command I get:

Code: Select all

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Problem: main GPT header's current LBA pointer (1) doesn't
match the backup GPT header's alternate LBA pointer(500118191).

Problem: main GPT header's backup LBA pointer (500118191) doesn't
match the backup GPT header's current LBA pointer (1).
The 'e' option on the experts' menu may fix this problem.

Problem: The backup partition table overlaps the backup header.
Using 'e' on the experts' menu may fix this problem.

Identified 4 problems!
Is it sufficient to execute the "e" command from the expert menu?
Expert menu commands

Code: Select all

a	set attributes
b	byte-swap a partition's name
c	change partition GUID
d	display the sector alignment value
e	relocate backup data structures to the end of the disk
f	randomize disk and partition unique GUIDs
g	change disk GUID
h	recompute CHS values in protective/hybrid MBR
i	show detailed information on a partition
j	move the main partition table
l	set the sector alignment value
m	return to main menu
n	create a new protective MBR
o	print protective MBR data
p	print the partition table
q	quit without saving changes
r	recovery and transformation options (experts only)
s	resize partition table
t	transpose two partition table entries
u	replicate partition table on new device
v	verify disk
w	write table to disk and exit
z	zap (destroy) GPT data structures and exit
?	print this menu
Last edited by Xflash2006 on 2024-03-07 17:33, edited 1 time in total.

Xflash2006
Posts: 8
Joined: 2024-02-02 19:49
Has thanked: 1 time

Re: How to fix "Alternate GPT is invalid, using primary GPT"?

#2 Post by Xflash2006 »

I executed the "e" command from the expert menu but this problem remains:

Code: Select all

Problem: main GPT header's current LBA pointer (1) doesn't
match the backup GPT header's alternate LBA pointer(500118191).

Identified 1 problems!
How can I solve it?

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 628
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 84 times
Been thanked: 98 times

Re: How to fix "Alternate GPT is invalid, using primary GPT"?

#3 Post by wizard10000 »

As root:

Code: Select all

sgdisk -v /dev/nvme0n1
sgdisk will detect the error and repair it.

Good luck!
we see things not as they are, but as we are.
-- anais nin

Xflash2006
Posts: 8
Joined: 2024-02-02 19:49
Has thanked: 1 time

Re: How to fix "Alternate GPT is invalid, using primary GPT"?

#4 Post by Xflash2006 »

With the command you gave me the problem was solved.
Thank you!

Post Reply