From fc8584825cb513ffaca12585657b1682ef79a3e5 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 30 Mar 2011 00:05:25 +0200 Subject: [PATCH] Old macs search for boot.efi rather than for bootia32.efi. * util/grub-install.in: Copy bootia32.efi to boot.efi. * util/grub-mkrescue.in: Likewise. Suggested by: Peter Jones. --- ChangeLog | 8 ++++++++ util/grub-install.in | 4 ++++ util/grub-mkrescue.in | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 073543c16..661f08502 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-03-29 Vladimir Serbinenko + + Old macs search for boot.efi rather than for bootia32.efi. + + * util/grub-install.in: Copy bootia32.efi to boot.efi. + * util/grub-mkrescue.in: Likewise. + Suggested by: Peter Jones. + 2011-03-29 Vladimir Serbinenko * util/grub.d/20_linux_xen.in: Accept old-style xen kernels. diff --git a/util/grub-install.in b/util/grub-install.in index b4a4b3f26..4e78dfadb 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -620,6 +620,10 @@ elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${pla fi elif [ x"$platform" = xefi ]; then cp "${grubdir}/core.${imgext}" "${efidir}/${efi_file}" + # For old macs. Suggested by Peter Jones. + if [ x$target_cpu = xi386 ]; then + cp "${grubdir}/core.${imgext}" "${efidir}/boot.efi" + fi # Try to make this image bootable using the EFI Boot Manager, if available. efibootmgr="`which efibootmgr`" diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in index 690bddb30..455534009 100644 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@ -286,6 +286,10 @@ if test -e "${efi64_dir}" || test -e "${efi32_dir}"; then make_image "${efi64_dir}" x86_64-efi "${efi_dir}"/efi/boot/bootx64.efi "" # build bootia32.efi make_image "${efi32_dir}" i386-efi "${efi_dir}"/efi/boot/bootia32.efi "" + if [ -e "${efi_dir}"/efi/boot/bootia32.efi ]; then + # For old macs. Suggested by Peter Jones. + cp "${efi_dir}"/efi/boot/bootia32.efi "${efi_dir}"/efi/boot/boot.efi + fi mformat -C -f 2880 -L 16 -i "${iso9660_dir}"/efi.img :: mcopy -s -i "${iso9660_dir}"/efi.img ${efi_dir}/efi ::/