[parted-devel] [PATCH] keep GUID specific attributes

Brian C. Lane bcl at redhat.com
Thu Sep 23 00:08:02 BST 2021


On Tue, Sep 21, 2021 at 08:26:24AM +0000, Arvin Schnell wrote:
> 
> Hi,
> 
> when modifying a GPT parted clears all GUID specific
> attributes. This happens even when modifying unrelated
> partitions, e.g. adding a new partition. According to the UEFI
> standard these bits must be preserved (see Table 24 of the UEFI
> spec[1]) even when only modifying the other attributes.

Whoops, looks like that has been there since the start of git history :)

> 
> The attached patch solves the problem by having the full
> attributes instead of the two flags hidden and bls_boot in
> GPTPartitionData and modifying the full attributes directly.

The approach looks good, but in this patch you mixed up bls_boot and
legacy_boot, which are totally different things :)

> A test case is a bit tricky since parted cannot be used to verify
> the result. So either some other tool (fdisk and sfdisk are fine)
> or some low-level program (something like gpt-header-move/munge)
> is needed. I can add whatever is preferred.

I'd prefer a small helper script to handle changing the Attribute value
for testing.

Also, if you could add your email as a cover letter in your patch sets
instead of as the commit message that would help, the commit message
should describe the problem, and what has been changed to fix it.

Thanks,

Brian

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




More information about the parted-devel mailing list