Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Aug 2012 18:20:19 +0400
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        Lawrence Stewart <lstewart@freebsd.org>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, Marcel Moolenaar <marcel@freebsd.org>
Subject:   Re: gpart rewrites pmbr in a way which breaks Win 7 EFI bootloader
Message-ID:  <5023C723.90606@FreeBSD.org>
In-Reply-To: <5023A907.7060800@freebsd.org>
References:  <50237B73.9040301@freebsd.org> <5023979B.4010903@yandex.ru> <5023A907.7060800@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig88A52F6504CD8B59506F28AD
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

On 09.08.2012 16:11, Lawrence Stewart wrote:
>>> - Should gpart be writing 0x80 (active) in the protective MBR entry?
>>
>> AFAIK, this was added because some BIOS could not boot without it.
>=20
> Makes sense if gpart is writing the pmbr out i.e. "gpart bootcode -b
> /boot/pmbr <geom>", but manipulating an existing pmbr for a GPT specifi=
c
> subcommand smells dodgy to me.

When you create GPT it already has PMBR, because it is part of GPT
metadata. gpart's `bootcode' subcommand writes *bootcode* to specific
area in the PMBR.

>>>   - Why is Windows EFI bootloader so sensitive to 0x80 in pmbr?
>>
>> This question you should ask to the Microsoft. :)
>=20
> Perhaps I should rephrase my question as:
>=20
> Is the MS bootloader's behaviour reasonable/unreasonable based on what
> people know of the relevant specs? My current guess why it behaves like=

> this is that if it sees an MBR partition marked active, it simply
> assumes another OS is in charge and therefore bails out at the Windows
> EFI boot stage.

In the EFI system partition might be several boot loaders, and this MS
bootloader's behaviour seems strange to me.

> Can and should are two different things. I would argue it's a POLA
> violation at the very least to manipulate the pmbr when the user asked
> for something else. I certainly started my hunting expecting to find th=
e
> GPT changing in some subtle way when FreeBSD wrote it out compared to
> what Windows writes.
>=20
> We have a specific gpart command to put a pmbr in place so I think it's=

> reasonable to expect other GPT specific commands not to fiddle with the=

> pmbr.

Don't confuse bootcode in the PMBR and PMBR.

--=20
WBR, Andrey V. Elsukov


--------------enig88A52F6504CD8B59506F28AD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBAgAGBQJQI8coAAoJEAHF6gQQyKF6C9oH/1laFShQJp51rXIStTYZxQIc
JFAqmXpMs1XjDbtSn6t3ZJuPAfW9NS+SzWE1cEPJ4dilUGZaYH37EbbCBtOdtCHt
Z5yMgklFwClaRLmQd7gfxYdZwDmPBBtKVmi9K2xko+ES9RKLPdVyHewCnTHYYlh6
+U7Z9vOz7XFv/4pLoDWeogBE+hZFuai0i+6+tRKDXuMjzWiTeDaNadEqdG1psudL
qdh09Kc0ysYWERmz/qogImC5c/BecGPX0R82uqC7Muj5lKauG86emjtdZlm0g3Vo
KUqk6ojLhE85sDPZdIl+KWAG49RECCZcNtEq9uCNrsgQAOkPCOby0CF3NhWfdo4=
=iSZ8
-----END PGP SIGNATURE-----

--------------enig88A52F6504CD8B59506F28AD--



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