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

Brian C. Lane bcl at redhat.com
Thu Oct 1 19:03:06 BST 2020


On Wed, Sep 30, 2020 at 08:10:32PM +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.
> 
> Thanks for pointing to that. I was not aware of those special
> constraints for those bits.
> 
> > 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
> >  * tie read_only and no_auto to the systemd GUID(s)
> 
> The problem I see is that parted does not know about systemd
> GUIDs (root on 32/64 bit x86/arm, home, ...). The only GUIDs that
> systemd-gpt-auto-generator recognizes and parted knows seem to be
> ESP and swap. But swap is hardly a GUID of systemd. ESP does not
> need the GUID specific flag (it uses NO_BLOCK_IO_PROTOCOL).
> 
> Maybe systemd is wrong in using the NO_AUTO bit for swap.

Right, you'll have to come up with a list of GUIDs to check against when
the flag is passed. It's also possible that non-systemd things might
also want to use the flags with different values, so it should be
written in a way that makes that easy to add.

It should also be easy to maintain the list, adding or subtracting from
it as things change.

As far as systemd being wrong, well this isn't the place to debate that
:)

Brian

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




More information about the parted-devel mailing list