Windows 10 Replacing Grub

3

I installed Manjaro as my first distro and everything went pretty smoothly up until grub. When I select Windows 10 in the grub menu instead of Linux, windows takes a lot longer than usual to boot. Once booted, it seems fine - until the next boot where grub is completely skipped and windows is loaded into automatically.

The only way I have found to get grub back, is to enter my UEFI settings and rearrange the boot order so that Manjaro is on top. As soon as windows boots, this is rearranged so that Manjaro is down at the bottom of the list.

To sum up:

  • Grub works fine until windows is loaded, at which point it isn't used anymore
  • To restore grub I must rearrange the UEFI boot order. This works until the next windows boot
  • This problem doesn't occur with Linux, I can boot it many times over with no problems at all.

How can I prevent Windows 10 reordering the boot order in the UEFI so that grub is used all the time?

Harry

Posted 2016-08-10T09:19:23.707

Reputation: 71

Answers

2

It turns out that this issue was being caused by Windows 10 settings. Using the command bcdedit /set {bootmgr} path \\EFI\\Manjaro\\grubx64.efi seemed to completely fix the problem. No matter what OS was last booted into the Manjaro boot loader (grub) still appears.

Harry

Posted 2016-08-10T09:19:23.707

Reputation: 71

0

Disable every fastboot related option in EFI settings, if this does not solve the issue, backup every file in the ESP partition, and then you can try to move or copy grubx64.efi onto /EFI/Boot/bootx64.efi and/or, if still does not work, copy the windows efi file bootmgw.efi into another place, give it another file name (let's say win.efi), then copy grubx64.efi onto the old bootmgw.efi and create a new menu entry for win.efi. It still doesn't work like that, i don't know what do say. Remember to backup!! And keep in mind that windows and/or grub updates may overwrite your changes.

Andrei Scutariu

Posted 2016-08-10T09:19:23.707

Reputation: 1

0

In my case, I couldn't fix grub using bcdedit.

A solution I found somewhere online (unix.stackexchange.org) involves deactivating windows boot manager. Get into Linux (either the original install, if you can or live CD/DVD) and run this command:

efibootmgr

Note that this method will only work if Linux has been installed in UEFI mode, so you'll get an error if Linux has been installed in Legacy mode. If you installed it in UEFI mode, you'll get some info and a list. You'll notice Windows boot loader/manager and Linux somewhere in the list. It's likely that Windows will have higher priority (boot order is above the list).

There are also stars* beside some, if not all, of the entries, marking them active.

Look at the 4 digit boot number next to Windows entry and run

sudo efibootmgr --bootnum #### --inactive

This will deactivate Windows entry. Also, make sure that now deactivated Windows has higher priority if it doesn't already:

sudo efibootmgr --bootorder ####,$$$$,&&&&,%%%%

where #### is Windows boot number.

If you reboot now, you'll boot to grub, if the Linux option is enabled with the highest priority.

Note that Windows doesn't seem to recognize that it's been deactivated, so this will not get reverted by booting into Windows or updating it.

I participated in a local Linux installfest where we install Linux for interested people, most often as a secondary OS next to Windows. I've yet to see this method fail, and I've tried it on several distros (mostly Ubuntu and Mint) and several vendors (Asus, Acer, HP, Lenovo).

Karlovsky120

Posted 2016-08-10T09:19:23.707

Reputation: 177