The below solution is implemented on Linux Mint 19 64 in Virtual Machine.
GParted – GUI tool to manage partitions. This is generally available in Live Linux CD/DVD. If you do not have some free space at the end of your disk, you will have to resize and create a small FAT partition. If existing partitions are in use you may need to invoke GParted from Live Linux CD/DVD for it to work on your partition.
genisoimage - command line tool to manage ISO’s. If this is not available just install it. This was readily available in Linux Mint 19 64bit
sudo apt-get install genisoimage
Step 1 – Using GParted (Preferably booted off Live Linux CD/DVD, in this case I have used Live Linux Mint 19 64bit) create a small FAT16 formatted partition at the end of your disk. For this particular case just 100MB is more than enough. Ensure that for such a small size the format is FAT16 rather than FAT32
Step 2- Unzip and copy the required files to this FAT formatted partition. You can simply use the default GUI file explorer in Linux. No separate gzip command needed
Step 3 – Create an Image of this partition. The command here is
dd if=/dev/sda3 of=/home/test/efi/fat.img
In above example
/dev/sda3 is the FAT formatted partition holding the files and
/home/test/efi/fat.img is the image file generated.
Step 4 - Now we shall create an EFI Bootable ISO. The files themselves may not necessarily be bootable here.
genisoimage -v -J -r -V "TEST" \
-o /home/test/myiso.iso \
-e fat.img \
In the above command, we are omitting the BIOS bootloader and just sticking to the EFI bootloader, the alternate one.
/home/test/myiso.iso is the new ISO file being created,
/home/test/efi is the location of source files. As such there’s nothing except the bootloader image therein.
Now the ISO is created on Linux Box. Mount the ISO as CD Drive and boot your UEFI System into EFI Shell. Now the bootloader section shall map to a drive in EFI Shell and the image therein holding the folder along with its contents shall be accessible thru EFI Shell.