3

I'm stuck trying to get Linux to boot on my PCs. I've been trying a lot with OpenSUSE and Ubuntu on my different laptops but none of them work. Regardless how many times I run update-grub, it never runs.

Both of them have MS signed shims so the UEFI should load them properly, but in reality they're not, even though the update-grub or grub2-install outputs always say that grub has been installed successfully.

I have tried turning off secure boot and install grub again but still not working. I also turned off fastboot, fast startup and Intel SRT but that doesn't help, either.

I tried boot-repair and not a single time any error appears. In the output log it says:

If your computer reboots directly into Windows, try to change the boot order in your BIOS.

If your BIOS does not allow to change the boot order, change the default boot entry of the Windows bootloader.

For example you can boot into Windows, then type the following command in an admin command prompt:

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

So there's no option to change boot order in UEFI settings, only boot device order like in BIOS and I have to run the last command.

It works now but I don't want to chainload grub from Windows bootloader like that. I want to load grub directly because I want to run Linux alone in my new PC and run Windows only in a virtual machine. Is there any solution for this?

1
  • "bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi" changes NVRAM boot variable - this way you have a boot entry that points to "\EFI\ubuntu\shimx64.efi". You don't need a Windows partition for this to function, but eventually leave "\EFI\Microsoft" on ESP.
    – snayob
    Commented Jan 21, 2017 at 8:28

2 Answers 2

1

If you have a uefi system, technically you don't need grub at all.

But to answer the question, it sounds like your UEFI implementation is very limited if you can't even change the boot target from the firmware boot-time options.

You can edit these options from Linux by using efibootmgr. Just set your grub efi as the first target, and if you've configured grub properly it should handle everything from there.

0

I got issues with the clunky Acer's UEFI again. Somehow when I run efibootmgr to edit the boot items the changes can't be saved. After restarting everything was reset so I can't boot into Linux. I found this working answer which renames the Microsoft folder and adds another entry

su -c 'cd /boot/efi/EFI && gzip /boot/efi/EFI/Microsoft'
su -c 'mkdir /boot/efi/EFI/1Microsoft && mkdir /boot/efi/EFI/1Microsoft/Boot && mv /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/1Microsoft/Boot/bootmgfw.efi'
su -c 'efibootmgr -c -w -L Win7 -d /dev/sda -p 1 -l '\EFI\1Microsoft\Boot\bootmgfw.efi' -b 6'

That helps... until I update Windows. So I've been digging around and found another way.

During startup press F2 to enter UEFI setup and switch to the Security tab. There you can see the "Select an UEFI file as trusted for executing" option. Press enter on it and select the efi file for the bootloader you want to use. Type the desire name, press Yes to confirm and that file will be added to the boot menu. Now you can switch to the Boot tab to change the order if you want. Or just press F12 during startup to boot that menu

Security tab

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .