136 - UEFI-boot directly from Ubuntu-based ISO files
Ubuntu-based ISOs and those that contain a \boot\grub\loopback.cfg file can be easily UEFI-booted to just by copying some files, no menu is needed!
1. Format a FAT32 USB flash drive (e.g. using RMPrepUSB)
2. Make a \efi\boot directory on the flash drive
3. Copy your Ubuntu-based ISO file (must be <4GB) to the \efi\boot directory and rename it as boot.iso
4. Extract the .efi files from the UEFI_boot_from_ISO.zip file and copy them to the \efi\boot directory
Note: \efi\boot is lowercase and boot.iso is lowercase.
Now you should be able to UEFI-boot (32-bit and 64-bit) from the USB flash drive (disable Secure Boot in the BIOS options first).
To use a different Ubuntu-based ISO which should contain a \boot\grub\loopback.cfg file, simply replace the boot.iso file.
A 64-bit version of Ubuntu will not boot on a 32-bit UEFI system. Use a 32-bit Ubuntu ISO on a 32-bit UEFI system and a 64-bit UEFI ISO on a 64-bit UEFI system.
This tutorial is based on an article here, but the.efi files in my download have been patched by me to load the loopback.cfg file and so ensure reliable booting.
The .efi file contains a version of grub2 with an embedded grub menu
The grub2 variable iso_path must be set before loopback.cfg is called (and exported).
An example of a simple embedded menu which boots to the loopback.cfg file inside the boot.iso is:
A typical Ubuntu menu entry inside loopback.cfg inside boot.iso would be:
Note that no persistent parameter is specified in the loopback.cfg, so it prevents us from booting with persistence...:-(