[ Steve McIntyre ]
* postinst: make config_item() more robust
+ * Add debconf logic for GRUB_DISABLE_OS_PROBER to make it easier to
+ control things here. Particularly useful for the installer.
+ Closes: #1031594, #1012865.
[ Ben Hutchings ]
* Fix probing of LUKS2 devices (Closes: #1028301):
if [ "${GRUB_CMDLINE_LINUX_DEFAULT+set}" = set ]; then
db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"
fi
+# Watch for the inverted logic here...
+if [ "${GRUB_DISABLE_OS_PROBER+set}" = set ]; then
+ db_set grub2/enable_os_prober "false"
+fi
case @PACKAGE@ in
grub-pc)
db_input ${priority} grub2/linux_cmdline || true
db_input medium grub2/linux_cmdline_default || true
+db_input low grub2/enable_os_prober || true
case @PACKAGE@ in
grub-*efi*)
db_input low grub2/force_efi_extra_removable || true
GRUB_CMDLINE_LINUX_DEFAULT="@DEFAULT_CMDLINE@"
GRUB_CMDLINE_LINUX=""
-# Uncomment this to run os-prober to search for and add other OS
-# installations to the grub boot menu
-#GRUB_DISABLE_OS_PROBER=false
+# If your computer has multiple operating systems installed, then you
+# probably want to run os-prober. However, if your computer is a host
+# for guest OSes installed via LVM or raw disk devices, running
+# os-prober can cause damage to those guest OSes as it mounts
+# filesystems to look for things.
+GRUB_DISABLE_OS_PROBER=true
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
apply_conf_tweaks "$conf_files" merge_debconf_into_conf GRUB_CMDLINE_LINUX grub2/linux_cmdline
apply_conf_tweaks "$conf_files" merge_debconf_into_conf GRUB_CMDLINE_LINUX_DEFAULT grub2/linux_cmdline_default
+ # Horrible stuff here, as the os-prober option is a negative
+ # setting (GRUB_DISABLE_OS_PROBER). To not confuse people with
+ # double negative questions in templates, invert it here.
+ db_get grub2/enable_os_prober
+ if [ "$RET" = false ]; then
+ # enable == false -> put in place the commented-out default
+ # #GRUB_DISABLE_OS_PROBER=false that we ship with
+ apply_conf_tweaks "$conf_files" sed_conf 's/^.*GRUB_DISABLE_OS_PROBER.*$/#GRUB_DISABLE_OS_PROBER=false/'
+ else
+ # enable == true -> put in place a valid GRUB_DISABLE_OS_PROBER=false
+ apply_conf_tweaks "$conf_files" sed_conf 's/^.*GRUB_DISABLE_OS_PROBER.*$/GRUB_DISABLE_OS_PROBER=false/'
+ fi
+
case @PACKAGE@ in
grub-pc)
apply_conf_tweaks "$conf_files" merge_debconf_into_conf GRUB_TIMEOUT grub-pc/timeout
if your NVRAM variables have been set up such that your system contacts a
PXE server on every boot, this would preserve that behavior.
+Template: grub2/enable_os_prober
+Type: boolean
+Default: false
+_Description: Run os-prober automatically to detect and boot other OSes?
+ GRUB can use the os-prober tool to attempt to detect other
+ operating systems on your computer and add them to its list of boot
+ options automatically.
+ .
+ If your computer has multiple operating systems installed, then this
+ is probably what you want. However, if your computer is a host for
+ guest OSes installed via LVM or raw disk devices, running os-prober
+ can cause damage to those guest OSes as it mounts filesystems to look
+ for things.
+
# still unused
Template: grub2/kfreebsd_cmdline
Type: string