Skip to contentSkip to conversation

Configuration option to disable os-prober?

PATCH Colin Watson 5 participants 11 messages Jul 8, 2009 – Aug 23, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

Some people seem to want to disable os-prober for various reasons (e.g. they have lots of test installations lying around that they don't normally want to get in the way, or they don't want installations on external drives to be included permanently in the boot menu, etc.). Now, they can just remove the os-prober package, but that doesn't really scale as other packages are allowed to depend on it too.

Perhaps we could have a configuration option for this? Patch attached.

Thanks,

Signature · 1 line
Colin Watson                                       [[email protected]]
grub.d/30_os-prober.in +4 -0
Index: util/grub.d/30_os-prober.in
===================================================================
@@ -22,6 +22,10 @@
 
 . ${libdir}/grub/grub-mkconfig_lib
 
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
+  exit 0
+fi
+
 if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
   # missing os-prober and/or linux-boot-prober
   exit 0
#1 lore raw
Quoted 10 lines · Colin Watson

Hi,

Some people seem to want to disable os-prober for various reasons (e.g. they have lots of test installations lying around that they don't normally want to get in the way, or they don't want installations on external drives to be included permanently in the boot menu, etc.). Now, they can just remove the os-prober package, but that doesn't really scale as other packages are allowed to depend on it too.

Perhaps we could have a configuration option for this? Patch attached.

Fine with me (but I'd like to hear from somebody who actually runs Debian or Ubuntu).

Please provide ChangeLog entries for your patches so that nobody has to put words into your mouth.

Signature · 2 lines
Regards,
Pavel Roskin
#2 lore raw
Quoted 10 lines · Pavel Roskin
Quoted 9 lines · Colin Watson

Hi,

Some people seem to want to disable os-prober for various reasons (e.g. they have lots of test installations lying around that they don't normally want to get in the way, or they don't want installations on external drives to be included permanently in the boot menu, etc.). Now, they can just remove the os-prober package, but that doesn't really scale as other packages are allowed to depend on it too.

Quoted 4 lines
Quoted 1 line

Perhaps we could have a configuration option for this? Patch attached.

Fine with me (but I'd like to hear from somebody who actually runs Debian or Ubuntu).

I run Ubuntu... I can't say I've yet wanted to do anything that needed this patch, but it seems like the right idea to me... or,

er, hmm, Configure option versus runtime option? I don't know from my cursory inspection if there's an issue here, but you (Colin) would be able to describe how/whether that's relevant

-Isaac

#3 lore raw
Quoted 3 lines · Isaac Dupree

er, hmm, Configure option versus runtime option? I don't know from my cursory inspection if there's an issue here, but you (Colin) would be able to describe how/whether that's relevant

I think the configurations options is the only way to go, as grub-mkimage can be rerun by the OS scripts when the kernel is updated. We already have similar "disable" options, such as GRUB_DISABLE_LINUX_RECOVERY.

Signature · 2 lines
Regards,
Pavel Roskin
#4 lore raw
In reply to Colin Watson
Quoted 10 lines · Colin Watson

Hi,

Some people seem to want to disable os-prober for various reasons (e.g. they have lots of test installations lying around that they don't normally want to get in the way, or they don't want installations on external drives to be included permanently in the boot menu, etc.). Now, they can just remove the os-prober package, but that doesn't really scale as other packages are allowed to depend on it too.

Perhaps we could have a configuration option for this? Patch attached.

Hi,

I'm unfamiliar with os-prober. What other purposes are there for installing it? grub-mkconfig is the only one I can think of, so the situation you describe sounds very unlikely. Could you ellaborate?

I'm concerned about the number of options in grub-mkconfig in general. It has a tendency to grow a lot, and unfortunately they're not documented.

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
#5 lore raw
Quoted 8 lines · Robert Millan
Quoted 7 lines · Colin Watson

Some people seem to want to disable os-prober for various reasons (e.g. they have lots of test installations lying around that they don't normally want to get in the way, or they don't want installations on external drives to be included permanently in the boot menu, etc.). Now, they can just remove the os-prober package, but that doesn't really scale as other packages are allowed to depend on it too.

Quoted 7 lines
Quoted 1 line

Perhaps we could have a configuration option for this? Patch attached.

Hi,

I'm unfamiliar with os-prober. What other purposes are there for installing it? grub-mkconfig is the only one I can think of, so the situation you describe sounds very unlikely. Could you ellaborate?

Well, I happen to know that our graphical installer depends on it :-), and sometimes people install it for testing purposes (or it accidentally remains installed). More generally though I'm not a fan of "remove this package" as a configuration mechanism.

Quoted 2 lines

I'm concerned about the number of options in grub-mkconfig in general. It has a tendency to grow a lot, and unfortunately they're not documented.

Maybe that's amenable to being addressed in itself - perhaps a manual page? (info is fine for complete manuals for large systems but not really great for quick-reference kind of things.)

Signature · 1 line
Colin Watson                                       [[email protected]]
#6 lore raw
Quoted 13 lines · Colin Watson
Quoted 12 lines · Robert Millan
Quoted 8 lines · Colin Watson

Some people seem to want to disable os-prober for various reasons (e.g. they have lots of test installations lying around that they don't normally want to get in the way, or they don't want installations on external drives to be included permanently in the boot menu, etc.). Now, they can just remove the os-prober package, but that doesn't really scale as other packages are allowed to depend on it too.

Perhaps we could have a configuration option for this? Patch attached.

Hi,

Quoted 8 lines
Quoted 3 lines

I'm unfamiliar with os-prober. What other purposes are there for installing it? grub-mkconfig is the only one I can think of, so the situation you describe sounds very unlikely. Could you ellaborate?

Well, I happen to know that our graphical installer depends on it :-), and sometimes people install it for testing purposes (or it accidentally remains installed). More generally though I'm not a fan of "remove this package" as a configuration mechanism.

Ok then.

Quoted 6 lines
Quoted 2 lines

I'm concerned about the number of options in grub-mkconfig in general. It has a tendency to grow a lot, and unfortunately they're not documented.

Maybe that's amenable to being addressed in itself - perhaps a manual page? (info is fine for complete manuals for large systems but not really great for quick-reference kind of things.)

We generate manpages dynamically using help2man. Improving --help output would improve the manpage, and it'd be nice to have all of this documented.

But this is just my "wish of the day". It shouldn't be a stopper for adding this option if you need it.

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
#7 lore raw
In reply to Colin Watson

Looks like this one was forgotten. I've committed it.

Btw, in the future please include ChangeLog entries when submitting patches.

Quoted 36 lines · Colin Watson

Hi,

Some people seem to want to disable os-prober for various reasons (e.g. they have lots of test installations lying around that they don't normally want to get in the way, or they don't want installations on external drives to be included permanently in the boot menu, etc.). Now, they can just remove the os-prober package, but that doesn't really scale as other packages are allowed to depend on it too.

Perhaps we could have a configuration option for this? Patch attached.

Thanks,

Signature · 4 lines
Colin Watson                                       [[email protected]]

Index: util/grub.d/30_os-prober.in
===================================================================
grub.d/30_os-prober.in +4 -0
@@ -22,6 +22,10 @@
 
 . ${libdir}/grub/grub-mkconfig_lib
 
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
+  exit 0
+fi
+
 if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
   # missing os-prober and/or linux-boot-prober
   exit 0

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
#8 lore raw

Am Sonntag, den 23.08.2009, 14:59 +0200 schrieb Robert Millan:

Quoted 29 lines

Looks like this one was forgotten. I've committed it.

Btw, in the future please include ChangeLog entries when submitting patches.

Quoted 24 lines · Colin Watson

Hi,

Some people seem to want to disable os-prober for various reasons (e.g. they have lots of test installations lying around that they don't normally want to get in the way, or they don't want installations on external drives to be included permanently in the boot menu, etc.). Now, they can just remove the os-prober package, but that doesn't really scale as other packages are allowed to depend on it too.

Perhaps we could have a configuration option for this? Patch attached.

Thanks,

Signature · 4 lines
Colin Watson                                       [[email protected]]

Index: util/grub.d/30_os-prober.in
===================================================================
grub.d/30_os-prober.in +0 -0
@@ -22,6 +22,10 @@
 
 . ${libdir}/grub/grub-mkconfig_lib
 
Quoted 8 lines

grub.d/30_os-prober.in line 31

Quoted 7 lines
grub.d/30_os-prober.in +4 -0
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
+  exit 0
+fi
+
 if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
   # missing os-prober and/or linux-boot-prober
   exit 0

Oh just noticed this now.
Doestn't grub-mkconfig need to export it so it's actually usable in /etc/default/grub?

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer
#9 lore raw
Quoted 2 lines · Felix Zielcke

Doestn't grub-mkconfig need to export it so it's actually usable in /etc/default/grub?

Yes, that seems likely. Sorry about that.

2009-08-23 Colin Watson <[email protected]>

* util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.

grub-mkconfig.in +2 -1
Index: util/grub-mkconfig.in
===================================================================
@@ -205,7 +205,8 @@
   GRUB_SERIAL_COMMAND \
   GRUB_DISABLE_LINUX_UUID \
   GRUB_DISABLE_LINUX_RECOVERY \
-  GRUB_GFXMODE
+  GRUB_GFXMODE \
+  GRUB_DISABLE_OS_PROBER
 
 if test "x${grub_cfg}" != "x"; then
   rm -f ${grub_cfg}.new
Signature · 1 line
Colin Watson                                       [[email protected]]
#10 lore raw

Am Sonntag, den 23.08.2009, 15:31 +0100 schrieb Colin Watson:

Quoted 6 lines · Felix Zielcke
Quoted 2 lines

Doestn't grub-mkconfig need to export it so it's actually usable in /etc/default/grub?

Yes, that seems likely. Sorry about that.

Commited.

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer