summaryrefslogtreecommitdiffstats
path: root/disk-utils/sfdisk.8
diff options
context:
space:
mode:
authorKarel Zak2015-01-09 13:05:49 +0100
committerKarel Zak2015-01-09 13:05:49 +0100
commit4bb82a455461e42644c9b3d8aa1206ad8889ed35 (patch)
tree49ef3dbe5f947a2fe31225cde66e69aecd56d772 /disk-utils/sfdisk.8
parentMerge branch 'master' of https://github.com/pali/util-linux (diff)
downloadkernel-qcow2-util-linux-4bb82a455461e42644c9b3d8aa1206ad8889ed35.tar.gz
kernel-qcow2-util-linux-4bb82a455461e42644c9b3d8aa1206ad8889ed35.tar.xz
kernel-qcow2-util-linux-4bb82a455461e42644c9b3d8aa1206ad8889ed35.zip
libfdisk: (gpt) cleanup header size usage
Kay reported that Windows 8.1 installed does not recognize GPT created by libfdisk, but parted works as expected. It seems (according to the header hexdump) that the problem is HeaderSize GPT field where libfdisk uses 512 (header + reserved area), but parted uses 92. The both is pretty valid according to the current EFI standard, but 92 is probably more backwardly compatible. I also found places in code where libfdisk gpt driver is inconsistent and uses sometimes all sector and simetimes sizeof(gpt_header) only. The right solution is to read all sector (into zeroized memory) and later write again all sector to the device. Reported-by: Kay Sievers <kay@vrfy.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/sfdisk.8')
-rw-r--r--disk-utils/sfdisk.82
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/sfdisk.8 b/disk-utils/sfdisk.8
index b36ddef82..03443d3a6 100644
--- a/disk-utils/sfdisk.8
+++ b/disk-utils/sfdisk.8
@@ -337,7 +337,7 @@ For example:
The GPT header can later be restored by:
.RS
.sp
-.B dd if=~/sfdisk-sda-0x00000200.bak of=/dev/sda seek=$((0x00000200.bak)) bs=1 conv=notrunc
+.B dd if=~/sfdisk-sda-0x00000200.bak of=/dev/sda seek=$((0x00000200)) bs=1 conv=notrunc
.sp
.RE
Note that \fBsfdisk\fR since version 2.26 no longer provides the \fB\-I\fR option to