I was having issues getting the GRUB bootloader to be the default on my system, which is a dual boot between Windows 10 and Ubuntu 20.04. It didn't appear in my UEFI/BIOS anywhere, and I read online that running
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
Would set it to default to grub within windows, meaning I could pick each time I boot my system which OS to use, rather than have it just default to Windows or Ubuntu as it had been doing. When I did this, though, I get an error message on three lines when trying to boot Ubuntu that reads:
failed to open \EFI\UBUNTU\(gibberish characters including some chinese characters) -- invalid parameter
Failed to load image \EFI\UBUNTU\(gibberish characters including some Chinese) -- invalid parameter
start_image() returned invalid parameter
Then, it just boots into Windows. GRUB is nowhere to be seen.
Furthermore, I cannot boot into Ubuntu at all if I manually chose it while booting, getting that same erorr. I tried to undo the command I ran in Windows but it didn't work. I'm worried that I'll have to format the partition with Ubuntu on it and start over, which I really do NOT want to do.
Before I ran the windows command, I could boot into Ubuntu if I pressed F11 on my boot (I'm using MSI b550 PRO WIFI), and then chose ubuntu there. However, the GRUB bootloader did not appear (and GRUB also did not appear in the boot order in the BIOS/UEFI). That's why I did all this, and now it seems I cannot run Ubuntu, presumably because I messed something up with the windows command.
More information: if I run
bcdedit \enum {bootmgr}
I get that the Windows Boot Manager has path = "EFI\UBUNTU\SHIMX64.EFI" which seems weird, since I definitely didn't type that in the first time. Could that have something to do with why Ubuntu won't boot?
Update: I found this similar problem from years ago: Cannot access Ubuntu 18.04 in dual boot, because system boots straight to Windows 10
I've tried the first solution (in which setting the directory says the file path does not exist), and the third solution, which when I run the
cp -p .... \EFI\ubuntu
it tells me that the file I am trying to mount does not exist.