🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.maint.boot
Article #131

Re: partman-cros MRs

#131
From: Alper Nebi Yasak
Date: Thu, 12 Nov 2026 21:00
122 lines
8775 bytes
On 2026-11-08 16:49 +03:00, Pascal Hambourg wrote:
> On 06/11/2026 at 13:40, Alper Nebi Yasak wrote:
>> On 2026-11-06 01:18 +03:00, Pascal Hambourg wrote:
>>>
>>>>> The MR adds recipes for armhf, are there any ChromeOS machines with this
>>>>> architecture ?
>>>>
>>>> Yes, but we can't boot d-i through this boot method on those due to size
>>>> limits (8/16/32 MiB depending on board) on the bootable image size.
> (...)
>>> IIUC your MR adds the ChromeOS subarchitecture for armhf too. So how
>>> should it be dealt with ?
>>
>> Two 32 MiB partitions maybe, in case I end up making installer images with
>> custom kernels. But not if it's a maintenance burden.
> 
> Now partman-auto has a crude script which allows to build recipes from 
> "templates" and a set of parameters for each partition type, so there is 
> no maintenance burden for a new recipe after adding the template.
> 
>>>>>>> Never clearing the flag seems a bit extreme. What about using the same
>>>>>>> logic as in partman-efi to preserve unused existing ESPs instead ?
>>>>>>
>>>>>> Maybe they chose "Do not use" on existing partitions expecting it
>>>>>> to be like the ESP case? IIRC I thought it makes no sense to mark a CrOS
>>>>>> partition as "Do not use" except to indicate it should stop being one.
>>>>>
>>>>> OK, but partman-auto marks all partitions "do not use" before starting
>>>>> automatic partitioning.
>>>>
>>>> Ah. In that case switching to the ESP logic makes sense.
> (...)
>> 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). So to clear these flags, it may arguably be better 
to explicitly select to use them as something else?

(Again, no strong preference.)

>> Not marking as "do not use" in partman-auto would work, but
>> feels like a flag-specific hack side-stepping the "method-old" logic at
>> a first glance.
> 
> (Note: 'method-old' is primarily intended for re-using existing 
> partitions which match the recipe - typically BIOS boot, ESP and swap - 
> with automatic partitioning using the largest free space)
> 
> Actually this issue is not specific to ChromeOS partitions because 
> partman-auto clears the method on all partitions. BIOS Boot and PReP 
> flags are also cleared and this can have operational impact because they 
> are used by boot loader tools and platform firmware. partman-lvm and 
> partman-md have their own logic to restore the LVM and RAID methods and 
> preserve their flags even though they are mostly "cosmetic" and have no 
> operational impact.
> 
> So I feel like this issue may deserve a more general solution and the 
> expected behaviour for method and flag management should be defined first.

I guess so, but I think I'd have to dive into the partman-auto code before 
having good opinions on what to do. (Sorry, I don't have much bandwidth for 
that right now.)

> Concerned methods/flags: BIOS Boot, ChromeOS, PReP, ESP, LVM, RAID.
> 
> Two actions may clear methods and flags:
> - Set partition to "Do not use" in manual partitioning (dont_use)
> - automatic partitioning (partman-auto)
> 
> Current behaviour:
> 
> BIOS Boot, ChromeOS, PReP:
> - dont_use: clear method and flag (unsure)
> - partman-auto: clear method and flag (bad)
> 
> ESP:
> - dont_use: clear method, restore original ESP flag (good)
> - partman-auto: clear method, restore original ESP flag (bad)
> 
> LVM, RAID:
> - dont_use: clear method and flag (unsure)
> - partman-auto: keep method and flag (good)
> 
> Possible expected behaviour:
> 
> BIOS Boot, ChromeOS, PReP:
> - dont_use: clear method and flag ?
> - partman-auto: keep method and flag
> 
> ESP:
> - dont_use: clear method, restore original ESP flag
> - partman-auto: clear method, keep flag
> 
> LVM, RAID:
> - dont_use: clear method, restore original LVM/RAID flag ?
> - partman-auto: keep method and keep flag
> 
> Opinions ?

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.

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?
Technical Details
Message-ID: <NYK3L-buIU-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
References: <NMpxL-4ys1-7@gated-at.bofh.it> <NPwt3-6jQ4-7@gated-at.bofh.it> <NPCI9-6n8W-1@gated-at.bofh.it> <NVJQC-9Om4-1@gated-at.bofh.it> <NVNUd-9QoM-9@gated-at.bofh.it> <NW053-9WVn-1@gated-at.bofh.it> <NW4il-9Z4u-7@gated-at.bofh.it> <NWdYl-a49A-7@gated-at.bofh.it> <NWryh-ac1q-19@gated-at.bofh.it> <NXbrr-aCIt-13@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Newsgroups: linux.debian.maint.boot
Subject: Re: partman-cros MRs
Date: Thu, 12 Nov 2026 22:00:01 +0100
Message-ID: <NYK3L-buIU-1@gated-at.bofh.it>
References: <NMpxL-4ys1-7@gated-at.bofh.it> <NPwt3-6jQ4-7@gated-at.bofh.it> <NPCI9-6n8W-1@gated-at.bofh.it> <NVJQC-9Om4-1@gated-at.bofh.it> <NVNUd-9QoM-9@gated-at.bofh.it> <NW053-9WVn-1@gated-at.bofh.it> <NW4il-9Z4u-7@gated-at.bofh.it> <NWdYl-a49A-7@gated-at.bofh.it> <NWryh-ac1q-19@gated-at.bofh.it> <NXbrr-aCIt-13@gated-at.bofh.it>
X-Original-To: Pascal Hambourg <pascal@plouf.fr.eu.org>
X-Mailbox-Line: From debian-boot-request@lists.debian.org  Thu Nov 12 20:58:06 2026
Old-Return-Path: <alpernebiyasak@gmail.com>
X-Amavis-Spam-Status: No, score=-2.099 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
 DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001]
 autolearn=ham autolearn_force=no
X-Policyd-Weight: using cached result; rate: -5.5
X-Gm-Message-State: APuU4Z8b35tRqO7RaHYXJqAoAAlYMTLps4/CS6XLI+LSYMsS0IzzTw1j
	A0r3rSdQMruzJIQUDIQ75dquami+wH41iDWuhxPD/haHvLcRrzCmrXsv
X-Gm-Gg: AYBFou07zHIJN61BaLNPQ1V6PogZa4ZdUZFeIMLsgKvjOMlo/PtYH3oYXpbSzwgi6cp
	VH0ssYPncJnhFFNzLBASseT2vIyhgGY2zZiEMB0B61kmjDwSLTqEi5Q3tO/3bzj7Uztm0gJj15Z
	m4lbbrLt0t3DOsIvR6zNbBCbuFF25oCxtrqw5iFtWdiRyuZUrvBju3VzbOH3P9TpUL/R+NqySbC
	FvkJpiJACbCwlRXNFlZ6odNrIL++dT+8uMugxopiXlTRoduiz9tXYeG035y3IOoYTwhtMqA/tq7
	AwOmw+5unbcB65fqIlaac8GIusjqzsNfbNE3A+UAhXJCxSreg9xEyI+yjWZ/nGAILQPK/ThtP6X
	bLYq2PTsJJBB41ZGKUxjgiygabesqSVkvU4YCQGGhR1KkKhcaozpncc5bavHrVjobI8/Pagqtx7
	m5wIFzi/5jpMpeYnw5/lDkaTllKp9OCox8ZLsU/2QfHtvyPliNtiIQC7Jwo6QBMah3pVZsU3XjK
	UGyoerbQIg2eWdcGtsFVT0YPNfIBK8/A3MhEwktwGx/xA0W57iVtqQ9caRnJw37XKK8JOlru6ii
	OXFQ82JYFOtpc2V69p35d9pcb7JipIfRlwUMUnA=
X-Received: by 2002:a05:600c:3acf:b0:4ba:4395:560f with SMTP id 5b1f17b1804b1-4bb55a70e39mr9235235e9.8.1794517073282;
        Thu, 12 Nov 2026 12:57:53 -0800 (PST)
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US, tr, en-GB
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Mailing-List: <debian-boot@lists.debian.org> archive/latest/223589
List-ID: <debian-boot.lists.debian.org>
List-URL: <https://lists.debian.org/debian-boot/>
List-Archive: https://lists.debian.org/msgid-search/423519ea-d1f1-4685-8f0a-4346d0ae2a41@gmail.com
Approved: robomod@news.nic.it
Lines: 122
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: debian-boot@lists.debian.org, kibi@debian.org,
 Holger Wansing <hwansing@mailbox.org>
X-Original-Date: Thu, 12 Nov 2026 23:57:50 +0300
X-Original-Message-ID: <423519ea-d1f1-4685-8f0a-4346d0ae2a41@gmail.com>
X-Original-References: <0e379ea3-a27e-4e2c-8577-1bdd57c0cc34@gmail.com>
 <F3E953CF-34FE-4420-AEF6-2F2EE2121E30@mailbox.org>
 <20261018191628.a662d41cfb51615f3f57f4ad@mailbox.org>
 <f35ff429-ff0a-44c4-8238-376b12d9c3bf@plouf.fr.eu.org>
 <3d310d17-560a-4b75-ab9f-773939478d1d@gmail.com>
 <55754cd4-6c95-4594-b4a8-040087e2c339@plouf.fr.eu.org>
 <f726d7ee-33f4-43ec-a53e-d001e07b0234@gmail.com>
 <e8bf6a5a-ec39-46f8-ae33-40b2ed1dd318@plouf.fr.eu.org>
 <1f8530f0-8213-436c-a892-297a48ddc158@gmail.com>
 <6c1b1aea-38cd-4625-abdd-2123a1d65569@plouf.fr.eu.org>