From 91e9e0aef8597c8213b10ca042e8457d8833b99a Mon Sep 17 00:00:00 2001 From: Ramakrishnan G Date: Wed, 29 Apr 2015 07:21:03 +0000 Subject: [PATCH] Package ldlinux.c32 along with isolinux.bin if it exists 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 --- elements/iso/cleanup.d/100-build-iso | 8 ++++++++ elements/iso/post-install.d/01-copy-bootloaders | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/elements/iso/cleanup.d/100-build-iso b/elements/iso/cleanup.d/100-build-iso index b2d15a2f..17cd8567 100755 --- a/elements/iso/cleanup.d/100-build-iso +++ b/elements/iso/cleanup.d/100-build-iso @@ -83,9 +83,17 @@ function build_iso() { echo "Copying isolinux.bin" ISOLINUX_BIN=$TMP_BOOTLOADER_DIR/isolinux.bin + LDLINUX_BIN=$TMP_BOOTLOADER_DIR/ldlinux.c32 cp $ISOLINUX_BIN "$TMP_IMAGE_DIR/isolinux" + # 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_BIN" ]; then + cp $LDLINUX_BIN "$TMP_IMAGE_DIR/isolinux" + fi + # Copy initrd, kernel echo "Copying kernel to $TMP_IMAGE_DIR/vmlinuz" cp $KERNEL "$TMP_IMAGE_DIR/vmlinuz" diff --git a/elements/iso/post-install.d/01-copy-bootloaders b/elements/iso/post-install.d/01-copy-bootloaders index 98081ed4..fe79b768 100755 --- a/elements/iso/post-install.d/01-copy-bootloaders +++ b/elements/iso/post-install.d/01-copy-bootloaders @@ -24,10 +24,19 @@ 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