7

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?

el_murdoque
  • 81
  • 1
  • 1
  • 3
  • 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. – Organic Marble Dec 02 '21 at 20:52

1 Answers1

7

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

xpt
  • 987
  • 2
  • 13
  • 31
  • 1
    Similar problem in debian. After trying tens of googled solutiuons, this is the one it fixed it. Thanks. +1 – daniel_hck Jun 30 '22 at 22:37
  • 1
    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 – entio Sep 02 '22 at 08:53