Bug 694803
Summary: | Parted should mark the mbr "fake" partition as active when writing gpt tables | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Hans de Goede <hdegoede> |
Component: | parted | Assignee: | Brian Lane <bcl> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | bcl, hdegoede, pjones |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-04-11 21:25:24 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 694808 |
Description
Hans de Goede
2011-04-08 13:25:28 UTC
This might be nice, but the EFI specification is specific about the boot flag. It needs to be set to 0x00 to be a valid PMBR. (In reply to comment #1) > This might be nice, but the EFI specification is specific about the boot flag. > It needs to be set to 0x00 to be a valid PMBR. I guess the people writing the specification were only thinking about creating something to keep tools like fdisk at bay, and were not thinking about using GPT with non EFI firmware, which is something we want to do. Please reconsider this, I think it would be fine to deviate from the spec here, and without this adding proper support for disks > 2TB on machines without EFI is going to be quite troublesome since some BIOS' skip disks without an active partition. Note that: 1) The BSD's have been doing this (active flag on pmbr) for a while now 2) Tools like mbrsync exist and are used successfully by many people, these go even further and mirror the entire GPT table into a good old dos table in as far as possible. Which is certainly breaking the GPT spec. Peter, what do you think about this? My concern is that this could break some obscure thing that depends on the partition being set as non-bootable. I'm not sure how the BSD code works. gptsync syncs other stuff there, but not (AFAIK) the boot flag. In the current UEFI 2.x code, I see this: // // Verify that the Protective MBR is valid // for (Index = 0; Index < MAX_MBR_PARTITIONS; Index++) { if (ProtectiveMbr->Partition[Index].BootIndicator == 0x00 && ProtectiveMbr->Partition[Index].OSIndicator == PMBR_GPT_PARTITION && UNPACK_UINT32 (ProtectiveMbr->Partition[Index].StartingLBA) == 1 ) { break; } } if (Index == MAX_MBR_PARTITIONS) { goto Done; } And of course by jumping to done it never fleshes out the rest of the GPT table. So changing that field in the PMBR really doesn't work. (In reply to comment #4) > I'm not sure how the BSD code works. gptsync syncs other stuff there, but not > (AFAIK) the boot flag. In the current UEFI 2.x code, I see this: > > // > // Verify that the Protective MBR is valid > // > for (Index = 0; Index < MAX_MBR_PARTITIONS; Index++) { > if (ProtectiveMbr->Partition[Index].BootIndicator == 0x00 && > ProtectiveMbr->Partition[Index].OSIndicator == PMBR_GPT_PARTITION && > UNPACK_UINT32 (ProtectiveMbr->Partition[Index].StartingLBA) == 1 > ) { > break; > } > } > if (Index == MAX_MBR_PARTITIONS) { > goto Done; > } > > And of course by jumping to done it never fleshes out the rest of the GPT > table. So changing that field in the PMBR really doesn't work. Looks like the above won't work with gptsync either, because AFAIK that writes a regular dos table. The only thing I can think of is have an option to write / not write the boot flag to the pmbr, and only write it in case of a non efi (iow normal BIOS) system. Although one could argue one should even do a full gptsync when using gpt on non efi firmware ... Anyways closed it is I guess. |