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
|
# 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
|
# 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.
|
# 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'
|
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.
|
# 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
|
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
|
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).
|
# Collect NIC driver modules for initramfs installation (no lspci required).
|
||||||
# Uses '/sys' introspection to stay independent of pciutils/ethtool.
|
# Uses '/sys' introspection to stay independent of pciutils/ethtool.
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ installation_grub() {
|
|||||||
get_grub_modinfo_path
|
get_grub_modinfo_path
|
||||||
|
|
||||||
ensure_lowercase "grub_skip"
|
ensure_lowercase "grub_skip"
|
||||||
ensure_lowercase "grub_latest"
|
|
||||||
ensure_lowercase "grub_background_enable"
|
ensure_lowercase "grub_background_enable"
|
||||||
ensure_lowercase "grub_prober"
|
ensure_lowercase "grub_prober"
|
||||||
ensure_lowercase "grub_update_nvram"
|
ensure_lowercase "grub_update_nvram"
|
||||||
@@ -68,9 +67,6 @@ installation_grub() {
|
|||||||
|
|
||||||
if [[ "${grub_skip}" != "true" ]]; then
|
if [[ "${grub_skip}" != "true" ]]; then
|
||||||
|
|
||||||
### Install GRUB2 package
|
|
||||||
if [[ "${grub_latest}" == "true" ]]; then
|
|
||||||
|
|
||||||
### Install the GRUB2 backported version from the Bookworm backports repository.
|
### Install the GRUB2 backported version from the Bookworm backports repository.
|
||||||
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then
|
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then
|
||||||
|
|
||||||
@@ -79,7 +75,7 @@ installation_grub() {
|
|||||||
amd64)
|
amd64)
|
||||||
do_in_target_script "${TARGET}" "
|
do_in_target_script "${TARGET}" "
|
||||||
export INITRD=No
|
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}
|
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}
|
echo ExitCode: \$? >> ${var_logfile}
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
@@ -87,7 +83,7 @@ installation_grub() {
|
|||||||
arm64)
|
arm64)
|
||||||
do_in_target_script "${TARGET}" "
|
do_in_target_script "${TARGET}" "
|
||||||
export INITRD=No
|
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}
|
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}
|
echo ExitCode: \$? >> ${var_logfile}
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
@@ -102,31 +98,12 @@ installation_grub() {
|
|||||||
|
|
||||||
do_in_target_script "${TARGET}" "
|
do_in_target_script "${TARGET}" "
|
||||||
export INITRD=No
|
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}
|
apt-get install -y --no-install-recommends grub2-common grub-pc grub-pc-bin 2>&1 | tee -a ${var_logfile}
|
||||||
echo ExitCode: \$? >> ${var_logfile}
|
echo ExitCode: \$? >> ${var_logfile}
|
||||||
"
|
"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Enable booting from LUKS encrypted devices by default.
|
### Enable booting from LUKS encrypted devices by default.
|
||||||
cat << EOF >> "${TARGET}/etc/default/grub"
|
cat << EOF >> "${TARGET}/etc/default/grub"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user