On 12/11/2026 at 21:57, Alper Nebi Yasak wrote:
> On 2026-11-08 16:49 +03:00, Pascal Hambourg wrote:
>> On 06/11/2026 at 13:40, Alper Nebi Yasak wrote:
>>>
>>> I guess ESP logic would make the "do not
>>> use" interpretation more consistent with other partman-* packages, which
>>> sounds good.
>>
>> Actually only partman-efi implements this logic. Setting an ESP "do not
>> use" is required to prevent the installer from possibly formatting and
>> mounting it, but we do not want it to clear the original ESP flag.
>>
>> IIUC ChromeOS is different. Partman does not really "use" (format or
>> mount) a ChromeOS partition, it just sets the type flag on it and checks
>> if such partition is present on the boot/root disk. And we may actually
>> want manual "do not use" to clear the flag.
>>
>> So ESP and ChromeOS partitions may need different interpretations of "do
>> not use".
>
> The "flag" here sets the GPT Partition Type GUID for the partition (a bad
> extension of a legacy abstraction), and only one such flag makes sense on
> any partition, and having none means it defaults to whatever parted likes
> (Linux data?, I forgot).
If no partition type flag is set, the default partition type depends on the selected or detected filesystem (another parted oddity):
- fat, ntfs, udf -> Microsoft basic data
- hfs -> Apple HFS
- linux-swap -> Linux swap
- freebsd-ufs -> FreeBSD UFS (Debian patch)
- other or none -> Linux filesystem data
(source: parted/libparted/labels/gpt.c)
> So to clear these flags, it may arguably be better
> to explicitly select to use them as something else?
I'm afraid not, because some methods do not explicitly set a partition type flag and implicitly remove the previous flag:
- filesystem
- swap
- physical volume for encryption
> Maybe we need a "Empty partition" method that clears these flags, and
> maybe zeros out the first MiB of a partition so it has no filesystem.
> That would resolve the ambiguity of "Do not use" where we would always
> keep the partition as-is.
partman-crypto already provides a "erase partition data" choice in the active partition menu. But what is the point of keeping a partition, clearing its flags, erasing its contents and not using it for anything instead of just deleting the partition ?
> Maybe codifying "Do not use" as a value in the method file ("keep/efi"
> for example, where we can also have the old method info) could help?
It could make things a bit simpler, maybe. But which "old" method should be recorded ? The original (on disk) one or the current selected one (like method-old set by partman-auto) ?