From owner-freebsd-fs@FreeBSD.ORG Thu Aug 9 14:20:29 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id EA4531065674; Thu, 9 Aug 2012 14:20:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id ED1AC14E247; Thu, 9 Aug 2012 14:20:28 +0000 (UTC) Message-ID: <5023C723.90606@FreeBSD.org> Date: Thu, 09 Aug 2012 18:20:19 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120406 Thunderbird/10.0.3 MIME-Version: 1.0 To: Lawrence Stewart References: <50237B73.9040301@freebsd.org> <5023979B.4010903@yandex.ru> <5023A907.7060800@freebsd.org> In-Reply-To: <5023A907.7060800@freebsd.org> X-Enigmail-Version: 1.4 OpenPGP: id=10C8A17A Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig88A52F6504CD8B59506F28AD" Cc: "freebsd-fs@freebsd.org" , Marcel Moolenaar Subject: Re: gpart rewrites pmbr in a way which breaks Win 7 EFI bootloader X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2012 14:20:30 -0000 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 ", 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--