# SPDX-Version: 3.0
# SPDX-CreationInfo: 2025-05-05; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
# SPDX-FileCopyrightText: 2024-2025; WEIDNER, Marc S.; <msw@coresecret.dev>
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
# SPDX-PackageName: CISS.debian.live.builder
# SPDX-Security-Contact: security@coresecret.eu

###########################################################################################
# GRUB2 settings                                                                          #
###########################################################################################
# Due notably to potential USB sticks, the location of the primary drive can not be
# determined safely in general, so this needs to be specified:
d-i grub-installer/bootdev string /dev/sda
# To install to the primary device (assuming it is not a USB stick):
# d-i grub-installer/bootdev  string default

# Set this to false to install GRUB Legacy rather than GRUB 2, if possible:
d-i grub-installer/grub2_instead_of_grub_legacy boolean true

# This is fairly safe to set, it makes grub install automatically to the UEFI partition/boot
# record if no other operating system is detected on the machine:
d-i grub-installer/only_debian boolean true

# This one makes grub-installer install to the UEFI partition/boot record, if it also finds
# some other OS, which is less safe as it might not be able to boot that other OS:
d-i grub-installer/with_other_os boolean true

# OS-prober did not detect any other operating systems on your computer at this time, but you
# may still wish to enable it in case you install more in the future:
d-i grub-installer/enable_os_prober_otheros_no boolean true

# Skip installing grub:
d-i grub-installer/skip boolean false

# Force GRUB installation to the EFI removable media path?
#  .
#  It seems that this computer is configured to boot via EFI, but maybe that configuration will
#  not work for booting from the hard drive. Some EFI firmware implementations do not meet the
#  EFI specification (i.e. they are buggy!) and do not support proper configuration of boot
#  options from system hard drives.
#  .
#  A workaround for this problem is to install an extra copy of the EFI version of the GRUB
#  boot loader to a fallback location, the "removable media path". Almost all EFI systems, no
#  matter how buggy, will boot GRUB that way.
#  .
#  Warning: If the installer failed to detect another operating system that is present on your
#  computer that also depends on this fallback, installing GRUB there will make that operating
#  system temporarily unbootable. GRUB can be manually configured later to boot it if necessary.
d-i grub-installer/force-efi-extra-removable boolean false

# Description: Update NVRAM variables to automatically boot into Debian?
#  .
#  GRUB can configure your platform's NVRAM variables so that it boots into Debian automatically
#  when powered on. However, you may prefer to disable this behavior and avoid changes to your
#  boot configuration. For example, if your NVRAM variables have been set up such that your
#  system contacts a PXE server on every boot, this would preserve that behavior.
d-i grub-installer/update-nvram boolean true
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh