You are not logged in.

#1 2022-11-04 08:15:24

bazzix
Member
Registered: 2022-11-04
Posts: 5

[SOLVED] os-probe not detecting Windows bootmgfw.efi

Moderate Ubuntu user here, wanted to switch to Arch for obvious reasons. I was able to install Arch successfully, but I cannot boot into grub. The bootstrapper goes straight into Windows as if it was a standalone system.

When running

grub-mkconfig -o /boot/grub/grub.cfg 

, my linux kernel gets detected by os-probe and added to the /boot/grub/grub.cfg file perfectly fine. However, my Windows installation is not getting detected. The Windows-created ESP partition is clearly mounted on /boot/efi (as I intended), and its contents are accessible. When running

ls /boot/efi/EFI

, I can see

Boot Microsoft grub_uefi

listed, so I know for sure that my EFI partition is properly mounted. And the bootmgfw.efi is exactly where it's supposed to be, nested inside the /boot/efi/EFI/Microsoft directory.

So, naturally, I tried adding a manualentry{} in the /etc/grub.d/40_custom file. The entry gets successfully added to grub.cfg after running grub-mkconfig, and I can also see the added Arch entries from the os-probe results. Yet, still no grub when booting up the computer; straight into Windows 10.

Yes, I made sure to uncomment GRUB_DISABLE_OS_PROBER=false under /etc/default/grub.

What could be the issue? I have included some images of my grub.cfg, lsblk, and the output from the grub-mkconfig -o... command here.

Edit: I read on the wiki that ntfs-3g could be used if grub is not detecting Windows, but I'm just not sure on how to use it.

Last edited by bazzix (2022-11-04 21:06:42)

Offline

#2 2022-11-04 09:08:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,088

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

What problem are you actually trying to solve here? That you can't boot GRUB has nothing to do with whether a Windows entry gets generated and you probably want to look at first. What was/is your grub-install command? It should be

 grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

did you do that/did that work correctly? What's your output for

efibootmgr -uv

? From the sounds of it you either didn't install GRUB at all or installed it in BIOS mode which would explain everything else. Also which mainboard vendor exactly?

Last edited by V1del (2022-11-04 09:09:28)

Offline

#3 2022-11-04 11:16:06

d.ALT
Member
Registered: 2019-05-10
Posts: 953

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

bazzix wrote:

Edit: I read on the wiki that ntfs-3g could be used if grub is not detecting Windows, but I'm just not sure on how to use it.

$ pacman -Qi dosfstools

<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#4 2022-11-04 17:30:24

bazzix
Member
Registered: 2022-11-04
Posts: 5

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

V1del wrote:

What was/is your grub-install command? It should be

 grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

That is exactly what I have, except I used grub_uefi as my bootloader ID.

V1del wrote:

What's your output for

efibootmgr -uv

?

I uploaded the output of the efibootmgr -uv command here

V1del wrote:

Also which mainboard vendor exactly?

I believe it's American Megatrends. When I run

dmidecode -t baseboard

, I get the manufacturer of the laptop, but not the motherboard.

d.ALT wrote:
$ pacman -Qi dosfstools

I have dosfstools installed, the output from your command returns information about the dosfstools tool. Again, not sure how to troubleshoot an EFI partition (VFAT file system) with an NTFS tool.

Last edited by bazzix (2022-11-04 17:36:55)

Offline

#5 2022-11-04 17:51:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,088

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

Your GRUB is there, but not booted, check whether you can switch boot order somewhere in your firmware menu. Or try

efibootmgr -o 1,0,2

FWIW what do you get from

tree /boot #Might have to install the tree tool

note that you can upload text as text if you have an internet connection. https://wiki.archlinux.org/title/List_o … n_services

Last edited by V1del (2022-11-04 17:54:48)

Offline

#6 2022-11-04 18:08:01

d.ALT
Member
Registered: 2019-05-10
Posts: 953

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

bazzix wrote:

I uploaded the output of the efibootmgr -uv command here

Wrong image.

Why do you want to BIOS chainloading the NT loader bootloader in GRUB?

GRUB - on UEFI Platforms - simply needs chainloading the Window's EFI executable .

Please post here the output of::

$ lsblk -f

Also, as V1del told you, we need to inspect your ESP's contents.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#7 2022-11-04 18:28:49

bazzix
Member
Registered: 2022-11-04
Posts: 5

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

V1del wrote:

Your GRUB is there, but not booted, check whether you can switch boot order somewhere in your firmware menu. Or try

efibootmgr -o 1,0,2

OK, we have progress! I went into the UEFI and changed the boot order to grub from Windows. Now I can go into my Arch installation perfectly fine. However, when trying to boot into the 'Windows 10' entry from grub, I get

error: can't find command 'ntldr'.
V1del wrote:

FWIW what do you get from

tree /boot #Might have to install the tree tool

Check it out here.

d.ALT wrote:

Wrong image.

This is the output from efibootmgr -uv.

d.ALT wrote:

Why do you want to BIOS chainloading the NT loader bootloader in GRUB?

GRUB - on UEFI Platforms - simply needs chainloading the Window's EFI executable .

I'm not familiar with these concepts, I will read up on those wiki links.

d.ALT wrote:

Please post here the output of::

$ lsblk -f

You can see the output here.

We're getting close, I realize that I have some gaps in my knowledge that I need to fill in...

d.ALT wrote:

Also, as V1del told you, we need to inspect your ESP's contents.

Please let me know what other output I can send to help.

Offline

#8 2022-11-04 19:01:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,088

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

You didn't have your EFI partition mounted in that, which omits most of the interesting stuff. Note that you need the ESP mounted anyway explicitly when running grub-mkconfig for os-prober to actually detect something. If you never ran the grub-mkconfig command with the ESP (i.e. /boot/efi) mounted then that explains the issues as well.

Offline

#9 2022-11-04 19:15:58

d.ALT
Member
Registered: 2019-05-10
Posts: 953

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

<EDIT>
I) Missing /boot/efi/EFI because ESP is not mounted.
II) Added layout infos as a helper example
</EDIT>

Where is EFI folder inside /boot/efi/? ---> ESP is not mounted!
Both Windows and Linux use

├─nvme1n1p1 vfat   FAT32                  326B-B2B6

right?
Post here

$ cat /etc/fstab

\\\

Here, have a look at my layout:

# tree -fiF -L 2 /efi
/efi/
/efi/EFI/
/efi/EFI/boot/
/efi/EFI/ARCH/
/efi/EFI/Microsoft/

ESP is declared into fstab:

# /dev/nvme0n1p1 LABEL=ESP
UUID=1350-1FAB          /efi            vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 2

Last edited by d.ALT (2022-11-04 19:31:44)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#10 2022-11-04 20:48:41

bazzix
Member
Registered: 2022-11-04
Posts: 5

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

V1del wrote:

You didn't have your EFI partition mounted in that, which omits most of the interesting stuff. Note that you need the ESP mounted anyway explicitly when running grub-mkconfig for os-prober to actually detect something. If you never ran the grub-mkconfig command with the ESP (i.e. /boot/efi) mounted then that explains the issues as well.

d.ALT wrote:

Where is EFI folder inside /boot/efi/? ---> ESP is not mounted!

This was the issue, I completely forgot to mount the ESP drive... Grub works as expected and I can dual boot with no issues into both Arch and Windows. Thanks a lot for the help, this post is solved.

It only took me 22 hours to install Arch, but in the future it should take 10 minutes with the knowledge gained. Well worth it.

Last edited by bazzix (2022-11-04 20:51:31)

Offline

#11 2022-11-04 20:56:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,088

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

I strongly suggest you add that to your fstab so you don't forget in the future/when regenerating the GRUB conf for any reason.

In any case, welcome to Arch.

Please mark as [SOLVED] by editing the title in your first post.

Offline

#12 2022-11-04 21:04:33

bazzix
Member
Registered: 2022-11-04
Posts: 5

Re: [SOLVED] os-probe not detecting Windows bootmgfw.efi

V1del wrote:

I strongly suggest you add that to your fstab so you don't forget in the future/when regenerating the GRUB conf for any reason.

I commented-out the manual entry in 40custom and added a comment in fstab per your recommendation.

Last edited by bazzix (2022-11-04 21:05:14)

Offline

Board footer

Powered by FluxBB