* 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
* Re: BUG: fdisk, gpt broken on 32bit big endian systems
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
1 sibling, 0 replies; 4+ messages in thread
From: Karel Zak @ 2014-05-30 8:26 UTC (permalink / raw)
To: Ruediger Meier; +Cc: util-linux
On Fri, May 30, 2014 at 05:31:00AM +0200, Ruediger Meier wrote:
> 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......|
^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
crc32 reserved header LBA
The problem is the LBA, "ff ff ff ff ff ff ff ff" seems strange :-)
(Correct is ff4f, (means 0x4fff * 512 + 512 = 10485760, 10MiB).
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: BUG: fdisk, gpt broken on 32bit big endian systems
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
1 sibling, 1 reply; 4+ messages in thread
From: Karel Zak @ 2014-05-30 8:54 UTC (permalink / raw)
To: Ruediger Meier; +Cc: util-linux
On Fri, May 30, 2014 at 05:31:00AM +0200, Ruediger Meier wrote:
> $ 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......|
Fixed now, I hope (not tested on 32bit BE, but the code was so
stupid that it has to be the problem :-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: BUG: fdisk, gpt broken on 32bit big endian systems
2014-05-30 8:54 ` Karel Zak
@ 2014-05-30 11:52 ` Ruediger Meier
0 siblings, 0 replies; 4+ messages in thread
From: Ruediger Meier @ 2014-05-30 11:52 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On Friday 30 May 2014, Karel Zak wrote:
> On Fri, May 30, 2014 at 05:31:00AM +0200, Ruediger Meier wrote:
> > $ 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......|
>
> Fixed now, I hope (not tested on 32bit BE, but the code was so
> stupid that it has to be the problem :-)
Thanks! This works.
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