ddを使用して小さなディスクを大きなディスクに複製した後のGPTの修正

ddを使用して小さなディスクを大きなディスクに複製した後のGPTの修正

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を使用するように求められますが、どのコマンドを実行するのかわかりません。

ベストアンサー1

特別な作業を行う必要はありません。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。)

おすすめ記事