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

Brian C. Lane bcl at redhat.com
Wed Sep 30 18:58:49 BST 2020


On Wed, Sep 30, 2020 at 06:02:04AM +0000, Arvin Schnell wrote:
> 
> Hi,
> 
> systemd-gpt-auto-generator can mount partitions automatically
> without an fstab entry. This can be controlled by some flags in
> the GPT, among them READ_ONLY and NO_AUTO (see [1]). This patch
> adds supports for those two flags.

Hi! Thanks for the patch.

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
 * tie read_only and no_auto to the systemd GUID(s)

I think it will be ok.

As for John's concerns, I think as long as the bit usage is limited to
the systemd controlled GUIDs it's up to them to decide how to behave.
Personally I think this kind of information belongs in /etc/fstab, but
if we're going to support new GUID types we should also support the
flags they want to use with them.

Brian


[1] https://uefi.org/sites/default/files/resources/UEFI%20Spec%202.8B%20May%202020.pdf

(apologies if this hits the list twice, mail server seems to be having
issues)
-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart




More information about the parted-devel mailing list