Ubuntu Automatic (Preseed) Installation
Preseeding allows you to install debian/ubuntu from an ISO image with selections already made, setting up specific base packages so that it can be automatically installed on boot and immediately used afterwards. This is great for VM’s and pre-setup of configuration management agents.
apt install debconf-utils whois xorriso
xorriso -osirrox on -indev {UBUNTU IMAGE}.iso -extract / custom-iso
Depending on how you would like to preseed the automatic install:
You can create a single disk that supports both EFI and non-EFI machines, just create all files required for each. Ensure that your labels and configs are changed accordingly.
References