public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Ruediger Meier <sweet_f_a@gmx.de>
Cc: util-linux@vger.kernel.org
Subject: Re: BUG: fdisk, gpt broken on 32bit big endian systems
Date: Fri, 30 May 2014 10:26:54 +0200	[thread overview]
Message-ID: <20140530082654.GC9000@x2.net.home> (raw)
In-Reply-To: <201405300531.00403.sweet_f_a@gmx.de>

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

  reply	other threads:[~2014-05-30  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-30  3:31 BUG: fdisk, gpt broken on 32bit big endian systems Ruediger Meier
2014-05-30  8:26 ` Karel Zak [this message]
2014-05-30  8:54 ` Karel Zak
2014-05-30 11:52   ` Ruediger Meier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140530082654.GC9000@x2.net.home \
    --to=kzak@redhat.com \
    --cc=sweet_f_a@gmx.de \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox