[parted-devel] [PATCH] support read-only and no-auto flags used by systemd-gpt-auto-generator

Brian C. Lane bcl at redhat.com
Fri Oct 2 17:36:05 BST 2020


On Fri, Oct 02, 2020 at 12:32:35PM +0000, Arvin Schnell wrote:
> On Wed, Sep 30, 2020 at 10:58:49AM -0700, Brian C. Lane wrote:
> 
> > If you read Table 24 of the UEFI spec[1] you will see that it says that
> > attributes are controlled by the owner of the PartitionTypeGUID.
> > 
> > This means that you can't just arbitrarily carve out some bits and use
> > them for new flags. They need to be tied to specific GUIDs and not
> > effect other users of the GuidSpecific value.
> > 
> > So if you:
> > 
> >  * restore the GuidSpecific struct entry to its previous state
> 
> The new patch has generic names for the bits in the struct.
> 
> >  * tie read_only and no_auto to the systemd GUID(s)
> 
> And it is only possible to set the flags for swap. A new function
> supports_read_only_and_no_auto_flag is used to control that.
> 
> Setting another partition type, e.g. RAID, clears the two
> flags. Unsetting swap also does do.

NAK.

Leave GuidSpecific struct entry as it. Set it to whatever constant you
need to use for your GUID.

The check needs to test the partition type GUID and ONLY work with the
systemd defined ones that support these flags.

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart




More information about the parted-devel mailing list