From e5f387e1d28faec7b52cc6e2e05d1285d3871252 Mon Sep 17 00:00:00 2001 From: iBug Date: Sat, 8 Feb 2025 01:42:22 +0800 Subject: [PATCH] records/2024-10-02: Correct GPT table size = 17 KiB --- docs/records/2024-10-02.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/records/2024-10-02.md b/docs/records/2024-10-02.md index 414ba41e..71bfc2fd 100644 --- a/docs/records/2024-10-02.md +++ b/docs/records/2024-10-02.md @@ -31,7 +31,7 @@ SPARSE_SIZE indicates the consecutive number of bytes (defaults to 4k) that must contain only zeros for qemu-img to create a sparse image during conversion. If SPARSE_SIZE is 0, the source will not be scanned for unallocated or zero sectors, and the destination image will always be fully allocated. ``` -在添加 `-S 0` 后测试,`qemu-img convert` 能够正常工作。由于一个 GPT 项只有 128B,而 `qemu-img` 默认 sparse size 为 4K,因此如果刚好对应的块设备区域没有被写零清空,那么本来为 0 的 GPT 表区域就会包含残留数据,进而导致了分区表校验和错误。 +在添加 `-S 0` 后测试,`qemu-img convert` 能够正常工作。由于整个 GPT 表有 17 KiB,而 `qemu-img` 默认 sparse size 为 4K,因此如果刚好对应的块设备区域没有被写零清空,那么本来为 0 的 GPT 表区域就会包含残留数据,进而导致了分区表校验和错误。 相关问题已反馈 Proxmox: 。经过内部讨论,我们暂时修改了 `QemuServer.pm` 添加 `-S 1M` 参数,并且 `apt-mark hold qemu-server` 锁定版本避免该 Perl 代码被覆盖。