On 2026-11-05 10:28 +03:00, Pascal Hambourg wrote:
> On 04/11/2026 at 19:26, Alper Nebi Yasak wrote:
>> On 2026-11-04 17:02 +03:00, Pascal Hambourg wrote:
>>>
>>> >>> All other automatic partitioning recipes are gathered in partman-auto >>> and recipes for current architectures are built by a script for easier >>> maintenance and better consistency. Introducing recipes in another >>> package would make maintenance more difficult.
>> >> I agree. I think I had a libdebian-installer MR that would add amd64/cros >> and arm64/cros to archdetect, which partman-auto would want?
> > I guess yes, it would allow to ship recipes for this subarch. But it may > affect other d-i packages which use archdetect. What is the current > reported subarchitecture on ChromeOS platforms ?
They are not EFI, so it defaults to "amd64/generic" or "arm64/generic" IIRC.
> 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. We can sometimes chainload e.g. U-Boot from these partitions but I don't know how to detect the board as running ChromeOS bootloader in those cases, so not a concern for now.
>>> Regarding the recipes themselves, >>> - Do any ChromeOS machines require unpartitioned reserved space for the >>> boot loader ?
>> >> Nope.
> > Then it can be removed. This reserved partition was added mostly for > arm64 platforms using Rockchip SoCs. >
>> Also, the bootloader can only boot from GPT, and we don't need a /boot >> partition even if rootfs is encrypted (but it doesn't hurt).
> > So the encrypted /boot check would need to be adjusted in partman-crypto. >
>>> >>> Never clearing the flag seems a bit extreme. What about using the same >>> logic as in partman-efi to preserve unused existing ESPs instead ?
>> >> I'm not sure the analysis is correct there, I have to test things again. >> I remember installing to a USB disk without messing up ChromeOS on the >> eMMC. 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.
>> One difference with ESPs is that we don't choose which partition will be >> used here. depthcharge-tools(-installer) will look at the disks that >> hold /boot and rootfs (as they are the only disks we can assume will be >> present during boot) and rotate between them itself.
> I see. But I think we still need to be able to clear the flag if the > partition is re-used for anything else, or did not originally have the > flag set. Otherwise IIUC the partition may be overwritten by > depthcharge-tools.
Yes and yes. (And I should make depthcharge-tools check if the targeted partition is mounted or has a filesystem...)