OCE and GPT
Andrey V. Elsukov
bu7cher at yandex.ru
Wed Apr 21 17:48:20 UTC 2010
21.04.10, 16:59, Andriy Gapon:
> > providers withing scheme. But with GPT we have problem, after
> > booting with bigger media size the second partition table will
> > be lost. And GPT will be broken.
> Do we have it hardcoded where to look for the secondary GPT?
Yes. Current implementation does search for second GPT table only at last LBA.
And it violates with UEFI 2.3 specification.
> I also think that this recovery mechanism is needed.
> In short:
> recover - re-create secondary table based on primary table
Also there can be situation when primary table is corrupted, but secondary isn't.
> reinit - relocate secondary table to a new position and update offsets in both
> tables accordingly
What should reinit do when nothing was changed?
> > it was before? Should we reject this way of recovering and allow recovering
> > only for the same size or bigger media size?
> I think that we could allow smaller media size _provided_ that lost space doesn't
> overlap with any partitions found in primary table. Otherwise it's a data loss
> scenario and a user should be left to deal with it. IMHO, of course.
Current implementation rejects table where 'LastUsableLBA' is greather than last
medium's LBA. This behavior also doesn't described in UEFI spec. =)
I think if we will have recover and reinit verbs implemented we can change some algorithms
of table detection.
WBR, Andrey V. Elsukov
More information about the freebsd-geom