91e9e0aef8
Starting from syslinux 5.00, isolinux.bin is dependent on ldlinux.c32 to boot for BIOS machine. syslinux > 5.00 is delivered with Fedora 21 cloud image which breaks the boot from ISO if ldlinux.c32 doesn't exist. Change-Id: If722f36aeaabc759d93ef6ae3f49b21bb840a92d Closes-Bug: 1449882
42 lines
1 KiB
Bash
Executable file
42 lines
1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
|
|
set -eux
|
|
set -o pipefail
|
|
|
|
TMP_BOOTLOADER_DIR=/tmp/bootloader_files
|
|
mkdir -p $TMP_BOOTLOADER_DIR
|
|
|
|
if [ $DISTRO_NAME = "fedora" ]; then
|
|
GRUB_FILE="/boot/efi/EFI/fedora/grubx64.efi"
|
|
else
|
|
GRUB_FILE="/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed"
|
|
fi
|
|
|
|
if [ $DISTRO_NAME = "fedora" ]; then
|
|
SHIM_FILE="/boot/efi/EFI/fedora/shim.efi"
|
|
else
|
|
SHIM_FILE="/usr/lib/shim/shim.efi.signed"
|
|
fi
|
|
|
|
if [ $DISTRO_NAME = "fedora" ]; then
|
|
SYSLINUX_FILE="/usr/share/syslinux/isolinux.bin"
|
|
LDLINUX_FILE="/usr/share/syslinux/ldlinux.c32"
|
|
else
|
|
SYSLINUX_FILE="/usr/lib/syslinux/isolinux.bin"
|
|
LDLINUX_FILE="/usr/lib/syslinux/ldlinux.c32"
|
|
fi
|
|
|
|
cp $GRUB_FILE $TMP_BOOTLOADER_DIR
|
|
cp $SHIM_FILE $TMP_BOOTLOADER_DIR
|
|
cp $SYSLINUX_FILE $TMP_BOOTLOADER_DIR
|
|
|
|
# Starting from SYSLINUX 5.00, the isolinux.bin is dependent
|
|
# on ldlinux.c32.
|
|
# http://www.syslinux.org/wiki/index.php/Library_modules
|
|
if [ -f "$LDLINUX_FILE" ]; then
|
|
cp $LDLINUX_FILE $TMP_BOOTLOADER_DIR
|
|
fi
|