首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >修正使用dd将较小的磁盘克隆到较大磁盘上的GPT

修正使用dd将较小的磁盘克隆到较大磁盘上的GPT
EN

Unix & Linux用户
提问于 2022-09-30 10:55:21
回答 1查看 669关注 0票数 1

我使用dd将较小的磁盘克隆到更大的磁盘上,但是现在在引导时,我得到了以下方面的dmesg错误:

代码语言:javascript
运行
复制
[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,但我不确定要运行哪些命令?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2022-09-30 11:19:40

您不需要做任何特殊的事情,只需使用p打印有关磁盘的信息,parted会告诉您分区表是错误的,并问您要做什么,所以只需告诉Fix它:

代码语言:javascript
运行
复制
# 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)。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/719264

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档