0

This problem directly refers to the other question, but with some extra details:

Failed to open \EFI\UBUNTU\*garbled* - Invalid parameter

Also, I didn't find any real working answer out there and I'm not able to comment questions yet.

So, it started with switching from Windows 11 to Windows 10 on my system. I have dual boot with Ubuntu 20.04 that I really need for my work and Windows is for entertainment stuff. The very time I installed it the system booted to Windows without GRUB and it was the predictable behaviour. I felt very lazy to write another Live USB with Ubuntu and I haven't got the ISO by the time so I started googling about how to fix GRUB from Windows. Of course I ran into this solution:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

It brought my GRUB back, but I've been facing another problem:

Failed to open \EFI\UBUNTU\smth - Invalid parameter

Failed to load image \EFI\UBUNTU\smth : Invalid parameter

start_image() returned Invalid Parameter - falling back to default loader

It wasn't much of a problem because I have to wait for extra 5 seconds and here goes the GRUB menu, but it's a really annoying thing when you have to switch OSs.

That's when I found the question mentioned before. I tried everything written there and also everywhere I could find info about this problem, but nothing helped.

So these are exactly the things I tried out:

update-grub2 - of course, the first thing to try. Useless here

boot-repair - works without errors, but gives no result

efibootmgr manipulations from this answer do not resolve my problem: https://askubuntu.com/a/1357432/1587722

Then I tried to do some more manipulations with bcdedit. No result, but I noticed that the default {bootmgr} path in my Windows 10 is /EFI/UBUNTU/SHIMX64.EFI. I can change it, but it will not have any affect because it's always shimx64.efi after reboot. I tried to find some info about not being able to change Boot Manager path, but not much luck. Secure Boot is already disabled.

Also, tried EasyUEFI software for Windows, because someone around here said I will be able to edit Boot Manager in Windows but it can only edit my Ubuntu entry, buttons for editing Boot Manager path for Windows entry are just blocked.

The default Windows mechanisms that should "repaire" the bootmgr do nothing too.

After reading a lot of related things and trying everything I could I came to opinion that it's probably the Windows-related thing because I have no idea why it keeps rewriting bootmgr path to shimx64.efi. Maybe there is an additional security mechanism or something? Any help will be appreciated.

Silvan
  • 3
  • 3
  • maybe in bcdedit set your bootmgr back to the original /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi – ubfan1 Apr 17 '22 at 17:52
  • It's funny how a person can overthink the problem and try to solve it for days when the solution is that simple. Yes, it works, I changed bootmgr to default and Windows didn't set it back to shimx. After that I've been able to change boot order to GRUB instead of Windows Boot Manager in UEFI Settings, though its kinda tricky since they both have the same name out there. Thanks, @ubfan1 – Silvan Apr 17 '22 at 20:14

1 Answers1

2

You probably set

'bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi'

in Windows. You have to boot Windows than open cmd as an administrator and run this in command line:

'bcdedit /set {bootmgr} path \boot\efi\EFI\Microsoft\Boot\bootmgfw.efi'

Then you have Windows boot manager as first boot device. You have to go in the Bios settings and change HDD boot priority in boot options and choose ubuntu as first.

This solved my problem.

  • That's right, worked for me too. @ubfan1 already mentioned this in the comments before, but since I didn't spend time on writing the correct answer myself (blame me) this should be the accepted answer on my question, thank you! – Silvan Jul 13 '22 at 08:05
  • Thanks, this worked for me as well. Though I had to change the forward-slashes to backslashes in your second bcdedit command (I submitted an edit to correct this) – Dane Powell Aug 07 '23 at 17:04