Create UEFI bootable ISO using PyCdlib

152 Views Asked by At

Target System: x64 Virtual Machine w/ UEFI

Given the UEFI application called grubaa64.efi, how can I make a UEFI bootable ISO file using the PyCdlib python library? see https://github.com/clalancette/pycdlib and https://clalancette.github.io/pycdlib/

import pycdlib

"""
create bootable ISO file with the target boot application being
LOCAL_EFI_APP_NAME
"""

LOCAL_EFI_APP_NAME = 'grubaa64.efi'

iso = pycdlib.PyCdlib()
iso.new()

iso.add_file(LOCAL_EFI_APP_NAME)
iso.add_eltorito(LOCAL_EFI_APP_NAME, platform_id=0xef, efi=True)

iso.write('eltorito.iso')
iso.close()

Doesn't work because the PyCdlib is confusing.

0

There are 0 best solutions below