Possible EFI system boots directly into Windows even with dual-boot Manjaro

I installed Manjaro by resizing the NTFS partition (in the LiveUSB installer). I chose “install alongside” and shrunk the partition. The installer also did some things with the EFI boot/efi partition.

I have searched through this forum a lot to get some answers, but all the roads that say I am using a mix between MBR/GPT and I need legacy BIOS/boot are possibly not the solution for me.

What happens:

Start PC, PC loads … goes directly to Windows with no option to choose what OS to load.

Here is what info I have:

(from liveUSB I ran)

sudo fdisk -l

Output:

Disklabel type: gpt

/dev/sda1 ... 1000M ... Windows recovery environment
/dev/sda2 ... 260M EFI System
/dev/sda3 ... 500M Lenovo boot partition
/dev/sda4 ... 128M Microsoft reserved
/dev/sda5 ... 600G Microsoft basic data
/dev/sda6 ... 25G Windows recovery environment
/dev/sda7 ... 200G Linux filesystem

What I’ve tried:

  • in LiveUSB when I go to “Detect EFI bootloaders”, I find 1 for Windows(first) and then /grubx64 for Linux. So I think this is UEFI
  • When I go into the BIOS (this is a Lenovo desktop) and go to “primary boot sequence”, I shift “Manjaro” up above “Windows boot manager”, I save changes and exit … but this does not work as the “Windows boot manager” always gets shifted up after each reboot

How can I fix this?

This solution: [HowTo] Dual-boot Manjaro - Windows 10 - Step by Step - Tutorials - Manjaro Linux Forum

Just adds more boot options and doesn’t work.

This solution: https://askubuntu.com/a/485494

Using: sudo efibootmgr -o 5,0,2 (where 5 is Manjaro)

Didn’t work either.

I also hear a “beep” or “beeping sound” when the system boots up. Adding that detail for anyone searching in future.

Are you able to enter your computer’s “BIOS” to see the available boot entries and/or change the boot order?

EDIT: I somehow missed that part when I read your post.

Yes, I did that as said above in the first post. I re-ordered “manjaro” above “windows boot manager” but after restarting, it goes back to “windows boot manager” first.

Check if this is only this setting (boot order) that resets or any settings. If this is only this setting that resets and puts Windows on first position on boot, then probably this is something done on purpose by the BIOS (why? how? I don’t know). If any setting resets, then it is probably your BIOS battery that is dead and BIOS simply loads default settings on boot.

3 Likes

(https://askubuntu.com/questions/838780/windows-10-changes-uefi-boot-order-every-time#869099)

This is how you want to solve the problem

changing the windows entry in efi to point to grubs location
similarly to your entry for manjaro

…make sure that Windows does not use its own bootmgfw.efi file again, but rather grubx64.efi

There are different ways to solve the problem

IMO, in my opinion, that’s the ideal way to do it.

So, using efibootmgr to achieve this would look like this…

Check efibootmgr for it’s listed entries and with verbose output to see the filepaths
designated for each option to point to on startup

sudo efibootmgr -v

and you should see an entry for windows…“Windows Boot Manager”
and an entry for Manjaro, with the file designated that the options point to

for windows it’s /EFI/Microsoft/Boot/bootmgfw.efi
for manjaro it’s /EFI/Manjaro/grubx64.efi

So to change the file that windows points to, to grub you would use this command

sudo efibootmgr -L “Windows Boot Manager” -l “/EFI/Manjaro/grubx64.efi”

Now, Windows should not change the EFI settings anymore and on every boot, GRUB is the default. As GRUB ideally already identified your Windows OS, it also contains its value in the grub settings.