Grub and os-prober not able to find Windows

Hi, I seem to have installed both Manjaro and Windows in UEFI mode, atleast as per the following output. But os-prober and also grub is failing to find Windows installation and create a grub entry for the same. Any help would be appreciated. :slight_smile:

$ sudo parted -l   
Model: ATA WDC WD10SPZX-80Z (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  947GB   947GB   ntfs         Basic data partition  msftdata
 3      947GB   968GB   21.5GB  ext4
 2      968GB   1000GB  32.2GB  ext4                               legacy_boot


Model: JetFlash Transcend 16GB (scsi)
Disk /dev/sdb: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      3664MB  3668MB  4194kB  primary               esp


Model: HFM256GDJTNG-8310A (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name                          Flags
 1      1049kB  815MB  814MB   fat32                                         bios_grub
 2      815MB   149GB  148GB   ntfs            Basic data partition          msftdata
 3      149GB   149GB  16.8MB                  Microsoft reserved partition  msftres
 4      149GB   162GB  12.3GB  linux-swap(v1)                                swap
 5      162GB   218GB  56.0GB  ext4
 6      218GB   255GB  37.4GB  ext4
 7      255GB   256GB  1101MB  ntfs            Basic data partition          hidden, diag

$ efibootmgr -v
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001,0002,0003
Boot0000* Manjaro       HD(1,GPT,5ebb2f60-361c-9b4a-92fd-796e0a00edf4,0x800,0x184000)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0001* Windows Boot Manager  HD(1,GPT,5ebb2f60-361c-9b4a-92fd-796e0a00edf4,0x800,0x184000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002* UEFI: JetFlashTranscend 16GB 1100     PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(3,0)/CDROM(1,0x6d3154,0x8000)..BO
Boot0003* UEFI: JetFlashTranscend 16GB 1100, Partition 2        PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(3,0)/HD(2,MBR,0x0,0x6d3154,0x2000)..BO

$ sudo update-grub
[sudo] password for rohith: 
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

Hi @rohith,

os-prober is disabled by default. You’d have to enable it first. To do so:

  1. Open /etc/defaults/grub as sudo to edit:
sudo nano /etc/default/grub
  1. Look for the line starting with
#GRUB_ROOT_FS_RO

…and change it to

#GRUB_ROOT_FS_RO=true

As per the instructions.

  1. Save, Ctrl+OY, and exit, Ctrl+X.

  2. Update grub:

sudo update-grub
  1. If successful, it should be safe to reboot, so do that and test.

Hope this helps!

Tried toggling the comment (like you suggested on the line GRUB_ROOT_FS_RO=true). Still no luck. :frowning:

# Uncomment this option to enable os-prober execution in the grub-mkconfig command
# GRUB_DISABLE_OS_PROBER=false
sudo update-grub

:point_up: this.

My mistake for the typo. and man! What a typo!

I had uncommented this already. Still no luck. :frowning:

Os-Prober is installed, I presume?
https://mirror.alpix.eu/manjaro/testing/community/x86_64/os-prober-1.79-1-x86_64.pkg.tar.zst
or Grub-Install:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
or

I would not be sure about it since you have a bios_grub flag as shown here:

Could be that you boot in BIOS mode or one of the OS was at least installed in BIOS mode.

1 Like

I had the same doubt. I keep the flag as “boot” but still end up getting bios_grub as the flag. Not sure what I’m doing wrong here.

May be you updated BIOS and/or BIOS-settings are changed?

Got it! :slight_smile: . When I re-installed Windows today, it created a seperate EFI partition of 100 MB size. But I’m still not sure why the EFI partition that I created for Manjaro still has the flag “bios_grub”. I had set it to have the flag “boot” and even formatted it during Manjaro installation. The partition with flag “boot, esp” is of the Windows I suppose.

$ sudo parted -l
[sudo] password for rohith: 
Model: ATA WDC WD10SPZX-80Z (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  947GB   947GB   ntfs         Basic data partition  msftdata
 3      947GB   968GB   21.5GB  ext4
 2      968GB   1000GB  32.2GB  ext4                               legacy_boot


Model: HFM256GDJTNG-8310A (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name                          Flags
 1      1049kB  815MB  814MB   fat32                                         bios_grub
 2      815MB   920MB  105MB   fat32           EFI system partition          boot, esp
 3      920MB   149GB  148GB   ntfs            Basic data partition          msftdata
 4      149GB   149GB  633MB   ntfs                                          hidden, diag
 5      149GB   149GB  16.8MB                  Microsoft reserved partition  msftres
 6      149GB   162GB  12.3GB  linux-swap(v1)                                swap
 7      162GB   218GB  56.0GB  ext4
 8      218GB   255GB  37.4GB  ext4
 9      255GB   256GB  1101MB  ntfs            Basic data partition          hidden, diag

Grub is now able to locate Windows. But there also seems to be an extra entry in the boot menu (F8 key during startup). The extra entry has the name “UEFI OS”. I don’t know what this is. Upon selecting this “UEFI OS” from boot menu I will be taken to the grub menu and the menu has 2 options - Manjaro and Windows.
I am pasting the output of $ efibootmgr -v below:

$ efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0001,0007
Boot0000* Manjaro       HD(1,GPT,5ebb2f60-361c-9b4a-92fd-796e0a00edf4,0x800,0x184000)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0001* Windows Boot Manager  HD(2,GPT,b7fbfc77-9fb4-4b75-905f-085f7837b3de,0x184800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...c................
Boot0007* UEFI OS       HD(1,GPT,5ebb2f60-361c-9b4a-92fd-796e0a00edf4,0x800,0x184000)/File(\EFI\BOOT\BOOTX64.EFI)..BO

It looks like the same as #Boot0001. So it might be something to do with that, I don’t know. However, if you’re absolutely sure you don’t usee it, you can always delete it:

$ efibootmgr --help
[...]
-B | --delete-bootnum delete bootnum
[...]

So it would be:

efibootmgr --delete-bootnum=Boot0007

Or that’s how I’ve got it, anyway.

I take no responsibility if that deletes the wrong thing. If, however, it works then feel free to heap on the praise.

Hope this helps!

1 Like

Manjaro EFI Partion should have “boot,esp” flag, and Windows too
My System has one EFI Partition for Manjaro and one for Windows. (on different Disks!!!)
==> so you can move the Manjaroi-drive and/or the Windows-drive to another PC without problems.
You use only one Disk for both systems.
There should be inside the “boot,efi”-Partition /EFI/ three Drawers:
/EFI/Boot
/EFI/Manjaro
/EFI/Microsoft
The Partition "bios_grub is not needed afaik;
And: only one EFI on your Disk.

My dual boot setup - everything seems to be working just fine. I wanted to know if there is any disadvantage of having 2 EFI partitions on the same disk? (apart from space being wasted).
If so, I will try to have a single EFI partition.

If it works everything is fine. No need to worry.

1 Like

No, one EFI for each system is o.K. - so each system lives for its one “not disturbing neighbours”.
(If you will kill one system, the others remain intact).

2 Likes