How to disable or enable OS Prober from the Grub?

Published on

//

Linux has an OS Prober feature that allows us to choose other operating systems installed in the system using Grub. By default on the latest version of Linux, it’s disabled; on the earlier versions, it’s enabled. In this article, I’ll show you how to disable or enable OS Prober from the Grub in Linux (Debian/Ubuntu).

What is OS Prober? What is issue with new release?

If you are multi-booting with other Linuxes, and Windows, you might find an issue, when you update or upgrade Ubuntu (maybe with other Linuxes too) sometime now, it’d stop “seeing” other distros and Windows. The issue here is in the GRUB 2.06 it is disabled for OS-detecting feature security.

What file to edit?

You need to edit the Grub configuration file which is located on:

sudo nano /etc/default/grub

Make sure that you are a root or root privileged user who can edit.

What to edit?

To disable the OS Prober, use the following command.

GRUB_DISABLE_OS_PROBER=true

To enable the OS Prober, use the following command.

GRUB_DISABLE_OS_PROBER=false

Once you have set the instruction you can save and exit the file.

Now just update the Grub so it can take effects.

sudo update-grub

This is it, just reboot (restart) the system and check it.

Special thanks to donjoe and Chris Turner for the updates.

Published in: .

Leave a Reply

Your email address will not be published. Required fields are marked *

Responses

  1. Kenneth Avatar
    Kenneth

    I think you got the GRUB_DISABLE_OS_PROBER commands the wrong way round.

    1. Lorenzo Avatar

      Exactly, it’s the other way around… a simple article that gets the interesting part completely wrong…

    2. donjoe Avatar
      donjoe

      No, the values are functionally-correct because there was a bug in GRUB at the time this article was posted (January 2022). The bug was solved around June 2022, so for newer versions of GRUB you should reverse the values and use disable=true if you want to actually disable the OS Prober. :)

      1. Atul Kumar Pandey Avatar

        Thanks for the update donjoe, I have updated the article with new updates.

  2. Chris Turner Avatar
    Chris Turner

    You have the following the wrong way around

    “What to edit?

    To disable the OS Prober, use the following command.

    GRUB_DISABLE_OS_PROBER=false

    To enable the OS Prober, use the following command.

    GRUB_DISABLE_OS_PROBER=true”

    It should be

    What to edit?

    To disable the OS Prober, use the following command.

    GRUB_DISABLE_OS_PROBER=true

    To enable the OS Prober, use the following command.

    GRUB_DISABLE_OS_PROBER=false

    1. Atul Kumar Pandey Avatar

      Thanks Chris Turner, I have updated article with the new updates. I wrote for the bug what seen initially, but they have fixed the wordings now.