Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2012 18:05:41 +0200
From:      Olivier Smedts <olivier@gid0.org>
To:        "Andrey V. Elsukov" <ae@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: CFR: backup GPT header support in pmbr and loader(8) (Re: Handbook mirroring section)
Message-ID:  <CABzXLYMbZi78FZgUcMRUJA1a41cRaSHMDGydTz_VDnk73fHGQQ@mail.gmail.com>
In-Reply-To: <4FD9EC14.8070203@FreeBSD.org>
References:  <4FCF3021.5070802@FreeBSD.org> <20120606.200735.1551208261335301113.hrs@allbsd.org> <4FD05573.70801@FreeBSD.org> <20120610.224813.710171778841273502.hrs@allbsd.org> <4FD9D4DF.9090609@FreeBSD.org> <CABzXLYPzgBmxGUMhbMSSa7Qxoo4pC4t8%2Bv1t_v6=9HMyP4LGmQ@mail.gmail.com> <4FD9EC14.8070203@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2012/6/14 Andrey V. Elsukov <ae@freebsd.org>:
> On 14.06.2012 17:08, Olivier Smedts wrote:
>> 2012/6/14 Andrey V. Elsukov <ae@freebsd.org>:
>>> Also, our PMBR image doesn't contain any partition entries and
>>> writing it to the disk with dd(1) makes the system unbootable.
>>> What you think if we will add one partition entry to the PMBR image?
>>> I modified your patch (the last hunk added) and it is attached.
>>
>> Isn't it gpart(8)'s job to write the proper boot code from the pmbr
>> image without damaging the partition table ?
>>
>> ie. "gpart bootcode -b /boot/pmbr ada0" instead of using dd.
>
> gpart(8) works only when GPT's geom exists, when PMBR is damaged
> GEOM_PART_GPT can't detect GPT and thus you can't use it.

IMO, GEOM_PART_GPT should not depend on the MBR do detect GPT. That's
the problem which should be fixed ; adding a partition to the MBR is
only a workaround (and what would happen if the sector 0 was
permanently damaged on disk ?). Why does GEOM_PART_GPT depends on the
sector LBA 0 while the GPT header is located at sector LBA 1 ? Don't
know the feasability of this, just saying... :-)

--=20
Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 ASCII ribbon campaign ( )
e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X
www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \

=A0 "Il y a seulement 10 sortes de gens dans le monde :
=A0 ceux qui comprennent le binaire,
=A0 et ceux qui ne le comprennent pas."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABzXLYMbZi78FZgUcMRUJA1a41cRaSHMDGydTz_VDnk73fHGQQ>