On Fri, May 16, 2025 at 10:05:50AM +0200, Pascal Hambourg wrote:
> On 14/05/2025 at 21:47, Cyril Brulebois wrote:
> > 
> > Feel free to add this to the wishlist, without any promises though.
> > 
> >    https://wiki.debian.org/DebianInstaller/Trixie/Wishlist
> 
> I can do it if Johannes agrees.

Yeah sure, I personally would be fine with that. I don't want to step on
Holger's toes after our off-list discussion of the matter, however... but I
realize having made it onto the wishlist is very far from the final call to
get it merged for a given release, so I hope he'd be fine with it ;) 


[...]
> Patch 2 adds support for the special "efi" method in partman-auto-raid
> recipes. However it seems to be incomplete, as IIUC it does not set the
> "esp" flag/partition type identifier on RAID member partitions, which may be
> required by some UEFI implementations to recognize such partitions as ESP
> when booting from the removable media path (other UEFI implementations may
> be able to use any partition containing a FAT filesystem as an ESP,
> regardless of the partition type identifier). Note that grub-install cannot
> update EFI boot variables if /boot/efi is not a plain partition, so booting
> from such setup relies on the removable media path or manually updating EFI
> boot variables with efibootmgr via preseed commands.

Hrrmm, interesting - I did assume that the "method" := "efi" approach that my
patch uses would cause the resulting partition to have the proper metadata to
be universally recognized as an ESP, but at least parted 3.5 is not convinced:
I just checked the result of one of my pre-seeded, patched Debian 12 installs
with that ESP-on-RAID1-stuff, and while the system does boot without problems
(relying on the removable-media support, as you wrote), the "boot, esp" flags
are missing from parted's "Flags" output...


I am not sure what (if anything) is at fault here, and won't have enough time
today to go into the details, but looking at hexdumps from two legs of a
resulting RAID1 and my own desktop's single-m.2.EFI setup, the crucial bit
(ESP GUID) seems to be OK? (I am not a EFI expert, unfortunately, so I am very
open to hearing your corrections!)

First RAID1 leg (sda):
--- >8 ---
00000200  28 73 2a c1 1f f8 d2 11  ba 4b 00 a0 c9 3e c9 3b  |(s*......K...>.;|
00000210  0a 58 6e 66 16 d6 57 43  8b 45 76 3c f5 18 7d d8  |.Xnf..WC.Ev<..}.|
00000220  00 08 00 00 00 00 00 00  ff 3f 0f 00 00 00 00 00  |.........?......|
00000230  00 00 00 00 00 00 00 00  45 00 53 00 50 00 72 00  |........E.S.P.r.|
00000240  61 00 69 00 64 00 00 00  00 00 00 00 00 00 00 00  |a.i.d...........|
00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
--- 8< ---

Second RAID1 leg (sdb):
--- >8 ---
00000200  28 73 2a c1 1f f8 d2 11  ba 4b 00 a0 c9 3e c9 3b  |(s*......K...>.;|
00000210  2b a5 26 4f 2a 9f 0c 48  95 81 10 b0 a6 40 81 03  |+.&O*..H.....@..|
00000220  00 08 00 00 00 00 00 00  ff 3f 0f 00 00 00 00 00  |.........?......|
00000230  00 00 00 00 00 00 00 00  45 00 53 00 50 00 72 00  |........E.S.P.r.|
00000240  61 00 69 00 64 00 00 00  00 00 00 00 00 00 00 00  |a.i.d...........|
00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
--- 8< ---

Single-drive NVMe comparison system (nvme0n1, different system):
--- >8 ---
00000200  28 73 2a c1 1f f8 d2 11  ba 4b 00 a0 c9 3e c9 3b  |(s*......K...>.;|
00000210  3b e1 6e 95 f2 80 c4 41  ab 65 04 42 77 da 15 28  |;.n....A.e.Bw..(|
00000220  00 08 00 00 00 00 00 00  ff 3f 0f 00 00 00 00 00  |.........?......|
00000230  00 00 00 00 00 00 00 00  65 00 73 00 70 00 62 00  |........e.s.p.b.|
00000240  6f 00 6f 00 74 00 00 00  00 00 00 00 00 00 00 00  |o.o.t...........|
00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
--- 8< ---

That data was collected with
  dd if=/dev/$somedisk bs=512 skip=1 count=33 2>/dev/null | hexdump -C
as per a useful SO answer: https://superuser.com/q/1536973


As stated elsewhere on occasion, I do have this result working and booting
fine across a variety of x86 EFI platforms and vendors, with the system
retaining its ability to boot from a single remaining leg of the ESP RAID1
during testing.


-- 
with best regards:
- Johannes Truschnigg ( johan...@truschnigg.info )

www:   https://johannes.truschnigg.info/

Attachment: signature.asc
Description: PGP signature

Reply via email to