我使用dd将较小的磁盘克隆到更大的磁盘上,但是现在在引导时,我得到了以下方面的dmesg错误:
[Fri Sep 30 11:48:43 2022] GPT:Primary header thinks Alt. header is not at the end of the disk.
[Fri Sep 30 11:48:43 2022] GPT:1953525167 != 3907029167
[Fri Sep 30 11:48:43 2022] GPT:Alternate GPT header not at the end of the disk.
[Fri Sep 30 11:48:43 2022] GPT:1953525167 != 3907029167
[Fri Sep 30 11:48:43 2022] GPT: Use GNU Parted to correct GPT errors.
我怎么解决这个问题?错误指示要使用parted,但我不确定要运行哪些命令?
发布于 2022-09-30 11:19:40
您不需要做任何特殊的事情,只需使用p
打印有关磁盘的信息,parted会告诉您分区表是错误的,并问您要做什么,所以只需告诉Fix
它:
# parted /dev/loop0
GNU Parted 3.5
Using /dev/loop0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Warning: Not all of the space available to /dev/loop0 appears to be used, you can fix the GPT to use all of the space (an extra 10485760 blocks) or continue with the current setting?
Fix/Ignore? Fix
...
(当然,将/dev/loop0
替换为您的磁盘,例如/dev/sda
)。
https://unix.stackexchange.com/questions/719264
复制相似问题