Hi antegros community,
I was dualbooting Windows 10 and Lubuntu on my HP ProBook 430 G3. I have decided to switch from Lubuntu to Antegros so I have installed the Antegros and updated my efi partition.

I want to run Windows recovery because it seems that Windows boot was somehow corrupted during Antegros install. I had to set up boot delay to 5 seconds to be able to enter BIOS (F10) because the Grub would flash over before the BIOS would load.

When I try to enter boot menu (Esc) or HP Recovery mode (F11) it will start loading but before the loading of Boot menu or recovery mode finishes the GRUB menu will flash over. I have tried to enter the GRUB command line and type “exit” which would previously show me the BIOS menu where I can choose the recovery mode. The recovery mode would not load and it would just display GRUB menu again.

I have tried Fedora, Zorin, and Lubuntu and I have never encountering any similar issues. With Lubuntu and Zorin I had secure boot enabled with Fedora and Antegros I have disabled it.

I have concluded that Windows 10 boot might be corrupted because following was not successful:

running os-prober (no results)

grub update

grub mkconfig and reinstalling grub as described here How To Fix Grub With EFI Boot?

manually adding the efi grub entry to /etc/grub.d/40_custom. This makes the entry visible but nothing happens when I select it.

I want to boot Windows installed at sdb4 the boot EFI partition is sdb2. The HDD sda has no boot efi partitions I use it just for data backup. I will try your example, but what is exactly represented by the variable $file, where does it get its value from?

Thank you, everything works now! Here is what I did step by step based on your advice, maybe it can be useful for someone else as well:
/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi was actually a folder so I have completely removed it:

sudo rm -r /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

Then I started the windows console from the Windows USB recovery and ran following commands:
first diskaprt to list volumes and their letter. This command will launch the diskpart command line app:

diskpart

then

list volume

Volume 6 of my SSD drive (/dev/sdb/) was EFI partition, it usually has 100 MB and no disk letter (C: , B: etc) assigned to it. So I select volume 6:

sel vol 6

I have assigned the letter to the EFI partition so that I can switch to it:

I typed exit to exit the diskpart, and then run following command (directly in the command line):

bcdboot X:\windows Note

Where X is the letter of the volume where your windows is, it is NOT the letter of the EFI partition! This command will copy the efi files from the windows drive tot the efi partition. If everything is ok it will say “Boot files completed successfully”. When the command finished I saw correct windows grub files in the directory /boot/efi/EFI/Microsoft/Boot/

After restart, I have just changed the boot order in the UEFI BIOS because after this fix the Windows bootloader was first so the grub menu did not show up, it just booted Windows 10 right away.
/boot/efi/EFI/Microsoft/Boot/