I am trying to install Ubuntu alongside Windows 10 on a Lenevo machine. Installing Ubuntu from a Live USB fails and I get a popup with the error "Unable to install GRUB in /dev/sda". Checking the system log shows this error,
grub-install: error: cannot open '/boot/efi/EFI/ubuntu/shimx64.efi': Not a directory. error: Running 'grub-install -force "/dev/sda"' failed.
I have secure boot, fast boot and hibernation mode off. I have also tried installing Grub from the command line and get the same error. I haven't been able to find any information on solving the specific "Not a directory" error so I'm kind of at a loss.