mirror of
https://gitlab.com/prism7/archery.git
synced 2026-04-28 01:17:35 +02:00
Change: 'Grub' bootloader's default install location is now the uEFI's 'Fallback Boot Path', to avoid/prevent known issues caused when dual-booting with Windows etc.
Change: Uefi bitness & name of the EFI binaries at 'Fallback Boot Path' (used for removable drives) is not hardcoded anymore and now set by variables.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Amelia Installer
|
# Amelia Installer
|
||||||
# Source: https://gitlab.com/prism7/archery
|
# Source: https://gitlab.com/prism7/archery
|
||||||
# Version: 9.9.3
|
# Version: 9.9.4
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
@@ -456,9 +456,11 @@ ${magenta}###${nc}---------------------------------${magenta}[ ${bwhite}UEFI Mod
|
|||||||
"
|
"
|
||||||
if [[ "${bitness}" == "64" ]]; then
|
if [[ "${bitness}" == "64" ]]; then
|
||||||
uefimode="x86_64-efi"
|
uefimode="x86_64-efi"
|
||||||
|
efiname="BOOTX64"
|
||||||
ok
|
ok
|
||||||
elif [[ "${bitness}" == "32" ]]; then
|
elif [[ "${bitness}" == "32" ]]; then
|
||||||
uefimode="i386-efi"
|
uefimode="i386-efi"
|
||||||
|
efiname="BOOTIA32"
|
||||||
ok
|
ok
|
||||||
else
|
else
|
||||||
RED "
|
RED "
|
||||||
@@ -6560,8 +6562,8 @@ GRUB
|
|||||||
local stage_prompt="Grub Installation"
|
local stage_prompt="Grub Installation"
|
||||||
if [[ "${sb_sign}" == "y" ]]; then
|
if [[ "${sb_sign}" == "y" ]]; then
|
||||||
if arch-chroot /mnt <<-SBGRUBINST > "${void}" 2>&1 2> "${log}" ; then
|
if arch-chroot /mnt <<-SBGRUBINST > "${void}" 2>&1 2> "${log}" ; then
|
||||||
grub-install --target=${uefimode} --efi-directory=${btldr_esp_mount} --bootloader-id=GRUB --modules="tpm" --disable-shim-lock --recheck || exit
|
grub-install --target=${uefimode} --efi-directory=${btldr_esp_mount} --bootloader-id=GRUB --removable --modules="tpm" --disable-shim-lock --recheck || exit
|
||||||
sed -i 's/SecureBoot/SecureB00t/' ${btldr_esp_mount}/EFI/GRUB/grubx64.efi || exit
|
sed -i 's/SecureBoot/SecureB00t/' ${btldr_esp_mount}/EFI/BOOT/"${efiname}".EFI || exit
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg || exit
|
grub-mkconfig -o /boot/grub/grub.cfg || exit
|
||||||
SBGRUBINST
|
SBGRUBINST
|
||||||
stage_ok
|
stage_ok
|
||||||
@@ -7100,10 +7102,10 @@ secboot_sign() {
|
|||||||
sbctl create-keys || exit
|
sbctl create-keys || exit
|
||||||
sbctl enroll-keys -m || exit
|
sbctl enroll-keys -m || exit
|
||||||
sbctl sign -s /boot/vmlinuz-${kernel} || exit
|
sbctl sign -s /boot/vmlinuz-${kernel} || exit
|
||||||
sbctl sign -s ${btldr_esp_mount}/EFI/BOOT/BOOTX64.EFI || exit
|
sbctl sign -s ${btldr_esp_mount}/EFI/BOOT/"${efiname}".EFI || exit
|
||||||
sbctl sign -s ${btldr_esp_mount}/EFI/Linux/arch-${kernel}.efi || exit
|
sbctl sign -s ${btldr_esp_mount}/EFI/Linux/arch-${kernel}.efi || exit
|
||||||
sbctl sign -s ${btldr_esp_mount}/EFI/systemd/systemd-bootx64.efi || exit
|
sbctl sign -s ${btldr_esp_mount}/EFI/systemd/systemd-bootx"${bitness}".efi || exit
|
||||||
sbctl sign -s -o /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed /usr/lib/systemd/boot/efi/systemd-bootx64.efi || exit
|
sbctl sign -s -o /usr/lib/systemd/boot/efi/systemd-bootx"${bitness}".efi.signed /usr/lib/systemd/boot/efi/systemd-bootx"${bitness}".efi || exit
|
||||||
SECSIGN
|
SECSIGN
|
||||||
stage_ok
|
stage_ok
|
||||||
else
|
else
|
||||||
@@ -7111,9 +7113,9 @@ SECSIGN
|
|||||||
fi
|
fi
|
||||||
if [[ "${setrescue}" == "y" ]]; then
|
if [[ "${setrescue}" == "y" ]]; then
|
||||||
local stage_prompt="Rescue Entry Secure-Boot Signing"
|
local stage_prompt="Rescue Entry Secure-Boot Signing"
|
||||||
if arch-chroot /mnt <<-SECSIGN > "${void}" 2>&1 2> "${log}" ; then
|
if arch-chroot /mnt <<-RESCSECSIGN > "${void}" 2>&1 2> "${log}" ; then
|
||||||
sbctl sign -s ${btldr_esp_mount}/EFI/Linux/rescue.efi || exit
|
sbctl sign -s ${btldr_esp_mount}/EFI/Linux/rescue.efi || exit
|
||||||
SECSIGN
|
RESCSECSIGN
|
||||||
stage_ok
|
stage_ok
|
||||||
else
|
else
|
||||||
stage_fail
|
stage_fail
|
||||||
@@ -7125,7 +7127,7 @@ SECSIGN
|
|||||||
sbctl create-keys || exit
|
sbctl create-keys || exit
|
||||||
sbctl enroll-keys -m || exit
|
sbctl enroll-keys -m || exit
|
||||||
sbctl sign -s /boot/vmlinuz-${kernel} || exit
|
sbctl sign -s /boot/vmlinuz-${kernel} || exit
|
||||||
sbctl sign -s ${btldr_esp_mount}/EFI/GRUB/grubx64.efi || exit
|
sbctl sign -s ${btldr_esp_mount}/EFI/BOOT/"${efiname}".EFI || exit
|
||||||
SECSIGN
|
SECSIGN
|
||||||
stage_ok
|
stage_ok
|
||||||
else
|
else
|
||||||
@@ -7452,7 +7454,7 @@ CUSTOMSERV
|
|||||||
log="Amelia_log.txt"
|
log="Amelia_log.txt"
|
||||||
disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)"
|
disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)"
|
||||||
trg=""
|
trg=""
|
||||||
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" homecrypt="" greeter="" greeternmbr="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" zram_bootopts="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" genoptm="" set_optm="" ask_param="" desk_setup="" set_optm_slct="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="")
|
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" homecrypt="" greeter="" greeternmbr="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" zram_bootopts="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" genoptm="" set_optm="" ask_param="" desk_setup="" set_optm_slct="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" efiname="")
|
||||||
export "${vars[@]}"
|
export "${vars[@]}"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
CYANBG "************************************************************************************************* "
|
CYANBG "************************************************************************************************* "
|
||||||
|
|||||||
Reference in New Issue
Block a user