GRUB_DISABLE_OS_PROBER flag appears to be ignored in /etc/default/grub

After updating to version 2.04-17 re-generating the grub config with the update-grub command ignores the fact that GRUB_DISABLE_OS_PROBER=true is set in /etc/default/grub.

The partition structure is as below - even though GRUB_DISABLE_OS_PROBER is set to true os-prober is still invoked and Windows Boot Manager is added to the boot menu. This does not occur in 2.04-16. The os-prober version is 1.77-1 but this has not changed.

The issue occurs on both 5.4 and 5.10 series kernels.

In either case a manually added ‘Windows 10’ entry is still included.

Device             Start        End    Sectors   Size Type
/dev/nvme0n1p1      2048     206847     204800   100M EFI System
/dev/nvme0n1p2    206848     239615      32768    16M Microsoft reserved
/dev/nvme0n1p3    239616  314355132  314115517 149.8G Microsoft basic data
/dev/nvme0n1p4 314357760  315391999    1034240   505M Windows recovery environment
/dev/nvme0n1p5 315392000  416055295  100663296    48G Linux swap
/dev/nvme0n1p6 416055296 2000409230 1584353935 755.5G Linux filesystem

The Manjaro root on /dev/nvme0n1p6 is formatted as BTRFS.

Contents of /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="udev.log_priority=3 resume=/dev/disk/by-uuid/24c990f4-9f95-4e04-8c87-7fd493933443 zswap.enabled=1"

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

# 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

# Uncomment to use basic console

# Uncomment to disable graphical terminal

# 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'

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

# 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"

# Uncomment to disable generation of recovery mode menu entries

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.

# Uncomment one of them for the gfx desired, a image background or a gfxtheme

# 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

/etc/grub.d/40_custom (custom chainloader for Windows 10):

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows 10' --class windows --class os {
    search --fs-uuid --no-floppy --set=root 5AA1-1EFF
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi

Working around this problem by removing os-prober is not a solution for me as it is a dependency of several manjaro-tools* packages which I use.

Welcome to the forum! :wink:

It may indeed be a bug ─ note: the #development category is not for bug reports but for actual code contributions ─ but you don’t have to remove it. Just unset its execute permission, as I have done. :wink:

sudo chmod 644 /etc/grub.d/30_os-prober

Thank you.

The reason I reported the possible bug in the Development section was because of the instruction here:

To my surprise I haven’t been able to find a public bug tracking service for Manjaro like I have other distros, though perhaps I am missing something. Alternatively, perhaps this package is unmodified from vanilla Arch and I should be reporting it there?

1 Like

Well, reporting bugs is (among other things) what the #site-feedback category is for. :wink:

It’s a Manjaro package, albeit (of course) that we don’t develop grub itself. But we do apply our own customization to it.

I have now invited the grub maintainer to this thread so he can come and take a look. :wink:

update-grub is calling this:

[phil@development ~]$ cat /usr/bin/update-grub
#! /bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"

Try to set the value in config to FALSE and see what happens. See also here. I think they had a logic issue upstream. Will try to patch it on our end.

1 Like

Fix is now upstream: [PATCH] templates: Properly disable the os-prober by default

1 Like


This post resume what to do

in your linked upstream patch is:
if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
but in Manjaro /etc/grub.d/30_os-prober is:
if [ "x${GRUB_DISABLE_OS_PROBER}" != "xfalse" ]; then

is/was this intentional reversal of logic? exit 0 leaves the script? so manjaro version seems righter… but I am confused now :smiley:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.