On Wed, May 23, 2018 at 04:08:52PM +0200, Alexander Graf wrote:
+MBR partitioning +^^^^^^^^^^^^^^^^
+Protective partitions should have a partition type of 0xF8 unless some +immutable feature of the platform makes this impossible.
I'd like to be rid of the caveat here too, but there is a lot more legacy to support with MBR.
The known behaviour wiki mentions that RPi dictates 0x0C.
On the RPI we simply use the ESP as firmware partition, so we don't have any need for a protective partition there.
Hmmnnnn... this moves towards one of Grants' comments on the need to follow up my work with some rules about managing the ESP. Specifically what tells the OS that formatting the ESP will delete vital firmware (normally it only destroys other OS and firmware *extensions*).
So maybe we could just allow the ESP to have type 0xC instead of 0xEF if dictated by firmware? That should cover all cases except for Altera then which has its bootloader in a 0xAF or so partition.
I think I'm OK with this.
Do we *have* to specify the alternative partition type is 0x0C or can we rely on searching for the EFI/ directory of FAT partitions when no other ESP presents itself? I admit I'm struggling a little to see how the pieces fit together but there are definitely clues that firmware might choose to searching for the EFI directory (albeit for GPT rather than MBR):
"UEFI implementations may allow the use of conforming FAT partitions which do not use the ESP GUID. Partition creators may prevent UEFI firmware from examining and using a specific partition by setting bit 1 of the Partition Attributes"
Daniel.