Util-Linux package development
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Peter Cordes <peter@cordes.ca>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: sfdisk problem with a partition starting early on a GPT disk
Date: Mon, 2 Mar 2015 21:13:11 +0100	[thread overview]
Message-ID: <20150302201311.GM8046@ws.net.home> (raw)
In-Reply-To: <20150302161932.GX3933@cordes.ca>

On Mon, Mar 02, 2015 at 12:19:32PM -0400, Peter Cordes wrote:
>  If libfdisk doesn't actually store anything after sector 33, it would
> be nice if it wrote a GPT to disk that that has sector 34 as the
> first-usable. 

 I'm not sure, the common consensus is to use 1MiB offset for the
 first partition -- then it does not make sense to define
 FirstUsableLBA smaller, because the extra space between the first
 partition may be interpreted as gap and later (inadvertently)
 partitioned.

 Note the I'm talking about default layout, your example with 
 --dump and restore is different -- sfdisk has to be able to 
 copy existing partition tables.
 
 BTW, the problem should be fixed in git tree, you have to --dump with
 new sfdisk and then it will add "first-lba" number to scrit header.
 You can also use 

  label: gpt
  first-lba: 34

 lines to manually create a GPT header by sfdisk.

> That way, I could use gdisk to add a boot partition on
> each disk after copying the layout of the other partitions with
> sfdisk.  (That would be a minimal fix that isn't as nice as actually
> supporting copying arbitrary valid GPT partition tables.  But it

 It would be better to learn partitioning tools to modify
 FirstUsableLBA in GPT header. I'll probably implement it for v2.27
 fdisk, so creative users like you will be able to tune up their
 partition tables :-)

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2015-03-02 20:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-01 15:56 sfdisk problem with a partition starting early on a GPT disk Peter Cordes
2015-03-02 10:06 ` Karel Zak
2015-03-02 16:19   ` Peter Cordes
2015-03-02 20:13     ` Karel Zak [this message]
2015-03-02 22:31       ` Peter Cordes
2015-03-03  0:21         ` Karel Zak

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=20150302201311.GM8046@ws.net.home \
    --to=kzak@redhat.com \
    --cc=peter@cordes.ca \
    --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