Score:1

os-prober and update-grub find windows install, yet it does not show in boot menu

jp flag

My system runs Ubuntu 21.04. I recently moved the system from an old SSD to a new M.2 drive, using Clonezilla. In that process, I needed to run update-grub. The system boots up fine, but I cannot choose to boot the Windows 10 install I have on another drive, it is not in the grub menu when booting.

os-prober and update-grub both seem to find it no problem: 
root@zap:/# os-prober 
/dev/sdb1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
root@zap:/# 
root@zap:/# 
root@zap:/# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.11.0-38-generic
Found initrd image: /boot/initrd.img-5.11.0-38-generic
Found linux image: /boot/vmlinuz-5.11.0-37-generic
Found initrd image: /boot/initrd.img-5.11.0-37-generic
Found linux image: /boot/vmlinuz-4.13.0-37-generic
Found initrd image: /boot/initrd.img-4.13.0-37-generic
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Found Windows Boot Manager on /dev/sdb1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done
root@zap:/# 

What have I forgotten?

Organic Marble avatar
us flag
Does the grub menu you see differ in any other ways from the output you show here? Based on your output, I'd expect to see 4 Ubuntu kernel choices, Windows Boot Manager, and the "system settings" in the grub menu.
Score:0
mx flag
xpt

TL'DR:

sudo echo GRUB_DISABLE_OS_PROBER=false >> /etc/default/grub && sudo update-grub

Details:

OS Prober no longer ran by default in latest grub:

Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry

Such kind of questions starts to show up since May 2021.

So I've followed the advice:

% sudo echo GRUB_DISABLE_OS_PROBER=false >> /etc/default/grub && sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Sourcing file `/etc/default/grub.d/lubuntu-grub-theme.cfg'
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/lubuntu-grub-theme/theme.txt
Found linux image: /boot/vmlinuz-5.13.0-19-generic
Found initrd image: /boot/initrd.img-5.13.0-19-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 20.04 LTS (20.04) on /dev/nvme0n1p6
Adding boot menu entry for UEFI Firmware Settings
done

$ tail -1 /etc/default/grub
GRUB_DISABLE_OS_PROBER=false

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release:        21.10
Codename:       impish

$ os-prober
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/nvme0n1p6:Ubuntu 20.04 LTS (20.04):Ubuntu:linux

grep menuentry /boot/grub/grub.cfg

Now I can see my Ubuntu 20.04 LTS boot entries in my /boot/grub/grub.cfg file, as well as Windows boot entry:

$ grep 'menuentry.*Windows' /boot/grub/grub.cfg
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-C633-8883' {

HTH

daniel_hck avatar
cn flag
Similar problem in debian. After trying tens of googled solutiuons, this is the one it fixed it. Thanks. +1
entio avatar
sd flag
For any newbies here struggling to get `GRUB_DISABLE_OS_PROBER` to work - grub-customizer didn't do a good work setting value to `"false"` instead of `false`. Be sure to set to append `GRUB_DISABLE_OS_PROBER=false`. Peace
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.