46968b6
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
46968b6
From: Javier Martinez Canillas <javierm@redhat.com>
13985b0
Date: Fri, 11 Jun 2021 12:10:58 +0200
46968b6
Subject: [PATCH] Revert "templates: Disable the os-prober by default"
46968b6
46968b6
This reverts commit e346414725a70e5c74ee87ca14e580c66f517666.
46968b6
---
46968b6
 docs/grub.texi              | 18 ++++++++----------
46968b6
 util/grub.d/30_os-prober.in |  5 +----
46968b6
 2 files changed, 9 insertions(+), 14 deletions(-)
46968b6
46968b6
diff --git a/docs/grub.texi b/docs/grub.texi
e622855
index f8b4b3b21a..69f08d289f 100644
46968b6
--- a/docs/grub.texi
46968b6
+++ b/docs/grub.texi
13985b0
@@ -1519,13 +1519,10 @@ boot sequence.  If you have problems, set this option to @samp{text} and
46968b6
 GRUB will tell Linux to boot in normal text mode.
46968b6
 
46968b6
 @item GRUB_DISABLE_OS_PROBER
13985b0
-The @command{grub-mkconfig} has a feature to use the external
46968b6
-@command{os-prober} program to discover other operating systems installed on
46968b6
-the same machine and generate appropriate menu entries for them. It is disabled
46968b6
-by default since automatic and silent execution of @command{os-prober}, and
46968b6
-creating boot entries based on that data, is a potential attack vector. Set
46968b6
-this option to @samp{false} to enable this feature in the
13985b0
-@command{grub-mkconfig} command.
13985b0
+Normally, @command{grub-mkconfig} will try to use the external
46968b6
+@command{os-prober} program, if installed, to discover other operating
46968b6
+systems installed on the same system and generate appropriate menu entries
46968b6
+for them.  Set this option to @samp{true} to disable this.
46968b6
 
46968b6
 @item GRUB_OS_PROBER_SKIP_LIST
46968b6
 List of space-separated FS UUIDs of filesystems to be ignored from os-prober
13985b0
@@ -1853,9 +1850,10 @@ than zero; otherwise 0.
46968b6
 @section Multi-boot manual config
46968b6
 
46968b6
 Currently autogenerating config files for multi-boot environments depends on
46968b6
-os-prober and has several shortcomings. Due to that it is disabled by default.
46968b6
-It is advised to use the power of GRUB syntax and do it yourself. A possible
46968b6
-configuration is detailed here, feel free to adjust to your needs.
46968b6
+os-prober and has several shortcomings. While fixing it is scheduled for the
46968b6
+next release, meanwhile you can make use of the power of GRUB syntax and do it
46968b6
+yourself. A possible configuration is detailed here, feel free to adjust to your
46968b6
+needs.
46968b6
 
46968b6
 First create a separate GRUB partition, big enough to hold GRUB. Some of the
46968b6
 following entries show how to load OS installer images from this same partition,
46968b6
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
e622855
index 80685b15f4..1b91c102f3 100644
46968b6
--- a/util/grub.d/30_os-prober.in
46968b6
+++ b/util/grub.d/30_os-prober.in
46968b6
@@ -26,8 +26,7 @@ export TEXTDOMAINDIR="@localedir@"
46968b6
 
46968b6
 . "$pkgdatadir/grub-mkconfig_lib"
46968b6
 
46968b6
-if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
46968b6
-  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.\n"
46968b6
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
46968b6
   exit 0
46968b6
 fi
46968b6
 
46968b6
@@ -40,8 +39,6 @@ OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
46968b6
 if [ -z "${OSPROBED}" ] ; then
46968b6
   # empty os-prober output, nothing doing
46968b6
   exit 0
46968b6
-else
46968b6
-  grub_warn "$(gettext_printf "os-prober was executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
46968b6
 fi
46968b6
 
46968b6
 osx_entry() {