On 25/10/2024 à 17:55, Holger Wansing wrote:
Shortly it has been mentioned, that there are arm64 systems out there (for
example Rockchip), which require the 'legacy_boot' flag on the root partition
(or on separate /boot partition if such exists) on GPT table, to be able to
boot.
To be able to set this 'legacy_boot' flag in a clean way and not mix this up
with setting of parted's 'boot'/'esp' flag on EFI partitions, it was
suggested to add a new identifier like
'$legacy_boot{ }'
to the pre-generated partman recipes.
This identifier could then set the 'legacy_boot' flag on root/boot partitions,
while the existing $bootable{ } identifier handles 'boot'/'esp' flag on EFI
partitions.
A new branch has been created for this proposal: [2]
I feel a bit of clarification is needed here.
The '$bootable{ }' specifier sets the 'boot' flag only on non-GPT disk
labels. It has currently no effect on GPT, which is the default disk
label for arm64. The 'boot/esp' flag is set only by the 'efi' method
('method{ efi }') in EFI recipes.
My original proposal [3] was to change the behaviour of the '$bootable{
}' specifier so that it sets the 'legacy_boot' flag on GPT. But some
concern about possible side effects of setting this flag on other
architectures was raised. So I proposed to introduce a new specifier.
Alternatively, we could add a value to the existing '$bootable{ }'
specifier to indicate we want to set the 'legacy_bootable' flag on GPT
(and the 'boot' flag on other disk labels). E.g.
$bootable{ } -> set 'boot' on non-GPT only
$bootable{ legacy } -> set 'boot' on non-GPT and 'legacy_boot' on GPT
What do people think about such changing the long-standing format of
pre-generated recipes?
This is not strictly within the scope of this bug report but we also
need to decide how to manage the 'legacy_boot' flag in manual
partitioning. My original proposal was to change the behaviour of the
existing 'Bootable' setting, which has currently no effect on GPT:
- non-GPT -> manage the 'boot' flag
- GPT -> manage the 'legacy_boot' flag
[2]
https://salsa.debian.org/pham/partman-auto/-/commits/legacy_boot_specifier/?ref_type=heads
[3]
<https://salsa.debian.org/pham/partman-auto/-/commits/legacy_boot/?ref_type=heads>