I GAVE UP ON THIS ... BUT THE QUESTION (AND ANSWERS) MIGHT HELP SOMEONE ELSE IN FUTURE.
I am trying to install the latest Ubuntu (22.04.2) on a Lenovo X270. SSD died so I bought a new one and wanted to give Ubuntu a go. Installed it from a USB boot.
I followed this tutorial video (https://www.youtube.com/watch?v=Wc4GjV_Ahb8) about partitioning the hard drive, including creating an EFI partition. I'm trying to install Ubuntu ONLY on the device - not a dual boot with Windows as well.
But after the installation Ubuntu just won't boot from the SSD. I've changed the settings in the BIOS to boot from the SSD, I've allowed it to book from UFEI or Legacy, and I've disabled the secure boot thing.
When it's booting from UFEI it just keeps returning to the Lenovo power-up logo without booting. When booting from Legacy it comes up with a white text error.
I've tried to use the 'boot-repair' program but that gets stuck too. It comes up with the following error message: NVram is locked (Ubuntu not found in efibootmgr)
I've tried to reset the CMOS and I think I managed to because I had to re-input the time and date in the BIOS, but it's not solved the issue.
Also ... when I try to install grub in the terminal it says "error: cannot find EFI directory". There is definitely an EFI partition.
Any ideas? I've tried my best to look online but I'm not a computer expert and I don't understand most of the instructions people are suggesting with the terminal etc - because they seem to include a lot of assumed knowledge. Any proposed solution needs to be understandable to a noob.
If someone is able to help it would be much appreciated!
Many thanks