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

From: Phillip Susi <[email-masked]>
Date: Thu, 27 Mar 2014 12:55:31 -0400

Having thought about it over lunch, I think I see what is going on
here now.  gpt-header-munge is broken and writes the backup to an
offset of 2gb rather than 20mb, extending the "disk".  But
LastUsableLba still says it's 20mb.  This caused parted to complain
that the backup was in the wrong place.

Parted is correct here: the backup *is* in the wrong place, since it
is at the end of where *we* think the disk is rather than where the
header thinks it is.  I changed the code to be this way in the first
place so that this complaint would not be triggered by growing a disk,
leaving both the LastUableLba and backup locations unchanged.