Skip to contentSkip to conversation

Explicitly build msdos partition support into EFI executables

PATCH In review Mario Limonciello 3 participants 4 messages Jan 6, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Explicitly build msdos partition support into EFI executables

Hi:

Currently EFI executables don't include part_msdos or vfat support by default. This means that EFI executables can only be launched directly from ISO9660 filesystems. The attached patch explicitly adds part_msdos and vfat so that the rest of the GRUB files can be found on other devices, such as USB keys.

Thanks,

Signature · 3 lines
*Mario Limonciello*
Linux Engineer
*Dell*| OS Engineering

=== modified file 'ChangeLog'

ChangeLog +5 -0
@@ -1,3 +1,8 @@
+2011-01-06  Mario Limonciello <[email protected]>
+
+        * util/grub-mkrescue.in: Explicitly build part_msdos and vfat into
+        efi executables.
+
 2011-01-05  Vladimir Serbinenko  <[email protected]>
 
 	Run terminfo_cls on initing terminfo output to clear the screen and

=== modified file 'util/grub-mkrescue.in'

grub-mkrescue.in +2 -2
@@ -283,9 +283,9 @@
     mkdir -p "${efi_dir}/efi/boot"
 
     # build bootx64.efi
-    make_image "${efi64_dir}" x86_64-efi "${efi_dir}"/efi/boot/bootx64.efi ""
+    make_image "${efi64_dir}" x86_64-efi "${efi_dir}"/efi/boot/bootx64.efi "part_msdos fat"
     # build bootia32.efi
-    make_image "${efi32_dir}" i386-efi "${efi_dir}"/efi/boot/bootia32.efi ""
+    make_image "${efi32_dir}" i386-efi "${efi_dir}"/efi/boot/bootia32.efi "part_msdos fat"
 
     mformat -C -f 2880 -L 16 -i "${iso9660_dir}"/efi.img ::
     mcopy -s -i "${iso9660_dir}"/efi.img ${efi_dir}/efi ::/
#1 lore raw
Quoted 8 lines · Mario Limonciello

Hi:

Currently EFI executables don't include part_msdos or vfat support by default.  This means that EFI executables can only be launched directly from ISO9660 filesystems.  The attached patch explicitly adds part_msdos and vfat so that the rest of the GRUB files can be found on other devices, such as USB keys.

part_gpt should also be included (after all GPT is part of UEFI spec).

Quoted 7 lines

Thanks,

--
Mario Limonciello
Linux Engineer
Dell | OS Engineering

Quoted 6 lines

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

- Keshav

#2 lore raw
In reply to Mario Limonciello
Quoted 8 lines · Mario Limonciello

Hi:

Currently EFI executables don't include part_msdos or vfat support by default. This means that EFI executables can only be launched directly from ISO9660 filesystems. The attached patch explicitly adds part_msdos and vfat so that the rest of the GRUB files can be found on other devices, such as USB keys.

grub-mkrescue is only for creating ISOs. If you need to install to HDD please use grub-install. For custom EFI executables use grub-mkimage

Quoted 6 lines

Thanks,

Signature · 3 lines
*Mario Limonciello*
Linux Engineer
*Dell* | OS Engineering
Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#3 lore raw

Hi Vladimir:

Quoted 11 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 8 lines · Mario Limonciello

Hi:

Currently EFI executables don't include part_msdos or vfat support by default. This means that EFI executables can only be launched directly from ISO9660 filesystems. The attached patch explicitly adds part_msdos and vfat so that the rest of the GRUB files can be found on other devices, such as USB keys.

grub-mkrescue is only for creating ISOs. If you need to install to HDD please use grub-install. For custom EFI executables use grub-mkimage

The reason for adding this to the EFI executable on ISOs is so that those same ISOs can be installed to a VFAT USB stick and that USB stick bootable via EFI. The particular use case i'm thinking about is Ubuntu's usb-creator. It extracts the ISO directly to the stick. If the EFI executable contains these two modules, no additional work is necessary.

Signature · 3 lines
*Mario Limonciello*
Linux Engineer
*Dell*| OS Engineering