Grub mneu shows: Windows Boot Manager, but there isn't

On booting the system, the Grub menu shows:

openSUSE Leap 15.1
Advanced options for openSUSE Leap 15.1
Windows Boot Manager (on /dev/sda1)

Using the last entry, I get a light blue screen with errors, basicaly telling me that nothing like a Windows OS is found and that I should recover it.

boven:/boot/grub2 # fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-60W
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0AAF3B2B-2BCB-41BF-841D-C0E6A627F6E7

Device        Start       End   Sectors  Size Type
/dev/sda1      2048    534527    532480  260M EFI System
/dev/sda2    534528  17317887  16783360    8G Microsoft basic data
/dev/sda3  17317888  59262975  41945088   20G Microsoft basic data
/dev/sda4  59262976 478689279 419426304  200G Microsoft basic data


boven:/boot/grub2 # 
boven:/boot/grub2 # cat /etc/fstab
UUID=7dc53b12-93a9-4e97-b0ae-ab165a8bd688  /               ext4   acl,user_xattr        1  1
UUID=212ea772-7bec-4bee-85b5-786f7a810356  swap            swap   defaults              0  0
UUID=A626-CF2D                             /boot/efi       vfat   umask=0002,utf8=true  0  0
UUID=8c561c1d-e51f-4eb9-a28a-92b3a98df5be  /home           ext4   defaults              1  2
tmpfs                                      /tmp            tmpfs  size=25%,uid=root,gid=root,mode=1777  0  0
boven:/boot/grub2 #
boven:/boot/grub2 # l /boot/efi/EFI/
total 24
drwxrwxr-x 6 root root 4096 Dec  7  2016 ./
drwxrwxr-x 3 root root 4096 Jan  1  1970 ../
drwxrwxr-x 2 root root 4096 Sep 28  2016 Boot/
drwxrwxr-x 5 root root 4096 Dec  7  2016 HP/
drwxrwxr-x 4 root root 4096 Sep 28  2016 Microsoft/
drwxrwxr-x 2 root root 4096 Dec  7  2016 opensuse/
boven:/boot/grub2 #

So there is something talking about Microsoft in the EFI partition.

Of course I never try to use that Grub entry (except just now to see what it does) and in day-to-day working it does not bother me. But it could be that some onlooker would see it when I boot the system and I find it rather embarrasing that the word Windows would then be shown on my screen :shame:.

My question: is it normal to have this Grub entry after an installation that wiped Microsoft Windows from the system. And when yes: is this more or less a bug the installer?

os-prober does not care about Windows, it only looks for Windows bootloader. Delete \EFI\Microsoft directory if you no more have Windows installed. You may have copy of Windows bootloader as \EFI\Boot\bootx64.efi as well.

boven:/boot/efi/EFI/Boot # l
total 1140
drwxrwxr-x 2 root root    4096 Sep 28  2016 ./
drwxrwxr-x 6 root root    4096 Dec  7  2016 ../
-rwxrwxr-x 1 root root 1159008 Jul 28  2016 bootx64.efi*
boven:/boot/efi/EFI/Boot # 

And this seesm to be a copy of

boven:/boot/efi/EFI # diff Boot/bootx64.efi Microsoft/Boot/bootmgfw.efi 
boven:/boot/efi/EFI # 

Do I have to remove /boot/efi/EFI/Boot/boot64.efi or even the whole /boot/efi/EFI/Boot?

Stays the question about why the installer does this.

It apparently writes there, because there is /boot/efi/EFI/opensuse (which I bet wasn’t there when I bought the system).
It seems that it does not create fresh contents for the EFI partition and that it only dares to add an opensuse directory thnking it to risky to do anything else.

Installing this system was already some time ago, thus I am not sure anymore on what I did. It is thus possible that I only removed all partitions except /dev/sda1 (EFI) and build up from there. In that case I have some understanding for the installer only adapting EFI to openSUSE.

Maybe, when I then would also had deleted /dev/sda1, the installer would have created a new one with only what is needed.

Tests for the next installation, except when anybody here has already some experience with this.

I removed the Microsoft directory and let YaST > System > Bootloader create a new configuration. The entry is gone.

After that I removed the check for other OSes from YaST > System > Bootloader. I see no need for it.

I recommend removing “bootx64.efi”. Perhaps remove everything in that directory, but do not remove the “Boot” directory.

At some future time (after there has been a grub update), you will again have a “bootx64.efi” file there. But this time, it will have been installed there by openSUSE.

That’s actually a fallback boot option, in case something goes wrong with the one in “/boot/efi/EFI/opensuse”. But your openSUSE install won’t put it there if it sees an entry there from another operating system.

Stays the question about why the installer does this.

It is part of installing grub2 booting on a UEFI system.

Installing this system was already some time ago, thus I am not sure anymore on what I did. It is thus possible that I only removed all partitions except /dev/sda1 (EFI) and build up from there.

Yes, that seems to be what you did.

Maybe, when I then would also had deleted /dev/sda1, the installer would have created a new one with only what is needed.

That would have worked, too. But what you did is fine.

You might also run (as root) the command:

efibootmgr

If it has an entry for Windows, then you can remove it. To remove, use:

efibootmgr -b NNNN -B

where the “NNNN” is replaced by the boot entry number for the Windows boot loader entry (a hexadecimal number). Any use of “efibootmgr” lists those numbers for various boot entries.

Thanks for all the explanations.

I simply deleted the whole Microsoft directory (with all that is in it) and the entry is already gone…

I now removed the only file in Boot: bootx64.efi

And:

boven:~ # efibootmgr
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0000,000D,0001,0002,0005,0006,000B,0004,0007,0008
Boot0000* Windows Boot Manager
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0003* opensuse-secureboot
Boot0004  UEFI:CD/DVD Drive
Boot0005* UEFI: IPv4 Realtek PCIe GBE Family Controller
Boot0006* UEFI: IPv6 Realtek PCIe GBE Family Controller
Boot0007  UEFI:Removable Device
Boot0008  UEFI:Network Device
Boot000B  Fake Legacy Option
Boot000D* opensuse
boven:~ # efibootmgr -b 0000 -B
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,000D,0001,0002,0005,0006,000B,0004,0007,0008
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0003* opensuse-secureboot
Boot0004  UEFI:CD/DVD Drive
Boot0005* UEFI: IPv4 Realtek PCIe GBE Family Controller
Boot0006* UEFI: IPv6 Realtek PCIe GBE Family Controller
Boot0007  UEFI:Removable Device
Boot0008  UEFI:Network Device
Boot000B  Fake Legacy Option
Boot000D* opensuse
boven:~ #

So the Boot0000* Windows Boot Manager is gone as is the mentioning of 0000 in the Bootorder list.

Together with what I did earlier, I guess I have now stamped out any ambitions out of Windows