mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 15:35:20 +00:00
Optionally re-enable os-prober
Add debconf logic for GRUB_DISABLE_OS_PROBER to make it easier to control things here. Particularly useful for the installer. Closes: #1031594, #1012865.
This commit is contained in:
parent
53aecee25b
commit
d73cec07b9
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -2,6 +2,9 @@ grub2 (2.06-9) UNRELEASED; urgency=medium
|
|||||||
|
|
||||||
[ Steve McIntyre ]
|
[ Steve McIntyre ]
|
||||||
* postinst: make config_item() more robust
|
* 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 ]
|
[ Ben Hutchings ]
|
||||||
* Fix probing of LUKS2 devices (Closes: #1028301):
|
* Fix probing of LUKS2 devices (Closes: #1028301):
|
||||||
|
5
debian/config.in
vendored
5
debian/config.in
vendored
@ -58,6 +58,10 @@ fi
|
|||||||
if [ "${GRUB_CMDLINE_LINUX_DEFAULT+set}" = set ]; then
|
if [ "${GRUB_CMDLINE_LINUX_DEFAULT+set}" = set ]; then
|
||||||
db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"
|
db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"
|
||||||
fi
|
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
|
case @PACKAGE@ in
|
||||||
grub-pc)
|
grub-pc)
|
||||||
@ -74,6 +78,7 @@ esac
|
|||||||
|
|
||||||
db_input ${priority} grub2/linux_cmdline || true
|
db_input ${priority} grub2/linux_cmdline || true
|
||||||
db_input medium grub2/linux_cmdline_default || true
|
db_input medium grub2/linux_cmdline_default || true
|
||||||
|
db_input low grub2/enable_os_prober || true
|
||||||
case @PACKAGE@ in
|
case @PACKAGE@ in
|
||||||
grub-*efi*)
|
grub-*efi*)
|
||||||
db_input low grub2/force_efi_extra_removable || true
|
db_input low grub2/force_efi_extra_removable || true
|
||||||
|
9
debian/default/grub
vendored
9
debian/default/grub
vendored
@ -9,9 +9,12 @@ GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
|
|||||||
GRUB_CMDLINE_LINUX_DEFAULT="@DEFAULT_CMDLINE@"
|
GRUB_CMDLINE_LINUX_DEFAULT="@DEFAULT_CMDLINE@"
|
||||||
GRUB_CMDLINE_LINUX=""
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
|
||||||
# Uncomment this to run os-prober to search for and add other OS
|
# If your computer has multiple operating systems installed, then you
|
||||||
# installations to the grub boot menu
|
# probably want to run os-prober. However, if your computer is a host
|
||||||
#GRUB_DISABLE_OS_PROBER=false
|
# 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
|
# Uncomment to enable BadRAM filtering, modify to suit your needs
|
||||||
# This works with Linux (no patch required) and with any kernel that obtains
|
# This works with Linux (no patch required) and with any kernel that obtains
|
||||||
|
13
debian/postinst.in
vendored
13
debian/postinst.in
vendored
@ -395,6 +395,19 @@ case "$1" in
|
|||||||
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 grub2/linux_cmdline
|
||||||
apply_conf_tweaks "$conf_files" merge_debconf_into_conf GRUB_CMDLINE_LINUX_DEFAULT grub2/linux_cmdline_default
|
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
|
case @PACKAGE@ in
|
||||||
grub-pc)
|
grub-pc)
|
||||||
apply_conf_tweaks "$conf_files" merge_debconf_into_conf GRUB_TIMEOUT grub-pc/timeout
|
apply_conf_tweaks "$conf_files" merge_debconf_into_conf GRUB_TIMEOUT grub-pc/timeout
|
||||||
|
14
debian/templates.in
vendored
14
debian/templates.in
vendored
@ -34,6 +34,20 @@ _Description: Update NVRAM variables to automatically boot into Debian?
|
|||||||
if your NVRAM variables have been set up such that your system contacts a
|
if your NVRAM variables have been set up such that your system contacts a
|
||||||
PXE server on every boot, this would preserve that behavior.
|
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
|
# still unused
|
||||||
Template: grub2/kfreebsd_cmdline
|
Template: grub2/kfreebsd_cmdline
|
||||||
Type: string
|
Type: string
|
||||||
|
Loading…
Reference in New Issue
Block a user