Bug#1040267: partman-efi: Should warn about EFI partition inside raid or lvm

2023-07-04 Thread Pascal Hambourg

On 04/07/2023 at 08:50, Samuel Thibault wrote:

Pascal Hambourg, le mar. 04 juil. 2023 08:09:33 +0200, a ecrit:

but AFAIK manual partitioning does not allow to create a partition
table on a RAID array.


Yes, but after creating the RAID array, one can use guided partitioning
and point it at the RAID disk, and that'll happily partition it


Yes, and this has always bothered me. IMO, for consistency, guided 
partitioning should not allow layouts that manual partitioning does not.




Bug#1040267: partman-efi: Should warn about EFI partition inside raid or lvm

2023-07-04 Thread Pascal Hambourg

On 04/07/2023 at 08:36, Cyril Brulebois wrote:

Pascal Hambourg  (2023-07-04):

On 04/07/2023 at 03:24, Cyril Brulebois wrote:

It's fine to have an EFI partition inside a RAID array. One “just” needs
to pass --no-nvram and to register it manually. That's not something
that's achievable via d-i at the moment though (unless recent changes in
grub-installer, near the end of the bookworm release cycle) made it
possible indirectly.


Any pointer to these recent changes ?


kibi@tokyo:~/debian-installer/packages/grub-installer (master=)$ git log -p 
-Gno-nvram
→ 0007c1296f202fff8e84640d4e1737502690ca46


I expected more something about the "register it manually" part.



Bug#1040267: partman-efi: Should warn about EFI partition inside raid or lvm

2023-07-04 Thread Samuel Thibault
Pascal Hambourg, le mar. 04 juil. 2023 08:09:33 +0200, a ecrit:
> but AFAIK manual partitioning does not allow to create a partition
> table on a RAID array.

Yes, but after creating the RAID array, one can use guided partitioning
and point it at the RAID disk, and that'll happily partition it and put
an EFI partition there (see #1040266), and then grub-installer just
fails and the user is at a loss without understanding why when they
don't notice that an EFI partition was added inside the RAID array.

> > It's fine to have an EFI partition inside a RAID array. One “just” needs
> > to pass --no-nvram and to register it manually. That's not something
> > that's achievable via d-i at the moment though (unless recent changes in
> > grub-installer, near the end of the bookworm release cycle) made it
> > possible indirectly.

Ok, but the warning still seems precious to me. And it it might hint
that possibility (and the warning won't prevent the user from doing it).

Samuel



Bug#1040267: partman-efi: Should warn about EFI partition inside raid or lvm

2023-07-04 Thread Cyril Brulebois
Pascal Hambourg  (2023-07-04):
> On 04/07/2023 at 03:24, Cyril Brulebois wrote:
> > It's fine to have an EFI partition inside a RAID array. One “just” needs
> > to pass --no-nvram and to register it manually. That's not something
> > that's achievable via d-i at the moment though (unless recent changes in
> > grub-installer, near the end of the bookworm release cycle) made it
> > possible indirectly.
> 
> Any pointer to these recent changes ?

kibi@tokyo:~/debian-installer/packages/grub-installer (master=)$ git log -p 
-Gno-nvram
→ 0007c1296f202fff8e84640d4e1737502690ca46


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Bug#1040267: partman-efi: Should warn about EFI partition inside raid or lvm

2023-07-04 Thread Pascal Hambourg

On 04/07/2023 at 03:24, Cyril Brulebois wrote:

Samuel Thibault  (2023-07-04):

As pointed out in #1040266, when using guided partitioning inside a
raid, partman-auto creates an EFI partition there, and then grub-install
fails because it can't register it. This error could also happen if a
user creates by hand an EFI partition inside the raid by mistake. Just
like partman-efi warns when no EFI partition is defined, it should also
warn when an EFI partition is defined inside a raid or lvm (thus
actually unreachable from EFI).


FWIW a long ime ago I submitted a MR to allow EFI partitions only on 
disk labels which support the ESP flag (i.e. not the "loop" disk label 
used on LVM logical volumes and unpartitoned RAID arrays). It won't 
prevent an EFI partition in a partitioned RAID array, but AFAIK manual 
partitioning does not allow to create a partition table on a RAID array.



It's fine to have an EFI partition inside a RAID array. One “just” needs
to pass --no-nvram and to register it manually. That's not something
that's achievable via d-i at the moment though (unless recent changes in
grub-installer, near the end of the bookworm release cycle) made it
possible indirectly.


Any pointer to these recent changes ?



Bug#1040267: partman-efi: Should warn about EFI partition inside raid or lvm

2023-07-03 Thread Cyril Brulebois
Samuel Thibault  (2023-07-04):
> As pointed out in #1040266, when using guided partitioning inside a
> raid, partman-auto creates an EFI partition there, and then grub-install
> fails because it can't register it. This error could also happen if a
> user creates by hand an EFI partition inside the raid by mistake. Just
> like partman-efi warns when no EFI partition is defined, it should also
> warn when an EFI partition is defined inside a raid or lvm (thus
> actually unreachable from EFI).

It's fine to have an EFI partition inside a RAID array. One “just” needs
to pass --no-nvram and to register it manually. That's not something
that's achievable via d-i at the moment though (unless recent changes in
grub-installer, near the end of the bookworm release cycle) made it
possible indirectly.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


Bug#1040267: partman-efi: Should warn about EFI partition inside raid or lvm

2023-07-03 Thread Samuel Thibault
Source: partman-efi
Version: 101
Severity: normal
Tags: d-i

Hello,

As pointed out in #1040266, when using guided partitioning inside a
raid, partman-auto creates an EFI partition there, and then grub-install
fails because it can't register it. This error could also happen if a
user creates by hand an EFI partition inside the raid by mistake. Just
like partman-efi warns when no EFI partition is defined, it should also
warn when an EFI partition is defined inside a raid or lvm (thus
actually unreachable from EFI).

Samuel

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 
'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 
'oldoldstable-proposed-updates'), (500, 'oldoldstable'), (500, 
'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.3.0 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.