Grub (Os-prober) can't find Windows 10 on another disk

Hello guys, i have some troubles with dual-boot, I have Manjaro linux on ssd and Windows 10 on another ssd, but grub can’t find Windows boot-loader. And i have one HDD.

lsblk :

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0 611,2M  1 loop /var/lib/snapd/snap/goland/173
loop1         7:1    0  82,9M  1 loop /var/lib/snapd/snap/discord/132
loop2         7:2    0 164,8M  1 loop /var/lib/snapd/snap/gnome-3-28-1804/161
loop3         7:3    0  65,2M  1 loop /var/lib/snapd/snap/gtk-common-themes/1519
loop4         7:4    0  29,2M  1 loop /var/lib/snapd/snap/pyright/309
loop5         7:5    0     4K  1 loop /var/lib/snapd/snap/bare/5
loop6         7:6    0  61,9M  1 loop /var/lib/snapd/snap/core20/1376
loop7         7:7    0  55,5M  1 loop /var/lib/snapd/snap/core18/2344
loop8         7:8    0  55,5M  1 loop /var/lib/snapd/snap/core18/2284
loop9         7:9    0  29,2M  1 loop /var/lib/snapd/snap/pyright/311
loop10        7:10   0  10,4M  1 loop /var/lib/snapd/snap/nvim/1722
loop11        7:11   0   611M  1 loop /var/lib/snapd/snap/goland/168
loop12        7:12   0  61,9M  1 loop /var/lib/snapd/snap/core20/1361
loop13        7:13   0  82,9M  1 loop /var/lib/snapd/snap/discord/131
loop14        7:14   0    18M  1 loop /var/lib/snapd/snap/chromium-ffmpeg/24
loop15        7:15   0 168,2M  1 loop /var/lib/snapd/snap/spotify/57
loop16        7:16   0  43,6M  1 loop /var/lib/snapd/snap/snapd/15177
loop17        7:17   0  43,6M  1 loop /var/lib/snapd/snap/snapd/14978
loop18        7:18   0 169,6M  1 loop /var/lib/snapd/snap/spotify/58
sda           8:0    0 232,9G  0 disk 
├─sda1        8:1    0   100M  0 part 
├─sda2        8:2    0    16M  0 part 
├─sda3        8:3    0 150,3G  0 part 
├─sda4        8:4    0   520M  0 part 
└─sda5        8:5    0    75G  0 part 
sdb           8:16   0 931,5G  0 disk 
├─sdb1        8:17   0   128M  0 part 
├─sdb2        8:18   0 491,3G  0 part 
└─sdb3        8:19   0 418,3G  0 part 
nvme0n1     259:0    0 232,9G  0 disk 
├─nvme0n1p1 259:1    0 215,7G  0 part /var/log
│                                     /var/cache
│                                     /home
│                                     /
└─nvme0n1p2 259:2    0  17,2G  0 part [SWAP]

sudo fdisk -l :

Disk /dev/nvme0n1: 232,89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 970 EVO Plus 250GB          
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x80878ac8

Device         Boot     Start       End   Sectors   Size Id Type
/dev/nvme0n1p1 *         2048 452328598 452326551 215,7G 83 Linux
/dev/nvme0n1p2      452328599 488392064  36063466  17,2G 82 Linux swap / Solaris


Disk /dev/sda: 232,89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: WDC WDS250G2B0A 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 356896D9-3355-4BD2-830B-34426A392D7E

Device         Start       End   Sectors   Size Type
/dev/sda1       2048    206847    204800   100M EFI System
/dev/sda2     206848    239615     32768    16M Microsoft reserved
/dev/sda3     239616 315346943 315107328 150,3G Microsoft basic data
/dev/sda4  315346944 316411903   1064960   520M Windows recovery environment
/dev/sda5  316411904 473698303 157286400    75G Microsoft basic data


Disk /dev/sdb: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DL002-9TT1
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: CE29F822-E4F5-11EA-9FC1-18C04D28920F

Device          Start        End    Sectors   Size Type
/dev/sdb1        2048     264191     262144   128M Microsoft reserved
/dev/sdb2      264192 1030522879 1030258688 491,3G Linux filesystem
/dev/sdb3  1030522880 1907795967  877273088 418,3G Microsoft basic data


Disk /dev/loop0: 611,18 MiB, 640868352 bytes, 1251696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 82,9 MiB, 86925312 bytes, 169776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 164,76 MiB, 172761088 bytes, 337424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 65,21 MiB, 68378624 bytes, 133552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 29,23 MiB, 30650368 bytes, 59864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 61,89 MiB, 64901120 bytes, 126760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 55,52 MiB, 58212352 bytes, 113696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 29,23 MiB, 30654464 bytes, 59872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 10,4 MiB, 10907648 bytes, 21304 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 610,99 MiB, 640671744 bytes, 1251312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop8: 55,51 MiB, 58204160 bytes, 113680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 82,89 MiB, 86917120 bytes, 169760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 61,89 MiB, 64897024 bytes, 126752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop14: 17,97 MiB, 18845696 bytes, 36808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop16: 43,63 MiB, 45748224 bytes, 89352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop17: 43,59 MiB, 45703168 bytes, 89264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop15: 168,22 MiB, 176390144 bytes, 344512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop18: 169,57 MiB, 177803264 bytes, 347272 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

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

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
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-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.
Detecting snapshots ...
Found snapshot: 2022-03-26 17:00:02 | timeshift-btrfs/snapshots/2022-03-26_17-00-02/@ | daily          | N/A |
Found snapshot: 2022-03-26 02:00:01 | timeshift-btrfs/snapshots/2022-03-26_02-00-01/@ | weekly monthly | N/A |
Found 2 snapshot(s)
Unmount /tmp/grub-btrfs.LmoXD6tZ92 .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

Can someone help me? :slight_smile:

The file you’re using with -o is output of grub-mkconfig and doesn’t contain GRUB options.

Try to uncomment GRUB_DISABLE_OS_PROBER=false in /etc/default/grub and rerun sudo grub-mkconfig

This might be related to your issue. Setting the correct flags might resolve this:

As an aside: Use parted instead of fdisk from now on.

It’s already uncommented

What does 4 means in sudo parted /dev/sda 4 esp on ?

By the way, here is sudo parted -l:

Model: ATA WDC WDS250G2B0A (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  106MB  105MB   fat32        EFI system partition          boot, esp
 2      106MB   123MB  16,8MB               Microsoft reserved partition  msftres
 3      123MB   161GB  161GB   ntfs         Basic data partition          msftdata
 4      161GB   162GB  545MB   ntfs                                       hidden, diag
 5      162GB   243GB  80,5GB  ntfs         Basic data partition          msftdata


Model: ATA ST1000DL002-9TT1 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name                  Flags
 1      1049kB  135MB  134MB                                     msftres
 2      135MB   528GB  527GB  btrfs        D-disk
 3      528GB   977GB  449GB  ntfs         Basic data partition  msftdata


Model: Samsung SSD 970 EVO Plus 250GB (nvme)
Disk /dev/nvme0n1: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type     File system     Flags
 1      1049kB  232GB  232GB   primary  btrfs           boot
 2      232GB   250GB  18,5GB  primary  linux-swap(v1)

So I take it that partition 1 of sda is your EFI partition, which houses the EFI bootloaders of both Windows 10 and Manjaro?


What about the output/contents of the following:

cat /etc/default/grub
ls -l /etc/grub.d
efibootmgr

Windows and manjaro loaders on different disks i guess.

cat /etc/default/grub:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor resume=UUID=bf2e3d9d-e484-4950-a960-d50b6ddab3a9 udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
#GRUB_SAVEDEFAULT="true"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

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

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true

ls -l /etc/grub.d:

total 120
-rwxr-xr-x 1 root root  8871 Jan 17 22:58 00_header
-rwxr-xr-x 1 root root 13193 Jan 17 22:58 10_linux
-rwxr-xr-x 1 root root 13327 Jan 17 22:58 20_linux_xen
-rwxr-xr-x 1 root root 12525 Jan 17 22:58 30_os-prober
-rwxr-xr-x 1 root root  1372 Jan 17 22:58 30_uefi-firmware
-rwxr-xr-x 1 root root   700 Feb 25 21:16 35_fwupd
-rwxr-xr-x 1 root root   216 Feb  9 09:46 40_custom
-rwxr-xr-x 1 root root   340 Feb  9 09:34 40_custom.save
-rwxr-xr-x 1 root root   340 Feb  9 09:45 40_custom.save.1
-rwxr-xr-x 1 root root   215 Jan 17 22:58 41_custom
-rwxr-xr-x 1 root root 25968 Feb 25 03:42 41_snapshots-btrfs
-rwxr-xr-x 1 root root  1219 Jun 12  2021 60_memtest86+
-rw-r--r-- 1 root root   483 Jan 17 22:58 README

efibootmgr:

EFI variables are not supported on this system.

Did you use legacy / MBR boot?

That’s why it’s ignoring EFI bootloaders.

To be honest, i don’t know, but before it, i had linux and windows on the one disk where is only windows now, and everything worked perfectly.

You have two choices:

  1. Leave things the way they are, and use your BIOS’s boot override feature (by holding down F9 or whatever key it uses) to choose which OS to boot into.
  2. Re-install Grub for the 64-bit EFI boot method (EFI bootloader)

If you try Step #2, be careful. I can only “infer” what you need to do:

Check if sda1 is already mounted to /boot/efi

mount | grep sda1

If it already is, skip the next step. If it is not, then mount it:

sudo mount /dev/sda1 /boot/efi

Then install Grub for 64-bit EFI:

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi

Then reboot into Manjaro (via EFI boot), and try to run sudo update-grub once again.

How can i select boot?

And i cant mount /dev/sda1, because mount: /boot/efi: mount point does not exist.

Your BIOS should have settings on whether to use EFI boot, legacy boot, or “both” (compatibility mode), etc.

It depends on your BIOS.

Usually a BIOS will have a hotkey configured to override the boot, such as F9

Ok, thank you, and what about this?

Sorry for my bad knowledge of linux.

Create the directory first, then proceed as normal.

sudo mkdir /boot/efi
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi

After this command i have this error:

Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.

I’ve tried to edit boot mode from Legasy to Uefi but got the same error.

You’ll have to boot into a live Manjaro ISO (which uses EFI by default; but make sure your BIOS is set to EFI), and then manjaro-chroot into your system partition, and then proceed from there.

I’m not sure how you installed Manjaro in legacy boot mode.

Ok, I’ll try it, thank you.

All commands was executed successfully, but grub still can’t find windows.