Subject: bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1

From: Phillip Susi <[email-masked]>
Date: Thu, 27 Mar 2014 20:04:28 -0400

On 03/27/2014 06:48 PM, Brian C. Lane wrote:
> Tried that (with my modified code) and it works fine. The header
> munge is changing the PE count to 9 from 128 and re-calculating the
> checksums.
> 
> I went through the code -- when we rewrite the headers all the
> sizes and references are updated, in the pmbr and in both headers.

Ok, now I'm not seeing that odd 2g problem.  Maybe before I was
running it on a 32 bit machine?  Anyhow, the problem is that
gpt-header-munge shrinks the table but doesn't update LastUsableLba to
agree.  It should do that, but I suppose we could put the two tests
together.  If the backup is *either* at the last sector, *or* the
right location relative to LastUsableLba, then it's in the right place.

Following up with a patch to do this.