[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 <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2012-04-01 12:04:00 -03:00
parent 67096caef2
commit 9069e2c103

View File

@ -380,6 +380,8 @@ command_checksum () {
# Create an ISO9660 filesystem from "iso" directory. # Create an ISO9660 filesystem from "iso" directory.
command_iso () { command_iso () {
local _iso_efi_boot_args=""
if [[ ! -f "${work_dir}/iso/isolinux/isolinux.bin" ]]; then if [[ ! -f "${work_dir}/iso/isolinux/isolinux.bin" ]]; then
_msg_error "The file '${work_dir}/iso/isolinux/isolinux.bin' does not exist." 1 _msg_error "The file '${work_dir}/iso/isolinux/isolinux.bin' does not exist." 1
fi fi
@ -387,6 +389,11 @@ command_iso () {
_msg_error "The file '${work_dir}/iso/isolinux/isohdpfx.bin' does not exist." 1 _msg_error "The file '${work_dir}/iso/isolinux/isohdpfx.bin' does not exist." 1
fi 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 _show_config iso
if _is_directory_changed "${work_dir}/iso" "${out_dir}/${img_name}"; then if _is_directory_changed "${work_dir}/iso" "${out_dir}/${img_name}"; then
@ -406,6 +413,7 @@ command_iso () {
-eltorito-boot isolinux/isolinux.bin \ -eltorito-boot isolinux/isolinux.bin \
-eltorito-catalog isolinux/boot.cat \ -eltorito-catalog isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \ -no-emul-boot -boot-load-size 4 -boot-info-table \
${_iso_efi_boot_args} \
-isohybrid-mbr ${work_dir}/iso/isolinux/isohdpfx.bin \ -isohybrid-mbr ${work_dir}/iso/isolinux/isohdpfx.bin \
-output "${out_dir}/${img_name}" \ -output "${out_dir}/${img_name}" \
"${work_dir}/iso/" "${work_dir}/iso/"