From 9069e2c103555520aa92954e9f4cf9a392925e5b Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sun, 1 Apr 2012 12:04:00 -0300 Subject: [archiso] mkarchiso: optionally add EFI "El Torito" boot support. If EFI/archiso/efiboot.img exists then an alternative "El Torito" boot image is added to the ISO image compatible for EFI. This image is a FAT filesystem, that is interpreted by EFI as ESP (EFI System Partition). Signed-off-by: Gerardo Exequiel Pozzi --- archiso/mkarchiso | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'archiso/mkarchiso') diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 3e9b112..1d7b781 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -380,6 +380,8 @@ command_checksum () { # Create an ISO9660 filesystem from "iso" directory. command_iso () { + local _iso_efi_boot_args="" + if [[ ! -f "${work_dir}/iso/isolinux/isolinux.bin" ]]; then _msg_error "The file '${work_dir}/iso/isolinux/isolinux.bin' does not exist." 1 fi @@ -387,6 +389,11 @@ command_iso () { _msg_error "The file '${work_dir}/iso/isolinux/isohdpfx.bin' does not exist." 1 fi + # If exists, add an EFI "El Torito" boot image (FAT filesystem) to ISO-9660 image. + if [[ -f "${work_dir}/iso/EFI/archiso/efiboot.img" ]]; then + _iso_efi_boot_args="--efi-boot EFI/archiso/efiboot.img" + fi + _show_config iso if _is_directory_changed "${work_dir}/iso" "${out_dir}/${img_name}"; then @@ -406,6 +413,7 @@ command_iso () { -eltorito-boot isolinux/isolinux.bin \ -eltorito-catalog isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ + ${_iso_efi_boot_args} \ -isohybrid-mbr ${work_dir}/iso/isolinux/isohdpfx.bin \ -output "${out_dir}/${img_name}" \ "${work_dir}/iso/" -- cgit v1.2.3-70-g09d2