loopback loop (hd0,gpt1)/PATH/TO/UBUNTU.iso set root=(loop) configfile /boot/grub/loopback.cfg
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed iso-scan/filename=/PATH/TO/UBUNTU.iso initrd /casper/initrd
You'll have to detect the disk though. It's possible to automate it somewhat, but not trivial (at least if you don't know how). You'll want to use search. https://www.gnu.org/software/grub/manual/grub/html_node/sear...
And make sure you've insmod'ed any modules you need for your hardware if necessary (storage, USB, etc.)... unfortunately documentation on these is poor, and some modules are mutually exclusive, so have fun.
You'll have to detect the disk though. It's possible to automate it somewhat, but not trivial (at least if you don't know how). You'll want to use search. https://www.gnu.org/software/grub/manual/grub/html_node/sear...
And make sure you've insmod'ed any modules you need for your hardware if necessary (storage, USB, etc.)... unfortunately documentation on these is poor, and some modules are mutually exclusive, so have fun.