Bug 445137

Summary: KPM sets flags on GPT partitions with no indication that this is happening and no option to turn it off
Product: [Applications] partitionmanager Reporter: Ilia Kats <ilia-kats>
Component: generalAssignee: Andrius Štikonas <andrius>
Status: RESOLVED FIXED    
Severity: normal CC: david
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://invent.kde.org/system/kpmcore/-/merge_requests/29
Latest Commit: Version Fixed/Implemented In: 21.12.0
Sentry Crash Report:

Description Ilia Kats 2021-11-07 22:05:12 UTC
As the title says, KDE Partition Manager apparently sets several flags on newly created GPT partitions, among them a "Hide from EFI" flag, which made me spend a few hours today trying to figure out why my computer happily boots from a live USB, but doesn't see the EFI system partition I created...

gdisk reports this as
Attribute flags: 8066000000000003

Going to gdisk's "extra functionality" and accessing the "set attributes" menu lists the flags as
0 (system partition)
1 (hide from EFI)
49 (Undefined bit #49)
50 (Undefined bit #50)
53 (Undefined bit #53)
54 (Undefined bit #54)
63 (do not automount)

To my knowledge, KPM is the only tool doing that. Partitions created with gdisk have absolutely no flags set, and while I have not checked gparted explicitly, I have never had problems with unfindable EFI system partitions when I used gparted.

Please don't set any flags by default or at least provide an option to turn this behavior off and/or to edit the flags.

The live USB that I used to create the EFI system partition was a custom Debian Sid image built a few days ago with KPM 21.08.0, but I've also confirmed this behavior on a newly installed Arch system with KPM 21.08.3.
Comment 1 Andrius Štikonas 2021-11-07 22:28:37 UTC
I think this was fixed two months ago (so will be in 21.12)
https://invent.kde.org/system/kpmcore/-/merge_requests/29

We didn't deliberately set attributes, but that field was not initialized and I guess contains random garbage.