|
From: | Pascal Hambourg |
Subject: | Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot |
Date: | Fri, 6 Sep 2024 23:50:36 +0200 |
User-agent: | Mozilla Thunderbird |
On 06/09/2024 at 15:15, Askar Safin wrote:
While testing this script I noticed this: if I boot from disk (i. e. using "-drive" Qemu option), then "grub.cfg" is read from ESP, i. e. FAT. But if I boot from CD (i. e. using "-cdrom" Qemu option), then "grub.cfg" is read from main .iso partition, i. e. iso9660. I don't know whether this is expected behavior or just a bug.
I do not know either, but it matches my previous observation. When booting from a EFI partition on a regular disk, then $root is set to the EFI partition (hdX,Y). When booting from a EFI El Torito image on a CD, then $root is set to the whole CD (cdX), and the El Torito image is not visible.
I faced a similar issue when trying to use $cmdpath instead of the hardcoded prefix /EFI/debian; the case in $cmdpath is variable and depends on the UEFI firmware and boot method (from EFI boot entry, select boot device, select EFI file). I have seen "/EFI/BOOT" most often but also "/EFI/Boot" and "/efi/boot".FAT is case insensitive from GRUB point of view. But iso9660 is case sensitive. So, the file (in case of CD boot) must be named exactly /EFI/debian/grub.cfg. Name /efi/debian/grub.cfg will not work,
On 06/09/2024 at 20:09, Thomas Schmitt wrote:
I can confirm that many distro ISOs have a copy of the file tree of their EFI system partition as file tree "/EFI/boot" in the ISO 9660 filesystem. Nobody seems to complain about the mixed case. This copy normally plays no role in booting
It plays a role in Debian ISOhybrid images when booting from CD with a monolithic signed GRUB image which fetches an early grub.cfg in the EFI partition, because GRUB does not see the El Torito image and can read the early grub.cfg only from the ISO 9660 filesystem.
[Prev in Thread] | Current Thread | [Next in Thread] |