Hello.
TL;DR
I would like to learn if GRUB bootloader installation/core image creation commands Qubes OS and/or Xen specific, comparing to usual Linux distributions.
Reasoning
To use detached LUKS header without detached /boot partition, I must generate GRUB core image manually to embed early config file. Otherwise GRUB can not know about existence of encrypted device.
Below is example of how I would accomplish this task on ArchLinux, adapted for Qubes OS paths.
Here I omit all LUKS initramfs and user space configuration, since my question is about early boot.
For AES cipher, SHA-512 hash, pbkdf2 key, Btrfs root, GPT/FAT32 EFI partition:
grub-pre.cfg
cryptomount -H (hd1,gpt1)/header.img (hd0)
set root='(crypto0)'
set prefix='($root)/root/boot/grub2'
insmod normal
normal
# grub-mkimage -p '(crypto0)/boot/grub2' -O x86_64-efi -c /boot/grub2/grub-pre.cfg -o /boot/efi/EFI/qubes/grubx64.efi gcry_sha256 gcry_sha512 normal luks2 part_gpt cryptodisk gcry_rijndael pbkdf2 fat btrfs
Such simple config not seem to work on Qubes OS: GRUB does nothing.
The reason probably is my zero knowledge about Qubes OS boot process specifics and Xen.
Problem
I tested that detached LUKS header works with detached /boot partition, where GRUB have no need to care about header in early boot. However, I prefer to have /boot under root: less points of failure.
All guides on the forum I was able to find are for detached /boot partition.
Question
Which commands with which command line arguments Qubes OS executes on first install and updates to (re)install GRUB? Perhaps there is some wrapper in place?
Thank you for reading!
Would be very grateful for any hints & happy to learn.