[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot
From: |
Thomas Schmitt |
Subject: |
Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot |
Date: |
Fri, 06 Sep 2024 20:09:50 +0200 |
Hi,
Askar Safin <safinaskar@zohomail.com> wrote:
> I CC Thomas Schmitt, because my work seems to be related to xorriso.
I checked that grub-mkrescue variables efidir_efi and efidir_efi_boot
are not leading to arguments of the xorriso run.
Insofar this change is transparent from the view of xorriso.
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 but is present for reference
and for copying out by e.g. Rufus. This is convenient because else one
has to search and mount the EFI system partition.
(I cannot judge whether "grub-mkimage -p /EFI/debian" has any relation
to the names in the ISO 9660 filesystem or whether the filesystem where
it matters is case sensitive.)
> iso9660 file system is case sensitive from GRUB point of view.
That's probably because grub-core/fs/iso9660.c has support for Rock Ridge.
One would have to use xorrisofs option --norock to keep xorriso from
producing Rock Ridge. Omitting -R, -rock, -r, or -rational-rock would
not suffice, other than with mkisofs and genisoimage.
> Signed-off-by: Askar Safin <safinaskar@zohomail.com>
> ---
> util/grub-mkrescue.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
> index 6dc71a8a1..c78647ebe 100644
> --- a/util/grub-mkrescue.c
> +++ b/util/grub-mkrescue.c
> @@ -771,8 +771,12 @@ main (int argc, char *argv[])
> || source_dirs[GRUB_INSTALL_PLATFORM_RISCV64_EFI])
> {
> FILE *f;
> - char *efidir_efi = grub_util_path_concat (2, iso9660_dir, "efi");
> - char *efidir_efi_boot = grub_util_path_concat (3, iso9660_dir, "efi",
> "boot");
> +
> + /* This directory should be named "EFI", not "efi". See September
> 2024 grub-devel discussion for details
> + ( https://lists.gnu.org/archive/html/grub-devel/2024-09/index.html
> )
> + */
> + char *efidir_efi = grub_util_path_concat (2, iso9660_dir, "EFI");
> + char *efidir_efi_boot = grub_util_path_concat (3, iso9660_dir, "EFI",
> "boot");
> char *imgname, *img32, *img64, *img_mac = NULL;
> char *efiimgfat, *iso_uuid_file, *diskdir, *diskdir_uuid;
> grub_install_mkdir_p (efidir_efi_boot);
>
Reviewed-by: Thomas Schmitt <scdbackup@gmx.net>
Have a nice day :)
Thomas