]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
util/grub-mkrescue: Add support for FAT and NTFS on EFI boot
authorPete Batard <pete@akeo.ie>
Fri, 25 Nov 2022 17:22:15 +0000 (17:22 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 Jan 2023 13:08:25 +0000 (14:08 +0100)
In order to add file system transposition support for UEFI, i.e. the ability
to copy the content of an grub-mkrescue ISO 9660 image onto user-formatted
media, and have that boot on UEFI systems, the first thing we need to do is
add support for the file systems that are natively handled by UEFI. This
mandatorily includes FAT, but we also include NTFS as the latter is also
commonly supported on modern x64 platforms.

Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub-mkrescue.c

index ba89b13944d1008a0a78af6b5740c6c608b6dd06..59a0b5db4f42eeb25be9c436df50448544d508f9 100644 (file)
@@ -754,6 +754,9 @@ main (int argc, char *argv[])
 
       grub_install_push_module ("part_gpt");
       grub_install_push_module ("part_msdos");
+      grub_install_push_module ("fat");
+      /* Many modern UEFI systems also have native support for NTFS. */
+      grub_install_push_module ("ntfs");
 
       imgname = grub_util_path_concat (2, efidir_efi_boot, "bootia64.efi");
       make_image_fwdisk_abs (GRUB_INSTALL_PLATFORM_IA64_EFI, "ia64-efi", imgname);
@@ -831,6 +834,8 @@ main (int argc, char *argv[])
       free (efidir);
       grub_install_pop_module ();
       grub_install_pop_module ();
+      grub_install_pop_module ();
+      grub_install_pop_module ();
     }
 
   grub_install_push_module ("part_apple");