gpart rewrites pmbr in a way which breaks Win 7 EFI bootloader

Andrey V. Elsukov ae at FreeBSD.org
Fri Aug 10 08:31:58 UTC 2012


On 10.08.2012 6:13, Lawrence Stewart wrote:
>> What about the following: We have the kernel keep track of the firmware
>> used. On x86 this is either BIOS or UEFI in the common case. Other F/W
>> implementations like U-Boot, OFW, etc are possible as well, especially
>> on non-x86 machines.
>>
>> The geom_part scheme uses this information to determine how to behave
>> with respect to the PMBR. When booted with BIOS, non-standard stuff is
>> accepted by virtue of what we've seen in the field. With UEFI we can
>> start off being anal (read: strictly compliant) and extend out based
>> on what we run into.
>>
>> In particular: this way we also don't mess up the EFI/GPT support that
>> is there on ia64.
>>
>> Thoughts?

It seems this is not enough. The problem, that Lawrence has, is not
related to BIOS/UEFI. Automatic detection of various standard violation is
handy for our users, but sometimes false positives occur.

To solve all problems it seems we need to introduce several quirks, e.g.:

#define GPT_QUIRK_BOOTCAMP      0x0001  /* boot camp supported */
#define GPT_QUIRK_MSLOADER      0x0002  /* don't set Active flag to the PMBR entry */
#define GPT_QUIRK_IGNOREPMBR    0x0004	/* don't require PMBR entry */

The same quirks should be added to the loader(8).


-- 
WBR, Andrey V. Elsukov


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20120810/593585a0/signature.pgp


More information about the freebsd-fs mailing list