New BSD Installer
avg at FreeBSD.org
Fri Feb 17 21:39:13 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
on 17/02/2012 16:28 Hiroki Sato said the following:
> Andriy Gapon <avg at FreeBSD.org> wrote in <4F3E3000.9000206 at FreeBSD.org>:
> av> -----BEGIN PGP SIGNED MESSAGE----- av> Hash: SHA1 av> av> on 17/02/2012
> 09:04 Hiroki Sato said the following: av> > No, the issue is our gptloader
> assumes the backup header is always located av> > at the (physical) last
> sector while this is not mandatory in the UEFI av> > specification. av> av>
> Are you sure?
> Yes, sure. In the gm0->md0+md1 case, the last LBA of the "device" is
> changed (growed in size) but they can still have a valid backup header at
> "the last LBA - 1" before an attempt to grow the size of the volume as the
> last paragraph of your excerpts says. If we *choose* to grow the device
> size permanently, the backup header must be relocated at the new last LBA.
> However, before the relocation happens, the specification says both the
> primary and secondary header must be valid in the previous device size.
> This is my understanding.
No, not before the relocation, but before the resizing.
The specification just tries to protect against unexpected situations during
the resizing, which otherwise should be a quick "almost-atomic" operation.
> This means software should assume the device size can grow and should not
> assume the backup header is always located at the last possible LBA on the
> device. If AlternateLBA does not match "the device size - 1", the software
> should recognize the location of the backup header based on the information
> in the primary header first.
Nowhere in the specification this requirement is placed on software. The
specification is quite explicit in using the word "must" when referring to the
placement of the backup header at the last LBA.
I don't follow your suggestion of putting FreeBSD into a position of
permanently living "in the moment" between now and potentially resizing the
volume in the undetermined future.
And just in case:
Unified Extensible Firmware Interface Specification Version 2.3.1, Errata A
September 7, 2011 says:
> Two GPT Header structures are stored on the device: the primary and the
> backup. The primary GPT Header must be located in LBA 1 (i.e., the second
> logical block), and the backup GPT Header must be located in the last LBA
> of the device.
I can not see any ambiguity or openness to interpretation in this paragraph.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the freebsd-stable