37

I'm running Ubuntu 22.04 and everything was fine. Today I did sudo apt update && sudo apt upgrade and at the end I got the following warning:

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-39-generic
Found initrd image: /boot/initrd.img-5.15.0-39-generic
Found linux image: /boot/vmlinuz-5.15.0-37-generic
Found initrd image: /boot/initrd.img-5.15.0-37-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
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.
Adding boot menu entry for UEFI Firmware Settings ...
done

From what I have seen, os-prober is used when multiple OS are installed on the same machine, so why is this warning on? I have only Ubuntu 22.04 installed. Is it because of the two kernels found?

Memtest86+ already solved in the comments, but what about os-prober?

Here is the content of /etc/default/grub:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=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 `vbeinfo'

#GRUB_GFXMODE=640x480

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY="true"

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

vmisq
  • 521

3 Answers3

38

The warning is generated by /etc/grub.d/30_os-prober, take a look at the lines 43 to 59:

if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
  grub_warn "$(gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.")"
  exit 0
elif [ "x${GRUB_DISABLE_OS_PROBER}" = "xauto" ]; then
  # UBUNTU: We do not want to disable os-prober on upgrades if we found items before.
  if test -e /boot/grub/grub.cfg && ! grep -q osprober /boot/grub/grub.cfg; then
    grub_warn "$(gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.")"
    exit 0
  fi
fi

if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/null ; then

missing os-prober and/or linux-boot-prober

exit 0 fi

grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.")"

You have several options:

  • Ignore the warning, it's only a warning, not an error.

  • Set the variable GRUB_DISABLE_OS_PROBER=false in /etc/default/grub. The warning will change to os-prober will be executed to detect..., as we can see in the snippet of the script.

  • Remove the executable bit from /etc/grub.d/30_os-prober. This will prevent the execution of the script, so you can't get any of this warnings. You can do that with:

    sudo chmod -x /etc/grub.d/30_os-prober
    
  • Edit the script /etc/grub.d/30_os-prober. If you comment out the lines with grub_warn, the script will run without issuing these warnings.

mook765
  • 18,644
1

update-grub reads (probably executes) /etc/default/grub to define referenced environment variables.

Edit /etc/default/grub and uncomment the line containing GRUB_DISABLE_OS_PROBER=false as per instructions in the grub configuration file.

Paul
  • 430
0

I have both Windows and Linux on my system and have the same message, and I’m happy with it that way. IIRC, OS Prober is disabled by default for security reasons, i.e. there are risks that it would be exploited in some circumstances.

Before it became disabled by default I disabled it myself anyway, not for security reasons I have to say, but because there are potential issues when booting Windows through the Microsoft shim that’s being used to start Linux in a Secure Boot environment. So instead, each and every time I want to switch from one OS to another I go through the BIOS settings, which isn’t that much of a hassle if you ask me.

NovHak
  • 779