On 13/01/2025 at 14:39, Holger Wansing wrote:
Am 13. Januar 2025 10:06:55 MEZ schrieb Pascal Hambourg
<pas...@plouf.fr.eu.org>:
On 13/01/2025 at 08:18, Holger Wansing wrote:
Am 13. Januar 2025 00:38:50 MEZ schrieb Pascal Hambourg
<pas...@plouf.fr.eu.org>:
In order to preserve unused existing EFI partitions (which may be used by other
OS):
- Keep the 'esp' flag on existing EFI partitions when the method is set to "do not
use".
- Restore the 'esp' flag on former existing EFI partitions when the method is set to
"do not use".
- Forget about former EFI partitions when committing changes.
It seems to me that the last two points conflict?
Let me try to clarify. An existing EFI partition is an on-disk ESP. A
new EFI partition is an ESP created by the user or by a recipe and not
committed to disk yet, or an on-disk partition of a different type set
to "use as ESP" by the user. A former EFI partition is an on-disk ESP
set to a different type by the user and not committed to disk yet.
The first two points apply before pending changes are committed to disk,
while they can still be reverted. The last point applies when the
changes are committed to disk: then it does not matter any more if a
partition was previously an ESP, now it is definitely not an ESP.
Ok, but then would a change from point 2 (restore a esp flag) be
thrown away in point 3, in my understanding, or not?
No. If the esp flag is restored, the partition is fully an ESP again.
Hmm, maybe with "Forget about ..." you don't mean "Do not commit such changings"
No, I mean that the partition has been committed to disk with a new type
so partman must act as if the partition never was an ESP.
Consider the following scenarii:
1) Existing on-disk ESP.
User sets the partition "do not use" because they do not want to use it
but still want to keep it as an ESP -> keep the 'esp" flag.
2) Existing on-disk ESP.
User sets the partition "use as BIOS boot" -> set the 'bios_grub' flag
and remove the 'esp' flag but remember the partition was once an ESP.
User changes their mind and sets the partition "do not use" -> restore
the 'esp' flag and remove the 'bios_grub' flag.
3) Existing on-disk ESP.
User sets the partition "use as BIOS boot" -> set the 'bios_grub' flag
and remove the 'esp' flag but remember the partition was once an ESP.
User commits the changes to disk -> the partition is now irreversibly
committed to disk as "BIOS boot" so forget it was once an ESP.
4) New partition or existing non-ESP.
User sets the partition "use as ESP" -> set the 'esp' flag (and remove
the previous type flag).
User sets the partition "do not use" -> remove the 'esp' flag.
5) New partition or existing non-ESP.
User sets the partition "use as ESP" -> set the 'esp' flag (and remove
the previous type flag).
User sets the partition "use as BIOS boot" -> set the 'bios_grub' flag
and remove the 'ESP' flag.
User sets the partition "do no use" -> remove the 'bios_grub' flag (and
do not set the 'esp' flag).