Discussion:
Bug#1087489: [RFD] partman: Add support of the 'legacy_boot' flag to manual partitioning
Add Reply
Pascal Hambourg
2024-11-14 10:20:01 UTC
Reply
Permalink
Package: partman-base
Version: 229
Affects: partman-partitioning partman-efi

It was reported that setting the 'legacy_boot' flag to the boot/root
partition on GPT disk label was required in order to boot on some arm64
platforms [1]. Support of this flag was recently added to automatic
partitioning in partman-auto [2], and should also be added to manual
partitioning.

[1] <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078871#67>
[2] <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086051>

How should this be exposed to the user ?

The 'boot' flag is shown as "B" in the main display (by partman-base)
and as "Bootable flag" in partition settings (by partman-partitioning,
which is not very consistent IMO).

As the 'legacy_boot' flag is available only on GPT and the 'boot' flag
is irrelevant (=esp) on GPT and should be ignored, the same displays
could be used for both flags:
- GPT -> manage 'legacy_boot' flag, ignore 'boot' flag
- non-GPT -> manage 'boot' flag

My first questions:

- In the main display, should the 'legacy_boot' flag be shown with the
same marker "B" as the 'boot' flag ?

- In partition settings, should the 'legacy_boot' flag be shown with the
same label "Bootable flag" as the 'boot' flag ?
Pascal Hambourg
2024-11-20 12:40:01 UTC
Reply
Permalink
As the 'legacy_boot' flag is available only on GPT and the 'boot' flag is
irrelevant (=esp) on GPT and should be ignored, the same displays could be
- GPT -> manage 'legacy_boot' flag, ignore 'boot' flag
- non-GPT -> manage 'boot' flag
- In the main display, should the 'legacy_boot' flag be shown with the
same marker "B" as the 'boot' flag ?
- In partition settings, should the 'legacy_boot' flag be shown with the
same label "Bootable flag" as the 'boot' flag ?
No answers so far, so I propose to answer "yes" to both questions. Less
change, no extra translation effort. Objections ?
John Paul Adrian Glaubitz
2024-11-20 13:10:01 UTC
Reply
Permalink
Hi Pascal,
Post by Pascal Hambourg
As the 'legacy_boot' flag is available only on GPT and the 'boot' flag is
irrelevant (=esp) on GPT and should be ignored, the same displays could be
- GPT -> manage 'legacy_boot' flag, ignore 'boot' flag
- non-GPT -> manage 'boot' flag
- In the main display, should the 'legacy_boot' flag be shown with the
same marker "B" as the 'boot' flag ?
- In partition settings, should the 'legacy_boot' flag be shown with the
same label "Bootable flag" as the 'boot' flag ?
No answers so far, so I propose to answer "yes" to both questions. Less
change, no extra translation effort. Objections ?
Can you elaborate on this a little more to explain the background?

Doesn't this affect partman-efi only?

Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Pascal Hambourg
2024-11-20 18:40:01 UTC
Reply
Permalink
Hi Adrian,
Post by John Paul Adrian Glaubitz
Can you elaborate on this a little more to explain the background?
I thought the initial bug submission provided enough background.

Some arm64 platforms need the 'legacy_boot' flag to boot on GPT but
support of this flag was missing in partman. Support was added for
guided/automatic partitioning in partman-auto but is still missing for
manual partitioning.

As part of supporting the 'legacy_boot' flag, manual partitioning needs
to do the same as what it does for the 'boot' flag:
- show the state of the flag in the main view
- add an option to toggle the flag in the partition settings view

The 'legacy_boot' flag exists only on GPT and the 'boot' flag is
irrelevant on GPT (it just reflects the 'esp' flag set on EFI system
partitions). So instead of adding new visuals for the 'legacy_boot'
option, it should be possible to use the same visuals as the 'boot' flag:
- GPT: use visuals with the 'legacy_boot' flag
- other disk labels: use visuals with the 'boot' flag
Post by John Paul Adrian Glaubitz
Doesn't this affect partman-efi only?
It does not affect partman-efi but it may be affected by it it depending
on the chosen implementation because partman-efi touches the 'bootable'
flag file used by partman-base to display the 'B' marker.

In any case partman-efi should not touch the 'boot' flag (the 'esp' flag
is enough) nor the 'bootable' flag file: on MSDOS the 'boot' flag is
independent and irrelevant for ESP partitions and on GPT it is redundant
and just reflects the 'esp' flag. The current interaction between
partman-efi and partman-base has unexpected side effects. Fixing this is
also part of my plans.
Holger Wansing
2024-11-21 04:20:01 UTC
Reply
Permalink
Hi,
As the 'legacy_boot' flag is available only on GPT and the 'boot' flag is
irrelevant (=esp) on GPT and should be ignored, the same displays could be
- GPT -> manage 'legacy_boot' flag, ignore 'boot' flag
- non-GPT -> manage 'boot' flag
- In the main display, should the 'legacy_boot' flag be shown with the same marker "B" as the 'boot' flag ?
- In partition settings, should the 'legacy_boot' flag be shown with the same label "Bootable flag" as the 'boot' flag ?
No answers so far, so I propose to answer "yes" to both questions. Less change, no extra translation effort. Objections ?
I guess not.
Please go ahead.


Holger
--
Sent from /e/ OS on Fairphone3
Loading...