public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* BUG: fdisk, gpt broken on 32bit big endian systems
@ 2014-05-30  3:31 Ruediger Meier
  2014-05-30  8:26 ` Karel Zak
  2014-05-30  8:54 ` Karel Zak
  0 siblings, 2 replies; 4+ messages in thread
From: Ruediger Meier @ 2014-05-30  3:31 UTC (permalink / raw)
  To: util-linux

Hi,

This ...

$ rm -f xxx; truncate -s 10M xxx
$ echo -ne "g\nx\ni\n26841E90-46E0-4205-B012-4B8AEC35C088\nr\nw\nq\n" | fdisk xxx

... creates a broken gpt image on 32bit big endian systems.

"hexdiff" xxx-broken xxx-good:
 00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
 009ffe00  45 46 49 20 50 41 52 54  00 00 01 00 00 02 00 00  |EFI PART........|
-009ffe10  68 a5 49 d1 00 00 00 00  ff ff ff ff ff ff ff ff  |h.I.............|
+009ffe10  15 b9 f3 7e 00 00 00 00  ff 4f 00 00 00 00 00 00  |...~.....O......|
 009ffe20  01 00 00 00 00 00 00 00  00 08 00 00 00 00 00 00  |................|
 009ffe30  de 4f 00 00 00 00 00 00  90 1e 84 26 e0 46 05 42  |.O.........&.F.B|
 009ffe40  b0 12 4b 8a ec 35 c0 88  df 4f 00 00 00 00 00 00  |..K..5...O......|


Looks like the backup header is broken.

Notes:
  - I only used fixed uuid to have better diff.
  - 64bit big endian systems are not broken

cu,
Rudi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-30 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-30  3:31 BUG: fdisk, gpt broken on 32bit big endian systems Ruediger Meier
2014-05-30  8:26 ` Karel Zak
2014-05-30  8:54 ` Karel Zak
2014-05-30 11:52   ` Ruediger Meier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox