V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 52s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 52s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -421,8 +421,6 @@ grub:
|
||||
# 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 OS
|
||||
# temporarily unbootable. GRUB can be manually configured later to boot it if necessary.
|
||||
latest: true # Install the latest GRUB2 backported package for encrypted '/boot' support.
|
||||
# MUST be "true" in the case of 'LUKS2' and / or 'dm-integrity' encrypted '/boot'
|
||||
only_debian: 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.
|
||||
other-os: true # This one makes grub-installer install to the UEFI partition '/boot' record if it also finds
|
||||
|
||||
@@ -51,42 +51,6 @@ generate_subnetmask() {
|
||||
return 0
|
||||
}
|
||||
|
||||
#######################################
|
||||
# Collect NIC driver modules for initramfs installation.
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# 0: on success
|
||||
#######################################
|
||||
#grep_nic_driver_modules() {
|
||||
# ### Collect all ethernet driver names and sort them uniquely.
|
||||
# declare -a _mods
|
||||
# declare var_nic_module var_nic_modules
|
||||
# # shellcheck disable=SC2312
|
||||
# readarray -t _mods < <(
|
||||
# lspci -k \
|
||||
# | grep -A2 -i ethernet \
|
||||
# | grep 'Kernel driver in use' \
|
||||
# | awk '{print $5}' \
|
||||
# | sort -u
|
||||
# )#
|
||||
#
|
||||
# ### If only one entry remains, save it in 'var_nic_module', otherwise save all modules in 'var_nic_modules'.
|
||||
# if [[ "${#_mods[@]}" -eq 1 ]]; then
|
||||
# var_nic_module="${_mods[0]}"
|
||||
# else
|
||||
# var_nic_modules="${_mods[*]}"
|
||||
# fi
|
||||
#
|
||||
# if [[ -n "${var_nic_module}" ]]; then
|
||||
# echo "${var_nic_module}"
|
||||
# else
|
||||
# echo "${var_nic_modules}"
|
||||
# fi
|
||||
#
|
||||
# return 0
|
||||
#}
|
||||
|
||||
#######################################
|
||||
# Collect NIC driver modules for initramfs installation (no lspci required).
|
||||
# Uses '/sys' introspection to stay independent of pciutils/ethtool.
|
||||
|
||||
@@ -58,7 +58,6 @@ installation_grub() {
|
||||
get_grub_modinfo_path
|
||||
|
||||
ensure_lowercase "grub_skip"
|
||||
ensure_lowercase "grub_latest"
|
||||
ensure_lowercase "grub_background_enable"
|
||||
ensure_lowercase "grub_prober"
|
||||
ensure_lowercase "grub_update_nvram"
|
||||
@@ -68,62 +67,40 @@ installation_grub() {
|
||||
|
||||
if [[ "${grub_skip}" != "true" ]]; then
|
||||
|
||||
### Install GRUB2 package
|
||||
if [[ "${grub_latest}" == "true" ]]; then
|
||||
### Install the GRUB2 backported version from the Bookworm backports repository.
|
||||
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then
|
||||
|
||||
### Install the GRUB2 backported version from the Bookworm backports repository.
|
||||
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then
|
||||
case "${VAR_ARCHITECTURE}" in
|
||||
|
||||
case "${VAR_ARCHITECTURE}" in
|
||||
amd64)
|
||||
do_in_target_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends grub2-common grub-efi-amd64 grub-efi-amd64-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
"
|
||||
;;
|
||||
|
||||
amd64)
|
||||
do_in_target_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends -t bookworm-backports grub2-common grub-efi-amd64 grub-efi-amd64-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
"
|
||||
;;
|
||||
arm64)
|
||||
do_in_target_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends grub2-common grub-efi-arm64 grub-efi-arm64-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
"
|
||||
;;
|
||||
|
||||
arm64)
|
||||
do_in_target_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends -t bookworm-backports grub2-common grub-efi-arm64 grub-efi-arm64-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
"
|
||||
;;
|
||||
*)
|
||||
do_log "emergency" "file_only" "4230() Unsupported architecture: ${VAR_ARCHITECTURE}"; return "${ERR_GRUB_ARCHITECTURE}"
|
||||
;;
|
||||
|
||||
*)
|
||||
do_log "emergency" "file_only" "4230() Unsupported architecture: ${VAR_ARCHITECTURE}"; return "${ERR_GRUB_ARCHITECTURE}"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
do_in_target_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends -t bookworm-backports grub2-common grub-pc grub-pc-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
"
|
||||
|
||||
fi
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
### Install the GRUB2 stable version.
|
||||
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then
|
||||
|
||||
case "${VAR_ARCHITECTURE}" in
|
||||
amd64) do_in_target "${TARGET}" export INITRD=No; apt-get install -y --no-install-recommends grub2-common grub-efi-amd64 grub-efi-amd64-bin ;;
|
||||
arm64) do_in_target "${TARGET}" export INITRD=No; apt-get install -y --no-install-recommends grub2-common grub-efi-arm64 grub-efi-arm64-bin ;;
|
||||
*) do_log "emergency" "file_only" "4230() Unsupported architecture: ${VAR_ARCHITECTURE}"; return "${ERR_GRUB_ARCHITECTURE}" ;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
do_in_target "${TARGET}" export INITRD=No; apt-get install -y --no-install-recommends grub2 grub2-common grub-pc grub-pc-bin
|
||||
|
||||
fi
|
||||
do_in_target_script "${TARGET}" "
|
||||
export INITRD=No
|
||||
apt-get install -y --no-install-recommends grub2-common grub-pc grub-pc-bin 2>&1 | tee -a ${var_logfile}
|
||||
echo ExitCode: \$? >> ${var_logfile}
|
||||
"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user