|
|
|
@@ -61,15 +61,40 @@ update_grub() {
|
|
|
|
|
if [[ "${VAR_RECIPE_FIRMWARE}" == "uefi" ]]; then
|
|
|
|
|
|
|
|
|
|
case "${VAR_ARCHITECTURE,,}" in
|
|
|
|
|
amd64) do_in_target "${TARGET}" apt-get install -y --no-install-recommends -t bookworm-backports grub2 grub2-common grub-efi-amd64 ;;
|
|
|
|
|
arm64) do_in_target "${TARGET}" apt-get install -y --no-install-recommends -t bookworm-backports grub2 grub2-common grub-efi-arm64 ;;
|
|
|
|
|
i386) do_in_target "${TARGET}" apt-get install -y --no-install-recommends -t bookworm-backports grub2 grub2-common grub-efi-ia32 ;;
|
|
|
|
|
*) do_log "emergency" "file_only" "4230() Unsupported UEFI architecture: ${VAR_ARCHITECTURE}"; return "${ERR_GRUB_ARCHITECTURE}" ;;
|
|
|
|
|
|
|
|
|
|
amd64)
|
|
|
|
|
do_in_target_script "${TARGET}" "
|
|
|
|
|
apt-get install -y --no-install-recommends -t bookworm-backports grub2 grub2-common grub-efi-amd64 2>&1 | tee -a ${var_logfile}
|
|
|
|
|
echo ExitCode: \$? >> ${var_logfile}
|
|
|
|
|
"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
arm64)
|
|
|
|
|
do_in_target_script "${TARGET}" "
|
|
|
|
|
apt-get install -y --no-install-recommends -t bookworm-backports grub2 grub2-common grub-efi-arm64 2>&1 | tee -a ${var_logfile}
|
|
|
|
|
echo ExitCode: \$? >> ${var_logfile}
|
|
|
|
|
"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
i386)
|
|
|
|
|
do_in_target_script "${TARGET}" "
|
|
|
|
|
apt-get install -y --no-install-recommends -t bookworm-backports grub2 grub2-common grub-efi-ia32 2>&1 | tee -a ${var_logfile}
|
|
|
|
|
echo ExitCode: \$? >> ${var_logfile}
|
|
|
|
|
"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*)
|
|
|
|
|
do_log "emergency" "file_only" "4230() Unsupported UEFI architecture: ${VAR_ARCHITECTURE}"; return "${ERR_GRUB_ARCHITECTURE}"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
do_in_target "${TARGET}" apt-get install -y --no-install-recommends -t bookworm-backports grub2 grub2-common grub-pc
|
|
|
|
|
do_in_target_script "${TARGET}" "
|
|
|
|
|
apt-get install -y --no-install-recommends -t bookworm-backports grub2 grub2-common grub-pc 2>&1 | tee -a ${var_logfile}
|
|
|
|
|
echo ExitCode: \$? >> ${var_logfile}
|
|
|
|
|
"
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@@ -213,7 +238,7 @@ install_grub_bios() {
|
|
|
|
|
### Debug modules.
|
|
|
|
|
var_bios_mod+="cat echo hexdump ls test terminfo"
|
|
|
|
|
|
|
|
|
|
ary_bios_arg+=( --target=i386-pc --boot-directory=/boot "--modules=${var_bios_mod}" )
|
|
|
|
|
ary_bios_arg+=( --target=i386-pc --boot-directory=/boot "--modules=\"${var_bios_mod}\"" )
|
|
|
|
|
|
|
|
|
|
do_in_target "${TARGET}" grub-install "${ary_bios_arg[@]}" "${grub_bootdev}" || return "${ERR_GRUB_INSTALL}"
|
|
|
|
|
do_log "info" "file_only" "4230() Installed: GRUB on Device: '${grub_bootdev}' [BIOS]."
|
|
|
|
@@ -239,20 +264,20 @@ install_grub_bios() {
|
|
|
|
|
install_grub_uefi() {
|
|
|
|
|
### Declare Arrays, HashMaps, and Variables.
|
|
|
|
|
declare -a ary_uefi_arg=()
|
|
|
|
|
declare var_uefi_mod=""
|
|
|
|
|
declare var_uefi_mod=" "
|
|
|
|
|
|
|
|
|
|
### Cryptographic modules.
|
|
|
|
|
var_uefi_mod+="cryptodisk gcry_rijndael gcry_sha256 gcry_sha512 gcry_whirlpool gcry_serpent gcry_twofish luks luks2"
|
|
|
|
|
var_uefi_mod+="cryptodisk gcry_rijndael gcry_sha256 gcry_sha512 gcry_whirlpool gcry_serpent gcry_twofish luks luks2 "
|
|
|
|
|
### Filesystem modules.
|
|
|
|
|
var_uefi_mod+="btrfs ext2"
|
|
|
|
|
var_uefi_mod+="btrfs ext2 "
|
|
|
|
|
### Partitioning / Device / GPT
|
|
|
|
|
var_uefi_mod+="mdraid1x part_gpt"
|
|
|
|
|
var_uefi_mod+="mdraid1x part_gpt "
|
|
|
|
|
### Device / Terminal modules.
|
|
|
|
|
var_uefi_mod+="boot linux efi_gop efi_uga gfxterm gfxterm_background gfxterm_menu normal search search_fs_uuid search_label"
|
|
|
|
|
var_uefi_mod+="boot linux efi_gop efi_uga gfxterm gfxterm_background gfxterm_menu normal search search_fs_uuid search_label "
|
|
|
|
|
### Debug modules.
|
|
|
|
|
var_uefi_mod+="cat echo hexdump ls test terminfo"
|
|
|
|
|
|
|
|
|
|
ary_uefi_arg+=( --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id=debian "--modules=${var_uefi_mod}" )
|
|
|
|
|
ary_uefi_arg+=( --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id=debian "--modules=\"${var_uefi_mod}\"" )
|
|
|
|
|
|
|
|
|
|
[[ "${grub_update_nvram,,}" == "false" ]] && ary_uefi_arg+=( --no-nvram )
|
|
|
|
|
|
|
|
|
|