W dniu 23.10.2024 o 14:38, Pascal Hambourg pisze:
Hi Marcin,
On 23/10/2024 at 11:46, Marcin Juszkiewicz wrote:
For that first 16MB partition it would be nice to use GPT type
EF02 (BIOS boot partition) so partitioning tools will see that it
is partition for bootloaders.
Partitioning tools do not really care about what a partition is for.
OK, "users of those tools" will see. I have seen users who formatted not
mounted filesystem partitions. Without checking does it make sense
"because this space was wasted unused".
AFAIK the "BIOS boot" type is used only by GRUB for BIOS on x86.
Does U-Boot or any other arm64 boot loader use this type ?
It is type which shows the purpose of partition. Probably none of OS
loaders (like grub etc) use it on arm64. In Fedora we have one big EFI
binary for Grub, Debian uses modular approach with modules kept in the
/boot/grub/ dir.
I know this is very specific, but using the "BIOS boot" type for
the 16MiB reserved partition would get in the way of a multi-boot
x86+arm64 installation because GRUB for BIOS is written at the
beginning (30-100 kB) of the BIOS boot partition. Is this a
realistic use case ?
I would love to meet someone who uses storage that way. Using one disk
for 10+ years old PC (BIOS/CSM) and modern AArch64 system. It is
theoretically possible but in practice it is cheaper to buy some disk.
Separate /boot/ is handy if user wants to have / on LVM (crypted
or not) as this allows 'OS loader' (grub-efi in Debian) to load
kernel, initramfs (and dtb if needed) from /boot and start the OS.
GRUB can read LVM and does not require a separate /boot.
Unless you have partition as cryptloop with LVM on top. Then Grub reads
files from /boot/, OS boots, decrypt partition, initialize LVM. I used
such setup with Debian and Fedora in past on my laptops.
Anyway automatic partitioning built-in recipes create a separate /
boot when partitioning with LVM (encrypted or not).
Cool.
If hardware does not handle EFI variables (so we can not store
BootOrder vars) then /efi/boot/bootaa64.efi should be written as
this is default name for OS loader in EFI/aarch64 world.
If EFI variables are read-only or not available, grub-installer
prompts the user to install GRUB in the removable media path and/or
update EFI boot variables.
Cool.