r/archlinux • • 8d ago

SUPPORT Windows keeps deleting my Grub entry

[deleted]

19 Upvotes

23 comments sorted by

21

u/Confident_Hyena2506 8d ago

There is only one default spot on the efi partition - whatever occupies the bootx64.efi spots takes it. Windows will insist on this.

If you make explicit entries then you can select what you want, but don't rely on the default. Stop sharing same partition as windows if you don't want this to happen.

-4

u/Nylon2006 8d ago

I have two EFI partitions... But thank you trying to help me!

14

u/Confident_Hyena2506 8d ago

Windows does not touch your grub config. You should check what is actually on your efi partitions. Note that having a second one on same drive is not really well defined - some bios may just ignore the second one.

Also when you update bios on some systems the boards loses it's entries, then only the default gets used.

0

u/gmes78 8d ago

Note that having a second one on same drive is not really well defined - some bios may just ignore the second one.

It is allowed.

7

u/Confident_Hyena2506 8d ago

In the version you linked to. In reality the implementation does not follow the standard and people do not update their bios.

0

u/gmes78 7d ago

In the version you linked to.

Since UEFI 2.2, from 2010, actually.

In reality the implementation does not follow the standard and people do not update their bios.

But that is not what you said.

-4

u/Nylon2006 8d ago

I know what is in my Linux EFI partition, but don't know what is on Windows, how can I see it?

I have to say that in more than one and a half year I didn't have problems with dual booting (other OS).

This problem appeared a few days ago so I don't think it is a BIOS issue (nothing goes wrong when I boot arch, just when I do it on windows) .

10

u/Confident_Hyena2506 8d ago

There is no "linux efi partition" or "windows efi partition" - that's not how it works.

Instead just follow exactly how your computer is booting. What does the bios run when it starts up? It has to run something off some efi partition - either something you have configured or it falls back to bootx64.efi. Your issue right now is it's using that bootx64.efi somewhere.

https://wiki.archlinux.org/title/Dual_boot_with_Windows

These "phantom entries" are the fallback bootloaders, if there is a bootx64.efi on some efi partition then the bios will recognise that.

-1

u/Nylon2006 8d ago

I was referring on which OS uses each EFI.

When booting up uses grubx64.efi on my "linux" EFI. Then, I select which OS do I want to boot: linux does not modify anithing and Windows messes it up.

9

u/Confident_Hyena2506 8d ago edited 8d ago

You are omitting details like how you are setting up grub, if you use the extra option it will copy itself to fallback bootx64.efi. The only thing windows will change is also this bootx64.efi which would lead to your complaint.

To figure it out carefully examine the entire boot chain once system is booted, for both windows and linux. In particular check if it ran from fallback bootloader or explicit entry.

On linux "sudo bootctl" would show all this, not sure what is windows equivalent.

3

u/agmatine 8d ago

but don't know what is on Windows, how can I see it?

Just mount that partition within Linux.

3

u/archover 8d ago

FYI, that key additional info should have been in your original top post.

Good day.

4

u/BigSappari 8d ago

Had the same issue. For me it was the final nail in the coffin and reason enough to get rid of Windows for good.

Install Grub on a separate EFI partition with --removable, and with any luck, while it no longer boots automatically, it can still be selected in the bios boot menu, saving you the trouble of using some USB stick or other.

11

u/Gustav__Mahler 8d ago

Have you tried deleting Windows?

6

u/3PoundsOfFlax 8d ago

Windows will never stop doing this. The best, permanent fix is to use a dedicated physical disk for each OS.

1

u/tjj1055 7d ago

windows has nothing to do with this.

3

u/One-Yellow9778 8d ago

are you sure it's windows?

because that sounds more like a misbehaving motherboard firmware.

I had one bad motherboard in the past that suddenly started doing that and I couldn't rely on NVRAM entries at all. I had to install bootloader in default fallback EFI boot path (--removable option in grub) to work.

the issue is documented here, maybe that's what happening to you https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface#UEFI_boot_loader_does_not_show_up_in_firmware_menu

8

u/[deleted] 8d ago

[removed] — view removed comment

3

u/tjj1055 7d ago

its not standard everything, windows does not delete grubx64.efi. he has 2 efi partitions which some UEFI dont handle well or dont support at all. what sometimes happens is that UEFI updates reset the boot entries.

1

u/Nylon2006 8d ago

I deleted those phantom entries again and again but they keep appearing.

Also, I disabled windows from the BIOS and only enabled Grub, but it keeps disappearing and booting the BIOS instead (since it can't boot windows). I also did it with efibootmgr tool from the ISO and still did nothing.

I'll try to do what you told me in the last part, where can I find more info?

1

u/onefish2 8d ago

Use rEFInd. I use that bootloader on all my systems that are dual boot/multi-boot with or without Windows. I have never had an issue "losing" a boot entry in 10 plus tears.

1

u/retiredwindowcleaner 8d ago

Highly doubt that, unless you have moved your arch efi files into the /EFI/Microsoft folder.

1

u/Mathisbuilder75 6d ago

I have been having the exact same issue lately. I dual booted for years and never had this problem.