I was trying to install Gentoo on my laptop Lenovo Edge-15, but I'm having problems booting a live usb .iso in UEFI mode. I then tried to install Ubuntu, Arch, and Fedora, and seem to be having the same problem with all of them.
Through copious amounts of experimentation/trial/error, I've gathered that my laptop is refusing to boot my USB flash drives into UEFI mode for some reason. Secure boot is disabled. I've and enabled/disabled USB booting with expected results, and I've also enabled/disabled support for Legacy/BIOS mode booting. When I support only BIOS mode booting, no Linux installation will ever start, but when I enable support for BIOS/Legacy mode booting, all linux installations can begin but they randomly crash during the installation process.
EDIT to be more specific, when loading from USB media with Legacy mode/bios mode allowed, when installing Linux, the liveCD environment always begins to load, but then randomly crashes before the system is fully set up. At this point, I am dropped into a shell with no drivers, no internet and no distribution utilities, just a few shell built ins. When I tried to install Gentoo, I actually wrote the Gentoo install .iso to it's own partition on my hard drive beforehand. Then when I tried to boot from the Gentoo USB, the Gentoo pre-install live environment loaded from this disk partition as if it was an install CD and couldn't detect the USB.
During my attempt to install Gentoo, when I reached the step for writing the boot instruction to the GPT, I got an error message saying
UEFI variables are not supported on this system, despite the fact that this occurred right after (in the Gentoo process) I had just compiled the Linux Kernel and manually and specifically enabled support for UEFI variables. The same error message ocured weather I tried to write an instruction to load GRUB2 or when I used uefiloader.
My guess is that this means the fact that the live environment was booted in BIOS mode makes it impossible for a new kernel to be loaded and interact with the GPT, despite if the kernel supports it, and that the same problem is occurring with other distros.
I have a separate laptop (it has a BIOS mode drive and no Windows OS) and I have tried the same procedures and was able to install a fresh Kubuntu.
The procedure I have been using to attempt each Linux install was to download the *.iso file on my old linux laptop,
dd bs=4M if=linux.iso of=/dev/sdb && sync (after checking the correct
lsblk), and then booting the usb on my new laptop.
I had installed Kubuntu before, so I know it's possible with this hardware, but something has changed that is making it fail. It could possibly be due to the original Kubuntu installation itself a several months ago, a failed Arch Linux installation attempt later, and a failed Kali Linux installation attempt a little later.
So can anyone help me figure this out? Why is my system not booting usb ISOs in UEFI mode?