GPT: Use GNU Parted to correct GPT errors.

スポンサーリンク

「GPT: Use GNU Parted to correct GPT errors.」が出力されていたので、その時に対応した方法です。

検証した環境

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ uname -r
5.15.56-v8+

ログに出力されている内容

/var/log/kern.logに出力されていた内容です。

GPT:Primary header thinks Alt. header is not at the end of the disk.
GPT:468862123 != 468862127
GPT:Alternate GPT header not at the end of the disk.
GPT:468862123 != 468862127
GPT: Use GNU Parted to correct GPT errors.

対応した内容

PMBR(Protective Master Boot Record)サイズが合っていないようです。書き込み(w)を行うことで、修正されるようです。

$ sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

GPT PMBR size mismatch (468862123 != 468862127) will be corrected by write.
The backup GPT table is not on the end of the device.
 This problem will be corrected by write.

Command (m for help): w
The partition table has been altered.
Syncing disks