more gpart/glabel problems
Daniel Braniss
danny at cs.huji.ac.il
Fri Jan 14 12:09:40 UTC 2011
> This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
> --------------enig796DC9FCBCDF02E77B675B44
> Content-Type: text/plain; charset=KOI8-R
> Content-Transfer-Encoding: quoted-printable
>
> On 14.01.2011 14:33, Daniel Braniss wrote:
> >> On 14.01.2011 13:37, Daniel Braniss wrote:
> >>> and on the console:
> >>> GEOM: mfid0: the secondary GPT table is corrupt or invalid.
> >>> GEOM: mfid0: using the primary only -- recovery suggested.
> >>> GEOM: mfid0: the secondary GPT table is corrupt or invalid.
> >>> GEOM: mfid0: using the primary only -- recovery suggested.
> >>> GEOM: label/r0: corrupt or invalid GPT detected.
> >>> GEOM: label/r0: GPT rejected -- may not be recoverable.
> >>>
> >>> BTW, going the MBR way, it works as expected.
> >>>
> >>> so what am I doing wrong?
> >>
> >> GLABEL saves his metadata in the last sector of the given provider
> >> where secondary GPT is located. You can label mfid0 with glabel and
> >> after that create GPT on top of label/r0. This should work.
> >=20
> > I guess 'should' is the right word, because it doesn't :-)
> > # glabel label r0 mfid0
> > # gpart create -s GPT label/r0
> > label/r0 created
> > but on console:
> > GEOM: mfid0: the secondary GPT header is not in the last LBA
> > next:
> > # gpart add -b 34 -s128 -t freebsd-boot $d
> > on console: more of the same, and
> > # gpart show
> > =3D> 34 1952448444 label/r0 GPT (931G)
> > 34 128 1 freebsd-boot (64K)
> > 162 1952448316 - free - (931G)
> > =09
> > =3D> 34 1952448444 mfid0 GPT (931G) [CORRUPT]
> > 34 128 1 freebsd-boot (64K)
> > 162 1952448316 - free - (931G)
> > danny
>
> It works as expected. Both providers label/r0 and mfid0 have primary GPT,=
>
> but label/r0 is one sector smaller than mfid0 and GPT's metadata is valid=
>
> only for label/r0. mfid0 marked as CORRUPT and you can not modify it.
> Please read RECOVERING section of gpart(8) manual page.
he, he, did that before, it just removes the label/s
anyways, I believe that I'm now on a better track, ie:
# gpart create -s GPT mfid0
mfid0 created
# gpart add -b 34 -s128 -t freebsd-boot -l r0/boot mfid0
mfid0p1 added
# gpart add -s2G -t freebsd-ufs -l r0/root mfid0
and now, in /dev/gpt:
r0/boot
r0/root
thanks Stephan and Andrey,
danny
More information about the freebsd-hackers
mailing list