Debroot (https://sourceforge.net/projects/debroot/) is a tool that can create and build debian and ubuntu live isos. It can also rebuild (unsquash, update, upgrade and squash again) a live iso with customizations and with a custom uefi support. Here is an example of its usage with Ubuntu and it's flavours and derivatives.
Now you have the content of the ISO extrated to a directory XXXXX-binary, being XXXXX what you typed in "ROOTFS directory". You have the content of the squashed filesystem in the "ROOTFS directory".
Now we will update the apt repositories in the chroot and then rebuild the ISO with UEFI support. The "apt-get update" is needed so that apt can find the needed packages.
* Click on the "sources.list/upgrade" tab
and then click the button "Update". Done;
* If you want to add packages to the live ISO (customize) you can now click on the tab "Install" and add packagenames to install and then click the button "Install";
* If you need to execute any command to complete the customization in the chroot click the tab "Chroot" and then run a shell in the chroot;
* If you have installed or upgraded packages then you need to clear the downloaded packages from apt cache to make the live ISO a bit smaller. The commands to be executed in the shell to do this are:
apt-get autoremove --purge
* Now all is ready to rebuild the ISO. Click on the "Build" tab
and then on the "Refresh options" button;
NOTE: after the whole process is done you will have a script called XXXXX-builds-script.sh with all the commands that were execcuted. In theory one could repeat the whole process from that script without the need to install debroot.
After the build was completed you can test if the Live ISO boots in UEFI mode in qemu/ovmf or in Virtualbox (with EFI boot).
For qemu/ovmf UEFI testing run:
To install from the Live ISO with debian-installer/live-installer, take note of what are the installer options present in XXXXX-binary/isolinux/install.cfg (or live.cfg) file and then, on UEFI boot, in GRUB, edit the options and type the installer boot options. Then press F10 to boot the installer.
qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -cdrom XXXXX.iso -m 1024