From f8c7e72593a61c2ebe46b0df202dc45cb16bef31 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 12 Apr 2012 11:48:13 -0700 Subject: [PATCH] remove kernel and initrd from EFI/BOOT (#811438) The kernel and initrd don't need to be in the EFI/BOOT directory, they are already in the isolinux dir. A side-effect of this is that the efiboot.img and macboot.img were including them as well, causing the image size to be larger than it needed to be. livecd-iso-to-disk has also been adjusted to handle the new path in the EFI boot config. --- imgcreate/live.py | 9 ++------- tools/livecd-iso-to-disk.sh | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/imgcreate/live.py b/imgcreate/live.py index adcf34f..c5c9db8 100755 --- a/imgcreate/live.py +++ b/imgcreate/live.py @@ -715,8 +715,8 @@ hiddenmenu args["rootlabel"] = "CDLABEL=%(fslabel)s" % args return """title %(long)s findiso - kernel /EFI/BOOT/vmlinuz%(index)s root=%(rootlabel)s rootfstype=%(isofstype)s %(liveargs)s %(extra)s - initrd /EFI/BOOT/initrd%(index)s.img + kernel /isolinux/vmlinuz%(index)s root=%(rootlabel)s rootfstype=%(isofstype)s %(liveargs)s %(extra)s + initrd /isolinux/initrd%(index)s.img """ %args def __get_efi_image_stanzas(self, isodir, name): @@ -755,11 +755,6 @@ hiddenmenu shutil.rmtree(isodir + "/EFI") return - for f in os.listdir(isodir + "/isolinux"): - os.link("%s/isolinux/%s" %(isodir, f), - "%s/EFI/BOOT/%s" %(isodir, f)) - - cfg = self.__get_basic_efi_config(name = self.name, timeout = self._timeout) cfg += self.__get_efi_image_stanzas(isodir, self.name) diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index cc682a0..8f8f6c4 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -1253,6 +1253,7 @@ fi # EFI images are in $SYSLINUXPATH now if [ -n "$efi" ]; then + sed -i -e "s;/isolinux/;/$SYSLINUXPATH/;g" $BOOTCONFIG_EFI sed -i -e "s;/images/pxeboot/;/$SYSLINUXPATH/;g" $BOOTCONFIG_EFI sed -i -e "s;findiso;;g" $BOOTCONFIG_EFI fi -- 2.11.4.GIT