summaryrefslogtreecommitdiff
path: root/ironic/common/images.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2018-12-10 14:35:42 +0100
committerJulia Kreger <juliaashleykreger@gmail.com>2019-01-23 00:27:07 +0000
commit4008c9bfa4175a5eb15b2e49cfacb02db1b3c8d9 (patch)
tree62a015b4cc4767a0bcd406a31e673ce2fbe29b47 /ironic/common/images.py
parentde92b40588ed4d05f2460ad9e10e6ca6abe607ec (diff)
downloadironic-4008c9bfa4175a5eb15b2e49cfacb02db1b3c8d9.tar.gz
Build UEFI-only ISO for UEFI boot
This change makes ironic building UEFI-only bootable ISO image (when being asked to build a UEFI-bootable image) rather than building a hybrid BIOS/UEFI-bootable ISO. The motivation behind this change is to make node boot more predicable in the sense that if the user asks for UEFI boot, the node would either boot over UEFI or fail. On top of that, the ISO image slims down a tad bit and syslinux boot loader presence on the conductor machine is not a requirement any more. Change-Id: If7828f72724cc7532f97cab758a29a9e8345850e Story: 1526753 Task: 28368
Diffstat (limited to 'ironic/common/images.py')
-rw-r--r--ironic/common/images.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/ironic/common/images.py b/ironic/common/images.py
index 842bd5452..65fd48267 100644
--- a/ironic/common/images.py
+++ b/ironic/common/images.py
@@ -243,17 +243,12 @@ def create_isolinux_image_for_uefi(output_file, deploy_iso, kernel, ramdisk,
:raises: ImageCreationFailed, if image creation failed while copying files
or while running command to generate iso.
"""
- ISOLINUX_BIN = 'isolinux/isolinux.bin'
- ISOLINUX_CFG = 'isolinux/isolinux.cfg'
-
- isolinux_options = {'kernel': '/vmlinuz', 'ramdisk': '/initrd'}
grub_options = {'linux': '/vmlinuz', 'initrd': '/initrd'}
with utils.tempdir() as tmpdir:
files_info = {
kernel: 'vmlinuz',
ramdisk: 'initrd',
- CONF.isolinux_bin: ISOLINUX_BIN,
}
# Open the deploy iso used to initiate deploy and copy the
@@ -274,12 +269,6 @@ def create_isolinux_image_for_uefi(output_file, deploy_iso, kernel, ramdisk,
finally:
_umount_without_raise(mountdir)
- cfg = _generate_cfg(kernel_params,
- CONF.isolinux_config_template, isolinux_options)
-
- isolinux_cfg = os.path.join(tmpdir, ISOLINUX_CFG)
- utils.write_to_file(isolinux_cfg, cfg)
-
# Generate and copy grub config file.
grub_cfg = os.path.join(tmpdir, grub_rel_path)
grub_conf = _generate_cfg(kernel_params,
@@ -288,12 +277,10 @@ def create_isolinux_image_for_uefi(output_file, deploy_iso, kernel, ramdisk,
# Create the boot_iso.
try:
- utils.execute('mkisofs', '-r', '-V', "VMEDIA_BOOT_ISO",
- '-cache-inodes', '-J', '-l', '-no-emul-boot',
- '-boot-load-size', '4', '-boot-info-table',
- '-b', ISOLINUX_BIN, '-eltorito-alt-boot',
+ utils.execute('mkisofs', '-r', '-V', "VMEDIA_BOOT_ISO", '-l',
'-e', e_img_rel_path, '-no-emul-boot',
'-o', output_file, tmpdir)
+
except processutils.ProcessExecutionError as e:
LOG.exception("Creating ISO image failed.")
raise exception.ImageCreationFailed(image_type='iso', error=e)