From f8fd851fc0d18ae38500525577f6aad0f1b4ec87 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Wed, 26 Sep 2012 12:51:22 +0200 Subject: [PATCH] add big UEFI changes --- etc/archboot/allinone-lts.conf | 2 +- etc/archboot/allinone.conf | 2 +- etc/archboot/default-ftp-pxelinux.conf | 2 +- etc/archboot/default-ftp.conf | 2 +- etc/archboot/default-pxelinux.conf | 2 +- etc/archboot/default.conf | 2 +- usr/bin/archboot-allinone.sh | 37 ++--- usr/bin/archboot-update-iso.sh | 62 ++----- usr/lib/initcpio/install/arch_core_install | 2 +- usr/lib/initcpio/install/arch_efilinux | 15 ++ usr/lib/initcpio/install/arch_gummiboot | 15 ++ usr/lib/initcpio/install/arch_pacman_depends | 6 +- usr/lib/initcpio/install/arch_refind | 16 ++ usr/share/archboot/installer/setup | 166 ++++++++++--------- 14 files changed, 174 insertions(+), 157 deletions(-) create mode 100644 usr/lib/initcpio/install/arch_efilinux create mode 100644 usr/lib/initcpio/install/arch_gummiboot create mode 100644 usr/lib/initcpio/install/arch_refind diff --git a/etc/archboot/allinone-lts.conf b/etc/archboot/allinone-lts.conf index 2a3c9b095..f2f957b2c 100644 --- a/etc/archboot/allinone-lts.conf +++ b/etc/archboot/allinone-lts.conf @@ -13,7 +13,7 @@ arch_acpi arch_motd arch_memtest arch_intel_wireless \ arch_linux_firmware arch_hwdetect ide pata scsi sata memdisk arch_cdrom \ arch_pcspkr arch_net arch_isdn pcmcia arch_sound usb usbinput arch_fw arch_virtio dmraid \ arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote \ -arch_cpufreq arch_links arch_kexec arch_ppp arch_pppoe arch_xl2tpd arch_grub arch_efibootmgr \ +arch_cpufreq arch_links arch_kexec arch_ppp arch_pppoe arch_xl2tpd arch_grub arch_refind arch_gummiboot arch_efilinux arch_efibootmgr \ arch_lilo arch_syslinux arch_iptables arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient \ arch_smartmontools arch_licenses arch_wireless arch_wireless_staging_lts arch_linux_atm arch_netcfg arch_fsarchiver arch_addons \ arch_vim arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_weechat arch_nmap arch_tcpdump \ diff --git a/etc/archboot/allinone.conf b/etc/archboot/allinone.conf index e08acdcb8..d8e5585d1 100644 --- a/etc/archboot/allinone.conf +++ b/etc/archboot/allinone.conf @@ -13,7 +13,7 @@ arch_acpi arch_motd arch_memtest arch_linux_firmware arch_intel_wireless \ arch_hwdetect pata scsi sata memdisk arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia \ arch_sound usb usbinput arch_fw arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 \ arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd \ -arch_pppoe arch_lilo arch_grub arch_efibootmgr arch_syslinux arch_iptables arch_pciutils arch_usbutils \ +arch_pppoe arch_lilo arch_grub arch_refind arch_gummiboot arch_efilinux arch_efibootmgr arch_syslinux arch_iptables arch_pciutils arch_usbutils \ arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_wireless_staging \ arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_wipe arch_testdisk arch_ddrescue \ arch_chntpw arch_weechat arch_nmap arch_tcpdump arch_speedtouch arch_openconnect arch_dnsmasq arch_platform \ diff --git a/etc/archboot/default-ftp-pxelinux.conf b/etc/archboot/default-ftp-pxelinux.conf index 9176117e9..c7e1e68f9 100644 --- a/etc/archboot/default-ftp-pxelinux.conf +++ b/etc/archboot/default-ftp-pxelinux.conf @@ -14,7 +14,7 @@ arch_linux_firmware arch_intel_wireless arch_hwdetect pata scsi sata memdisk arc arch_pcspkr arch_net arch_isdn pcmcia arch_sound usb usbinput arch_fw \ arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs \ arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd arch_pppoe \ -arch_lilo arch_grub arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \ +arch_lilo arch_grub arch_refind arch_gummiboot arch_efilinux arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \ arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses \ arch_wireless arch_wireless_staging arch_linux_atm arch_netcfg arch_fsarchiver arch_addons \ arch_vim arch_platform arch_chntpw arch_mmc arch_pxelinux arch_dmidecode arch_wiki_lite \ diff --git a/etc/archboot/default-ftp.conf b/etc/archboot/default-ftp.conf index 5b0a2fc96..c1432497c 100644 --- a/etc/archboot/default-ftp.conf +++ b/etc/archboot/default-ftp.conf @@ -14,7 +14,7 @@ arch_linux_firmware arch_intel_wireless arch_hwdetect pata scsi sata memdisk arc arch_pcspkr arch_net arch_isdn pcmcia arch_sound usb usbinput arch_fw \ arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt \ btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd \ -arch_pppoe arch_lilo arch_grub arch_efibootmgr arch_syslinux arch_iptables \ +arch_pppoe arch_lilo arch_grub arch_refind arch_gummiboot arch_efilinux arch_efibootmgr arch_syslinux arch_iptables \ arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools \ arch_licenses arch_wireless arch_wireless_staging arch_linux_atm arch_netcfg arch_fsarchiver \ arch_addons arch_vim arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_mmc \ diff --git a/etc/archboot/default-pxelinux.conf b/etc/archboot/default-pxelinux.conf index 462ae3711..7e22d6faa 100644 --- a/etc/archboot/default-pxelinux.conf +++ b/etc/archboot/default-pxelinux.conf @@ -14,7 +14,7 @@ arch_linux_firmware arch_intel_wireless arch_hwdetect pata scsi sata memdisk \ arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_sound usb usbinput arch_fw \ arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs \ arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd arch_pppoe \ -arch_lilo arch_grub arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \ +arch_lilo arch_grub arch_refind arch_gummiboot arch_efilinux arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \ arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless \ arch_wireless_staging arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_pxelinux \ arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_platform arch_mmc arch_dmidecode \ diff --git a/etc/archboot/default.conf b/etc/archboot/default.conf index 40fc8f2e3..e7b7c890e 100644 --- a/etc/archboot/default.conf +++ b/etc/archboot/default.conf @@ -14,7 +14,7 @@ arch_linux_firmware arch_intel_wireless arch_hwdetect pata scsi sata memdisk arc arch_pcspkr arch_net arch_isdn pcmcia arch_sound usb usbinput arch_fw \ arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs \ arch_filesystems arch_remote arch_cpufreq arch_links arch_kexec arch_ppp arch_xl2tpd \ -arch_pppoe arch_lilo arch_grub arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \ +arch_pppoe arch_lilo arch_grub arch_refind arch_gummiboot arch_efilinux arch_efibootmgr arch_syslinux arch_iptables arch_pciutils \ arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless \ arch_wireless_staging arch_linux_atm arch_netcfg arch_fsarchiver arch_vim arch_addons arch_wipe \ arch_testdisk arch_ddrescue arch_chntpw arch_platform arch_mmc arch_dmidecide arch_wiki_lite \ diff --git a/usr/bin/archboot-allinone.sh b/usr/bin/archboot-allinone.sh index 70d6bc90b..761f56dff 100755 --- a/usr/bin/archboot-allinone.sh +++ b/usr/bin/archboot-allinone.sh @@ -218,20 +218,11 @@ _download_uefi_shell_tianocore() { } -_download_uefi_refind_bin_sourceforge() { - - mkdir -p "${ALLINONE}/packages/" - - ## Download latest rEFInd bin archive from sourceforge - curl --verbose -f -C - --ftp-pasv --retry 3 --retry-delay 3 -o "${ALLINONE}/packages/refind-bin.zip" -L "http://sourceforge.net/projects/refind/files/latest/download" - -} - _prepare_uefi_gummiboot_USB_files() { mkdir -p "${ALLINONE}/EFI/boot" - cp -f "/boot/efi/EFI/arch/gummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi" "${ALLINONE}/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" - cp -f "/boot/efi/EFI/arch/efilinux/efilinux${_SPEC_UEFI_ARCH}.efi" "${ALLINONE}/EFI/boot/efilinux${_SPEC_UEFI_ARCH}.efi" + cp -f "/usr/lib/gummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi" "${ALLINONE}/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" + cp -f "/usr/lib/efilinux/efilinux${_SPEC_UEFI_ARCH}.efi" "${ALLINONE}/EFI/boot/efilinux${_SPEC_UEFI_ARCH}.efi" mkdir -p "${ALLINONE}/loader/entries/" @@ -241,25 +232,25 @@ default archboot-${_UEFI_ARCH} EOF cat << EOF > "${ALLINONE}/loader/entries/archboot-${_UEFI_ARCH}.conf" -title Arch Linux (${_UEFI_ARCH}) archboot +title Arch Linux ${_UEFI_ARCH} archboot linux /boot/vmlinuz_${_UEFI_ARCH} initrd /boot/initramfs_${_UEFI_ARCH}.img options gpt loglevel=7 add_efi_memmap none=UEFI_ARCH_${_UEFI_ARCH} EOF cat << EOF > "${ALLINONE}/loader/entries/archboot-${_UEFI_ARCH}-lts.conf" -title Arch Linux LTS (${_UEFI_ARCH}) archboot +title Arch Linux LTS ${_UEFI_ARCH} archboot efi /EFI/boot/efilinux${_SPEC_UEFI_ARCH}.efi options -f \\boot\\vmlinuz_x86_64_lts gpt loglevel=7 add_efi_memmap none=UEFI_ARCH_${_UEFI_ARCH} initrd=\\boot\\initramfs_${_UEFI_ARCH}.img EOF cat << EOF > "${ALLINONE}/loader/entries/uefi-shell-${_UEFI_ARCH}-v2.conf" -title UEFI ${_UEFI_ARCH} Shell v2 - For Spec. Ver. >=2.3 systems +title UEFI ${_UEFI_ARCH} Shell v2 efi /EFI/tools/shell${_SPEC_UEFI_ARCH}_v2.efi EOF cat << EOF > "${ALLINONE}/loader/entries/uefi-shell-${_UEFI_ARCH}-v1.conf" -title UEFI ${_UEFI_ARCH} Shell v1 - For Spec. Ver. <2.3 systems +title UEFI ${_UEFI_ARCH} Shell v1 efi /EFI/tools/shell${_SPEC_UEFI_ARCH}_v1.efi EOF @@ -502,11 +493,9 @@ _prepare_kernel_initramfs_files _download_uefi_shell_tianocore -# _download_uefi_refind_bin_sourceforge - _prepare_uefi_gummiboot_USB_files -_prepare_grub_uefi_CD_files +# _prepare_grub_uefi_CD_files unset _UEFI_ARCH unset _SPEC_UEFI_ARCH @@ -519,7 +508,7 @@ sed -i -e "s/@@DATE@@/$(date)/g" -e "s/@@KERNEL@@/$KERNEL/g" -e "s/@@LTS_KERNEL cd "${WD}/" -## Generate the BIOS+UEFI+ISOHYBRID ISO image using xorriso (extra/libisoburn package) in mkisofs emulation mode +## Generate the BIOS+ISOHYBRID CD image using xorriso (extra/libisoburn package) in mkisofs emulation mode echo "Generating ALLINONE hybrid ISO ..." xorriso -as mkisofs \ -iso-level 3 -rock -joliet \ @@ -531,10 +520,12 @@ xorriso -as mkisofs \ -eltorito-boot boot/syslinux/isolinux.bin \ -eltorito-catalog boot/syslinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ - -eltorito-alt-boot --efi-boot boot/grub/grub_uefi_x86_64.bin -no-emul-boot \ -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \ -output "${IMAGENAME}.iso" "${ALLINONE}/" &> "/tmp/archboot_allinone_xorriso.log" +## Add below line to above xorriso if UEFI CD support is required +# -eltorito-alt-boot --efi-boot boot/grub/grub_uefi_x86_64.bin -no-emul-boot \ + ## cleanup isolinux and migrate to syslinux # echo "Generating ALLINONE IMG ..." # rm -f "${ALLINONE}/boot/syslinux/isolinux.bin" @@ -545,12 +536,12 @@ xorriso -as mkisofs \ # "${USBIMAGE_HELPER}" "${ALLINONE}" "${IMAGENAME}.img" > /dev/null 2>&1 if [[ -e "${WD}/${IMAGENAME_OLD}-dual.iso" ]] && [[ ! -e "${WD}/${IMAGENAME_OLD}-x86_64.iso" ]]; then - _REMOVE_i686="1" _REMOVE_x86_64="0" _UPDATE_SETUP="0" _UPDATE_UEFI_SHELL="0" _UPDATE_UEFI_REFIND_BIN="0" _UPDATE_UEFI_GUMMIBOOT="0" _UPDATE_SYSLINUX="0" _UPDATE_SYSLINUX_CONFIG="1" _UPDATE_GRUB_UEFI="0" _UPDATE_GRUB_UEFI_CONFIG="1" "${UPDATEISO_HELPER}" "${WD}/${IMAGENAME_OLD}-dual.iso" + _REMOVE_i686="1" _REMOVE_x86_64="0" _UPDATE_SETUP="0" _UPDATE_UEFI_SHELL="0" _UPDATE_UEFI_GUMMIBOOT="0" _UPDATE_SYSLINUX="0" _UPDATE_SYSLINUX_CONFIG="1" "${UPDATEISO_HELPER}" "${WD}/${IMAGENAME_OLD}-dual.iso" mv "${WD}/${IMAGENAME_OLD}-dual-updated-x86_64.iso" "${WD}/${IMAGENAME_OLD}-x86_64.iso" fi if [[ -e "${WD}/${IMAGENAME_OLD}-dual.iso" ]] && [[ ! -e "${WD}/${IMAGENAME_OLD}-i686.iso" ]]; then - _REMOVE_i686="0" _REMOVE_x86_64="1" _UPDATE_SETUP="0" _UPDATE_UEFI_SHELL="0" _UPDATE_UEFI_REFIND_BIN="0" _UPDATE_UEFI_GUMMIBOOT="0" _UPDATE_SYSLINUX="0" _UPDATE_SYSLINUX_CONFIG="1" _UPDATE_GRUB_UEFI="0" _UPDATE_GRUB_UEFI_CONFIG="1" "${UPDATEISO_HELPER}" "${WD}/${IMAGENAME_OLD}-dual.iso" + _REMOVE_i686="0" _REMOVE_x86_64="1" _UPDATE_SETUP="0" _UPDATE_UEFI_SHELL="0" _UPDATE_UEFI_GUMMIBOOT="0" _UPDATE_SYSLINUX="0" _UPDATE_SYSLINUX_CONFIG="1" "${UPDATEISO_HELPER}" "${WD}/${IMAGENAME_OLD}-dual.iso" mv "${WD}/${IMAGENAME_OLD}-dual-updated-i686.iso" "${WD}/${IMAGENAME_OLD}-i686.iso" fi @@ -560,7 +551,7 @@ rm -f "${WD}/sha256sums.txt" || true sha256sum *.iso *.img > "${WD}/sha256sums.txt" # cleanup -rm -rf "${grub_uefi_mp}" +# rm -rf "${grub_uefi_mp}" rm -rf "${CORE}" rm -rf "${CORE64}" rm -rf "${CORE_LTS}" diff --git a/usr/bin/archboot-update-iso.sh b/usr/bin/archboot-update-iso.sh index 17f9ecf2a..e2b4a1f67 100755 --- a/usr/bin/archboot-update-iso.sh +++ b/usr/bin/archboot-update-iso.sh @@ -7,13 +7,12 @@ [[ -z "${_UPDATE_SETUP}" ]] && _UPDATE_SETUP="1" [[ -z "${_UPDATE_UEFI_SHELL}" ]] && _UPDATE_UEFI_SHELL="1" -[[ -z "${_UPDATE_UEFI_REFIND_BIN}" ]] && _UPDATE_UEFI_REFIND_BIN="1" [[ -z "${_UPDATE_UEFI_GUMMIBOOT}" ]] && _UPDATE_UEFI_GUMMIBOOT="1" [[ -z "${_UPDATE_SYSLINUX}" ]] && _UPDATE_SYSLINUX="1" [[ -z "${_UPDATE_SYSLINUX_CONFIG}" ]] && _UPDATE_SYSLINUX_CONFIG="1" -[[ -z "${_UPDATE_GRUB_UEFI}" ]] && _UPDATE_GRUB_UEFI="1" -[[ -z "${_UPDATE_GRUB_UEFI_CONFIG}" ]] && _UPDATE_GRUB_UEFI_CONFIG="1" +# [[ -z "${_UPDATE_GRUB_UEFI}" ]] && _UPDATE_GRUB_UEFI="1" +# [[ -z "${_UPDATE_GRUB_UEFI_CONFIG}" ]] && _UPDATE_GRUB_UEFI_CONFIG="1" [[ "${_UPDATE_SYSLINUX}" == "1" ]] && _UPDATE_SYSLINUX_CONFIG="1" [[ "${_UPDATE_GRUB_UEFI}" == "1" ]] && _UPDATE_GRUB_UEFI_CONFIG="1" @@ -98,20 +97,6 @@ echo [[ -e "${_ARCHBOOT_ISO_WD}/splash.png" ]] && cp -f "${_ARCHBOOT_ISO_WD}/splash.png" "${_ARCHBOOT_ISO_EXT_DIR}/boot/syslinux/splash.png" echo -_rename_old_files() { - - mv "${_ARCHBOOT_ISO_EXT_DIR}/boot"/{vmlts,vmlinuz_i686_lts} || true - mv "${_ARCHBOOT_ISO_EXT_DIR}/boot"/{vmlinuz,vmlinuz_i686} || true - mv "${_ARCHBOOT_ISO_EXT_DIR}/boot"/{initrd.img,initramfs_i686.img} || true - echo - - mv "${_ARCHBOOT_ISO_EXT_DIR}/boot"/{vm64lts,vmlinuz_x86_64_lts} || true - mv "${_ARCHBOOT_ISO_EXT_DIR}/boot"/{vm64,vmlinuz_x86_64} || true - mv "${_ARCHBOOT_ISO_EXT_DIR}/boot"/{initrd64.img,initramfs_x86_64.img} || true - echo - -} - _update_syslinux_iso_files() { rm -f "${_ARCHBOOT_ISO_EXT_DIR}/boot/syslinux"/*.{com,bin,c32} || true @@ -270,6 +255,7 @@ _download_uefi_shell_tianocore() { mv "${_ARCHBOOT_ISO_EXT_DIR}/EFI/tools/shellx64.efi" "${_ARCHBOOT_ISO_EXT_DIR}/EFI/tools/shellx64_v2.efi" || true mv "${_ARCHBOOT_ISO_EXT_DIR}/EFI/tools/shellx64_old.efi" "${_ARCHBOOT_ISO_EXT_DIR}/EFI/tools/shellx64_v1.efi" || true + rm -rf "${_ARCHBOOT_ISO_EXT_DIR}/EFI/shell/" || true echo @@ -317,18 +303,6 @@ _download_uefi_shell_tianocore() { } -_update_uefi_refind_bin_sourceforge() { - - mkdir -p "${_ARCHBOOT_ISO_EXT_DIR}/packages/" || true - - rm -f "${_ARCHBOOT_ISO_EXT_DIR}/packages/refind-bin.zip" || true - echo - - ## Download latest rEFInd bin archive from sourceforge - curl --verbose -f -C - --ftp-pasv --retry 3 --retry-delay 3 -o "${_ARCHBOOT_ISO_EXT_DIR}/packages/refind-bin.zip" -L "http://sourceforge.net/projects/refind/files/latest/download" - -} - _update_uefi_gummiboot_USB_files() { rm -rf "${_ARCHBOOT_ISO_EXT_DIR}/EFI/boot/" || true @@ -336,8 +310,8 @@ _update_uefi_gummiboot_USB_files() { echo mkdir -p "${_ARCHBOOT_ISO_EXT_DIR}/EFI/boot" - cp -f "/boot/efi/EFI/arch/gummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi" "${_ARCHBOOT_ISO_EXT_DIR}/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" - cp -f "/boot/efi/EFI/arch/efilinux/efilinux${_SPEC_UEFI_ARCH}.efi" "${_ARCHBOOT_ISO_EXT_DIR}/EFI/boot/efilinux${_SPEC_UEFI_ARCH}.efi" + cp -f "/usr/lib/gummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi" "${_ARCHBOOT_ISO_EXT_DIR}/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" + cp -f "/usr/lib/efilinux/efilinux${_SPEC_UEFI_ARCH}.efi" "${_ARCHBOOT_ISO_EXT_DIR}/EFI/boot/efilinux${_SPEC_UEFI_ARCH}.efi" echo mkdir -p "${_ARCHBOOT_ISO_EXT_DIR}/loader/entries/" @@ -350,7 +324,7 @@ EOF echo cat << EOF > "${_ARCHBOOT_ISO_EXT_DIR}/loader/entries/archboot-${_UEFI_ARCH}.conf" -title Arch Linux (${_UEFI_ARCH}) archboot +title Arch Linux ${_UEFI_ARCH} archboot linux /boot/vmlinuz_${_UEFI_ARCH} initrd /boot/initramfs_${_UEFI_ARCH}.img options gpt loglevel=7 add_efi_memmap none=UEFI_ARCH_${_UEFI_ARCH} @@ -358,20 +332,20 @@ EOF echo cat << EOF > "${_ARCHBOOT_ISO_EXT_DIR}/loader/entries/archboot-${_UEFI_ARCH}-lts.conf" -title Arch Linux LTS (${_UEFI_ARCH}) archboot +title Arch Linux LTS ${_UEFI_ARCH} archboot efi /EFI/boot/efilinux${_SPEC_UEFI_ARCH}.efi options -f \\boot\\vmlinuz_x86_64_lts gpt loglevel=7 add_efi_memmap none=UEFI_ARCH_${_UEFI_ARCH} initrd=\\boot\\initramfs_${_UEFI_ARCH}.img EOF echo cat << EOF > "${_ARCHBOOT_ISO_EXT_DIR}/loader/entries/uefi-shell-${_UEFI_ARCH}-v2.conf" -title UEFI ${_UEFI_ARCH} Shell v2 - For Spec. Ver. >=2.3 systems +title UEFI ${_UEFI_ARCH} Shell v2 efi /EFI/tools/shell${_SPEC_UEFI_ARCH}_v2.efi EOF echo cat << EOF > "${_ARCHBOOT_ISO_EXT_DIR}/loader/entries/uefi-shell-${_UEFI_ARCH}-v1.conf" -title UEFI ${_UEFI_ARCH} Shell v1 - For Spec. Ver. <2.3 systems +title UEFI ${_UEFI_ARCH} Shell v1 efi /EFI/tools/shell${_SPEC_UEFI_ARCH}_v1.efi EOF echo @@ -725,8 +699,6 @@ _download_pkgs() { } -_rename_old_files - [[ "${_REMOVE_i686}" == "1" ]] && _remove_i686_iso_files [[ "${_REMOVE_x86_64}" == "1" ]] && _remove_x86_64_iso_files @@ -756,21 +728,19 @@ fi [[ "${_UPDATE_UEFI_SHELL}" == "1" ]] && _download_uefi_shell_tianocore -# [[ "${_UPDATE_UEFI_REFIND_BIN}" == "1" ]] && _update_uefi_refind_bin_sourceforge - [[ "${_UPDATE_UEFI_GUMMIBOOT}" == "1" ]] && _update_uefi_gummiboot_USB_files [[ "${_UPDATE_SYSLINUX}" == "1" ]] && _update_syslinux_iso_files [[ "${_UPDATE_SYSLINUX_CONFIG}" == "1" ]] && _update_syslinux_iso_config -[[ "${_UPDATE_GRUB_UEFI}" == "1" ]] && _update_grub_uefi_CD_files +# [[ "${_UPDATE_GRUB_UEFI}" == "1" ]] && _update_grub_uefi_CD_files -[[ "${_UPDATE_GRUB_UEFI_CONFIG}" == "1" ]] && _update_grub_uefi_CD_config +# [[ "${_UPDATE_GRUB_UEFI_CONFIG}" == "1" ]] && _update_grub_uefi_CD_config cd "${_ARCHBOOT_ISO_WD}/" -## Generate the BIOS+UEFI+ISOHYBRID ISO image using xorriso (extra/libisoburn package) in mkisofs emulation mode +## Generate the BIOS+ISOHYBRID CD image using xorriso (extra/libisoburn package) in mkisofs emulation mode echo "Generating the modified ISO ..." xorriso -as mkisofs \ -iso-level 3 -rock -joliet \ @@ -782,11 +752,13 @@ xorriso -as mkisofs \ -eltorito-boot boot/syslinux/isolinux.bin \ -eltorito-catalog boot/syslinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ - -eltorito-alt-boot --efi-boot boot/grub/grub_uefi_x86_64.bin -no-emul-boot \ -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \ -output "${_ARCHBOOT_ISO_UPDATED_PATH}" "${_ARCHBOOT_ISO_EXT_DIR}/" &> "/tmp/archboot_update_xorriso.log" echo +## Add below line to above xorriso if UEFI CD support is required +# -eltorito-alt-boot --efi-boot boot/grub/grub_uefi_x86_64.bin -no-emul-boot \ + set +x if [[ -e "${_ARCHBOOT_ISO_UPDATED_PATH}" ]]; then @@ -813,8 +785,8 @@ unset _UPDATE_UEFI_REFIND_BIN unset _UPDATE_UEFI_GUMMIBOOT unset _UPDATE_SYSLINUX unset _UPDATE_SYSLINUX_CONFIG -unset _UPDATE_GRUB_UEFI -unset _UPDATE_GRUB_UEFI_CONFIG +# unset _UPDATE_GRUB_UEFI +# unset _UPDATE_GRUB_UEFI_CONFIG unset _ARCHBOOT_ISO_OLD_PATH unset _ARCHBOOT_ISO_WD unset _ARCHBOOT_ISO_OLD_NAME diff --git a/usr/lib/initcpio/install/arch_core_install b/usr/lib/initcpio/install/arch_core_install index d400d242c..d3498fd91 100644 --- a/usr/lib/initcpio/install/arch_core_install +++ b/usr/lib/initcpio/install/arch_core_install @@ -113,7 +113,7 @@ build () ### HACK add refind and syslinux dependencies to image, with separate extra db file # set LANG to US we parse language output here LANG=US - for i in refind-efi-x86_64 efibootmgr freetype2 mtools perl-passwd-md5 perl-digest-sha1 ; do + for i in gummiboot-efi efilinux-efi refind-efi efibootmgr freetype2 mtools perl-passwd-md5 perl-digest-sha1 ; do pacman -Sw --noconfirm $i wget -N --directory-prefix /var/cache/pacman/pkg/ $(pacman -Sp $i).sig pkgver="$(echo $(pacman -Si $i | grep -m 1 Version | cut -d ":" -f 2,3))" diff --git a/usr/lib/initcpio/install/arch_efilinux b/usr/lib/initcpio/install/arch_efilinux new file mode 100644 index 000000000..a9d0f56c6 --- /dev/null +++ b/usr/lib/initcpio/install/arch_efilinux @@ -0,0 +1,15 @@ +#!/bin/bash +# Created by Tobias Powalowski + +build () +{ + add_file "/usr/lib/efilinux/efilinuxx64.efi" +} + +help () +{ +cat< + +build () +{ + add_file "/usr/lib/gummiboot/gummibootx64.efi" +} + +help () +{ +cat< + +build () +{ + add_file "/usr/lib/refind/refindx64.efi" + add_file "/usr/lib/refind/refind.conf" +} + +help () +{ +cat< "${DESTDIR}/boot/efi/EFI/arch/efilinux/efilinux.cfg" + cat << CONFEOF > "${DESTDIR}/boot/efi/EFI/efilinux/efilinux.cfg" -f \\EFI\\arch\\${_EFISTUB_KERNEL} ${_PARAMETERS_MOD} CONFEOF fi - cat << CONFEOF > "${DESTDIR}/boot/efi/EFI/arch/linux.conf" -${_PARAMETERS_MOD} -CONFEOF + # cat << CONFEOF > "${DESTDIR}/boot/efi/EFI/arch/linux.conf" +# ${_PARAMETERS_MOD} +# CONFEOF ################################### @@ -3632,26 +3634,26 @@ CONFEOF if [[ "${_EFILINUX}" == "1" ]]; then DIALOG --msgbox "You will now be put into the editor to edit efilinux.cfg . After you save your changes, exit the editor." 0 0 geteditor || return 1 - "${EDITOR}" "${DESTDIR}/boot/efi/EFI/arch/efilinux/efilinux.cfg" - else + "${EDITOR}" "${DESTDIR}/boot/efi/EFI/efilinux/efilinux.cfg" + # else # _BOOTMGR_LABEL="Arch Linux (EFISTUB)" # _BOOTMGR_LOADER_DIR="arch" # _BOOTMGR_LOADER_FILE="${_EFISTUB_KERNEL}" # do_uefi_bootmgr_setup - DIALOG --msgbox "You will now be put into the editor to edit linux.conf . After you save your changes, exit the editor." 0 0 - geteditor || return 1 - "${EDITOR}" "${DESTDIR}/boot/efi/EFI/arch/linux.conf" + # DIALOG --msgbox "You will now be put into the editor to edit linux.conf . After you save your changes, exit the editor." 0 0 + # geteditor || return 1 + # "${EDITOR}" "${DESTDIR}/boot/efi/EFI/arch/linux.conf" - # DIALOG --defaultno --yesno "Do you want to copy /boot/efi/EFI/arch/${_EFISTUB_KERNEL} to /boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi .\n\nThis might be needed in some systems where efibootmgr may not work due to firmware issues." 0 0 && _UEFISYS_EFI_BOOT_DIR="1" + # DIALOG --defaultno --yesno "Do you want to copy /boot/efi/EFI/arch/${_EFISTUB_KERNEL} to /boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi .\n\nThis might be needed in some systems where efibootmgr may not work due to firmware issues." 0 0 && _UEFISYS_EFI_BOOT_DIR="1" # if [[ "${_UEFISYS_EFI_BOOT_DIR}" == "1" ]]; then # mkdir -p "${DESTDIR}/boot/efi/EFI/boot" - # rm -f "${DESTDIR}/boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi" + # rm -f "${DESTDIR}/boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" # rm -f "${DESTDIR}/boot/efi/EFI/boot/linux.conf" - # cp -f "${DESTDIR}/boot/efi/EFI/arch/${_EFISTUB_KERNEL}" "${DESTDIR}/boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi" + # cp -f "${DESTDIR}/boot/efi/EFI/arch/${_EFISTUB_KERNEL}" "${DESTDIR}/boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" # cp -f "${DESTDIR}/boot/efi/EFI/boot/linux.conf" "${DESTDIR}/boot/efi/EFI/boot/linux.conf" # fi fi @@ -3690,23 +3692,26 @@ do_efistub_uefi_i686() { dogummiboot_uefi_common() { - DIALOG --msgbox "Setting up gummiboot-efi-${UEFI_ARCH} now ..." 0 0 + DIALOG --msgbox "Setting up gummiboot-efi now ..." 0 0 - PACKAGES="gummiboot-efi-${UEFI_ARCH}" + PACKAGES="gummiboot-efi" run_pacman PACKAGES="" + mkdir -p "${DESTDIR}/boot/efi/EFI/gummiboot/" + cp -f "${DESTDIR}/usr/lib/gummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi" "${DESTDIR}/boot/efi/EFI/gummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi" + if [[ "${_EFILINUX}" == "1" ]]; then cat << GUMEOF > "${DESTDIR}/boot/efi/loader/entries/archlinux-core-lts.conf" title Arch Linux LTS via EFILINUX -efi /EFI/arch/efilinux/efilinux${SPEC_UEFI_ARCH}.efi -options $(cat "${DESTDIR}/boot/efi/EFI/arch/efilinux/efilinux.cfg") +efi /EFI/efilinux/efilinux${_SPEC_UEFI_ARCH}.efi +options $(cat "${DESTDIR}/boot/efi/EFI/efilinux/efilinux.cfg") GUMEOF cat << GUMEOF > "${DESTDIR}/boot/efi/loader/entries/archlinux-core-lts-fallback.conf" title Arch Linux LTS via EFILINUX - fallback initramfs -efi /EFI/arch/efilinux/efilinux${SPEC_UEFI_ARCH}.efi -options $(cat "${DESTDIR}/boot/efi/EFI/arch/efilinux/efilinux.cfg") initrd=\\EFI\\arch\\${_EFISTUB_INITRAMFS}-fallback.img +efi /EFI/efilinux/efilinux${_SPEC_UEFI_ARCH}.efi +options $(cat "${DESTDIR}/boot/efi/EFI/efilinux/efilinux.cfg") initrd=\\EFI\\arch\\${_EFISTUB_INITRAMFS}-fallback.img GUMEOF cat << GUMEOF > "${DESTDIR}/boot/efi/loader/loader.conf" @@ -3736,13 +3741,13 @@ GUMEOF fi - if [[ -e "${DESTDIR}/boot/efi/EFI/arch/gummiboot/gummiboot${SPEC_UEFI_ARCH}.efi" ]]; then + if [[ -e "${DESTDIR}/boot/efi/EFIgummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi" ]]; then _BOOTMGR_LABEL="Arch Linux (gummiboot)" - _BOOTMGR_LOADER_DIR="arch//gummiboot" - _BOOTMGR_LOADER_FILE="gummiboot${SPEC_UEFI_ARCH}.efi" + _BOOTMGR_LOADER_DIR="gummiboot" + _BOOTMGR_LOADER_FILE="gummiboot${_SPEC_UEFI_ARCH}.efi" do_uefi_bootmgr_setup - DIALOG --msgbox "gummiboot-efi-${UEFI_ARCH} has been setup successfully." 0 0 + DIALOG --msgbox "gummiboot-efi has been setup successfully." 0 0 DIALOG --msgbox "You will now be put into the editor to edit loader.conf and gummiboot menu entry files . After you save your changes, exit the editor." 0 0 geteditor || return 1 @@ -3757,28 +3762,32 @@ GUMEOF "${EDITOR}" "${DESTDIR}/boot/efi/loader/loader.conf" - DIALOG --defaultno --yesno "Do you want to copy /boot/efi/EFI/arch/gummiboot/gummiboot${SPEC_UEFI_ARCH}.efi to /boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi ?\n\nThis might be needed in some systems where efibootmgr may not work due to firmware issues." 0 0 && _UEFISYS_EFI_BOOT_DIR="1" + DIALOG --defaultno --yesno "Do you want to copy /boot/efi/EFI/gummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi to /boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi ?\n\nThis might be needed in some systems where efibootmgr may not work due to firmware issues." 0 0 && _UEFISYS_EFI_BOOT_DIR="1" if [[ "${_UEFISYS_EFI_BOOT_DIR}" == "1" ]]; then mkdir -p "${DESTDIR}/boot/efi/EFI/boot" - rm -f "${DESTDIR}/boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi" - cp -f "${DESTDIR}/boot/efi/EFI/arch/gummiboot/gummiboot${SPEC_UEFI_ARCH}.efi" "${DESTDIR}/boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi" + rm -f "${DESTDIR}/boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" + cp -f "${DESTDIR}/boot/efi/EFI/gummiboot/gummiboot${_SPEC_UEFI_ARCH}.efi" "${DESTDIR}/boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" fi else - DIALOG --msgbox "Error setting up gummiboot-efi-${UEFI_ARCH}." 0 0 + DIALOG --msgbox "Error setting up gummiboot-efi." 0 0 fi } dorefind_uefi_common() { - DIALOG --msgbox "Setting up refind-efi-${UEFI_ARCH} now ..." 0 0 + DIALOG --msgbox "Setting up refind-efi now ..." 0 0 - PACKAGES="refind-efi-${UEFI_ARCH}" + PACKAGES="refind-efi" run_pacman PACKAGES="" - _REFIND_CONFIG="${DESTDIR}/boot/efi/EFI/arch/refind/refind.conf" + mkdir -p "${DESTDIR}/boot/efi/EFI/refind/" + cp -f "${DESTDIR}/usr/lib/refind/refind${_SPEC_UEFI_ARCH}.efi" "${DESTDIR}/boot/efi/EFI/refind/refind${_SPEC_UEFI_ARCH}.efi" + cp -r "${DESTDIR}/usr/share/refind/icons" "${DESTDIR}/boot/efi/EFI/refind/icons" + + _REFIND_CONFIG="${DESTDIR}/boot/efi/EFI/refind/refind.conf" sed 's|^timeout 20|timeout 0|g' -i "${_REFIND_CONFIG}" sed 's|^#resolution 1024 768|resolution 1024 768|g' -i "${_REFIND_CONFIG}" @@ -3789,18 +3798,18 @@ dorefind_uefi_common() { sed 's|^#max_tags 0|max_tags 0|g' -i "${_REFIND_CONFIG}" if [[ "${_EFILINUX}" == "1" ]]; then - cat << REFINDEOF >> "${DESTDIR}/boot/efi/EFI/arch/refind/refind.conf" + cat << REFINDEOF >> "${_REFIND_CONFIG}" menuentry "Arch Linux LTS via EFILINUX" { - icon /EFI/arch/refind/icons/os_arch.icns - loader /EFI/arch/efilinux/efilinux${SPEC_UEFI_ARCH}.efi - options "$(cat "${DESTDIR}/boot/efi/EFI/arch/efilinux/efilinux.cfg")" + icon /EFI/refind/icons/os_arch.icns + loader /EFI/efilinux/efilinux${_SPEC_UEFI_ARCH}.efi + options "$(cat "${DESTDIR}/boot/efi/EFI/efilinux/efilinux.cfg")" } menuentry "Arch Linux LTS via EFILINUX - fallback initramfs" { - icon /EFI/arch/refind/icons/os_arch.icns - loader /EFI/arch/efilinux/efilinux${SPEC_UEFI_ARCH}.efi - options "$(cat "${DESTDIR}/boot/efi/EFI/arch/efilinux/efilinux.cfg") initrd=\\EFI\\arch\\${_EFISTUB_INITRAMFS}-fallback.img" + icon /EFI/refind/icons/os_arch.icns + loader /EFI/efilinux/efilinux${_SPEC_UEFI_ARCH}.efi + options "$(cat "${DESTDIR}/boot/efi/EFI/efilinux/efilinux.cfg") initrd=\\EFI\\arch\\${_EFISTUB_INITRAMFS}-fallback.img" } REFINDEOF @@ -3813,34 +3822,34 @@ REFINDEOF fi - if [[ -e "${DESTDIR}/boot/efi/EFI/arch/refind/refind${SPEC_UEFI_ARCH}.efi" ]]; then + if [[ -e "${DESTDIR}/boot/efi/EFI/refind/refind${_SPEC_UEFI_ARCH}.efi" ]]; then _BOOTMGR_LABEL="Arch Linux (rEFInd)" - _BOOTMGR_LOADER_DIR="arch//refind" - _BOOTMGR_LOADER_FILE="refind${SPEC_UEFI_ARCH}.efi" + _BOOTMGR_LOADER_DIR="refind" + _BOOTMGR_LOADER_FILE="refind${_SPEC_UEFI_ARCH}.efi" do_uefi_bootmgr_setup - DIALOG --msgbox "refind-efi-${UEFI_ARCH} has been setup successfully." 0 0 + DIALOG --msgbox "refind-efi has been setup successfully." 0 0 DIALOG --msgbox "You will now be put into the editor to edit refind.conf (and maybe refind_linux.conf) . After you save your changes, exit the editor." 0 0 geteditor || return 1 "${EDITOR}" "${_REFIND_CONFIG}" [[ "${_EFILINUX}" != "1" ]] && "${EDITOR}" "${DESTDIR}/boot/efi/EFI/arch/refind_linux.conf" - DIALOG --defaultno --yesno "Do you want to copy /boot/efi/EFI/arch/refind/refind${SPEC_UEFI_ARCH}.efi to /boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi ?\n\nThis might be needed in some systems where efibootmgr may not work due to firmware issues." 0 0 && _UEFISYS_EFI_BOOT_DIR="1" + DIALOG --defaultno --yesno "Do you want to copy /boot/efi/EFI/refind/refind${_SPEC_UEFI_ARCH}.efi to /boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi ?\n\nThis might be needed in some systems where efibootmgr may not work due to firmware issues." 0 0 && _UEFISYS_EFI_BOOT_DIR="1" if [[ "${_UEFISYS_EFI_BOOT_DIR}" == "1" ]]; then mkdir -p "${DESTDIR}/boot/efi/EFI/boot" - rm -f "${DESTDIR}/boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi" + rm -f "${DESTDIR}/boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" rm -f "${DESTDIR}/boot/efi/EFI/boot/refind.conf" rm -rf "${DESTDIR}/boot/efi/EFI/boot/icons" - cp -f "${DESTDIR}/boot/efi/EFI/arch/refind/refind${SPEC_UEFI_ARCH}.efi" "${DESTDIR}/boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi" + cp -f "${DESTDIR}/boot/efi/EFI/refind/refind${_SPEC_UEFI_ARCH}.efi" "${DESTDIR}/boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" cp -f "${_REFIND_CONFIG}" "${DESTDIR}/boot/efi/EFI/boot/refind.conf" - cp -rf "${DESTDIR}/boot/efi/EFI/arch/refind/icons" "${DESTDIR}/boot/efi/EFI/boot/icons" + cp -rf "${DESTDIR}/boot/efi/EFI/refind/icons" "${DESTDIR}/boot/efi/EFI/boot/icons" fi else - DIALOG --msgbox "Error setting up refind-efi-${UEFI_ARCH}." 0 0 + DIALOG --msgbox "Error setting up refind-efi." 0 0 fi } @@ -4200,17 +4209,13 @@ dogrub_config() { ######## - cp -f "${DESTDIR}/${GRUB_PREFIX_DIR}/grub.cfg" "/tmp/.grub.cfg" - # remove the default entries by truncating the file at our little tag (set default) - head -n $(cat /tmp/.grub.cfg | grep -n 'set default' | cut -d: -f 1) "/tmp/.grub.cfg" > "${DESTDIR}/${GRUB_PREFIX_DIR}/grub.cfg" - rm -f "/tmp/.grub.cfg" - - NUMBER="0" + ## Move old config file, if any + mv "${DESTDIR}/${GRUB_PREFIX_DIR}/grub.cfg" "${DESTDIR}/${GRUB_PREFIX_DIR}/grub.cfg.bak" || true ## Ignore if the insmod entries are repeated - there are possibilities of having /boot in one disk and root-fs in altogether different disk ## with totally different configuration. - cat << EOF >> "${DESTDIR}/${GRUB_PREFIX_DIR}/grub.cfg" + cat << EOF > "${DESTDIR}/${GRUB_PREFIX_DIR}/grub.cfg" if [ "\${grub_platform}" == "efi" ]; then set _UEFI_ARCH="\${grub_cpu}" @@ -4336,6 +4341,9 @@ EOF LINUX_MOD_COMMAND=$(echo "${LINUX_UNMOD_COMMAND}" | sed -e 's# # #g' | sed -e 's# # #g') ## create default kernel entry + + NUMBER="0" + cat << EOF >> "${DESTDIR}/${GRUB_PREFIX_DIR}/grub.cfg" # (${NUMBER}) Arch Linux @@ -4596,8 +4604,8 @@ dogrub_uefi_common() { dogrub_common_before - DIALOG --msgbox "Installing grub-efi-${UEFI_ARCH} now ..." 0 0 - PACKAGES="grub-common grub-efi-${UEFI_ARCH}" + DIALOG --msgbox "Installing grub-efi-${_UEFI_ARCH} now ..." 0 0 + PACKAGES="grub-common grub-efi-${_UEFI_ARCH}" run_pacman # reset PACKAGES after installing @@ -4606,13 +4614,13 @@ dogrub_uefi_common() { chroot_mount chroot "${DESTDIR}" "/usr/sbin/grub-install" \ - --directory="/usr/lib/grub/${UEFI_ARCH}-efi" \ - --target="${UEFI_ARCH}-efi" \ + --directory="/usr/lib/grub/${_UEFI_ARCH}-efi" \ + --target="${_UEFI_ARCH}-efi" \ --efi-directory="/boot/efi" \ --bootloader-id="arch_grub" \ --boot-directory="/boot" \ --recheck \ - --debug &>"/tmp/grub_uefi_${UEFI_ARCH}_install.log" + --debug &>"/tmp/grub_uefi_${_UEFI_ARCH}_install.log" chroot_umount @@ -4661,7 +4669,7 @@ fi EOF - cp -f "${DESTDIR}/boot/grub/grub.cfg" "${DESTDIR}/boot/efi/EFI/arch_grub/grub${SPEC_UEFI_ARCH}_standalone.cfg" + cp -f "${DESTDIR}/boot/grub/grub.cfg" "${DESTDIR}/boot/efi/EFI/arch_grub/grub${_SPEC_UEFI_ARCH}_standalone.cfg" __WD="${PWD}/" @@ -4670,11 +4678,11 @@ EOF chroot_mount chroot "${DESTDIR}" "/usr/bin/grub-mkstandalone" \ - --directory="/usr/lib/grub/${UEFI_ARCH}-efi" \ - --format="${UEFI_ARCH}-efi" \ + --directory="/usr/lib/grub/${_UEFI_ARCH}-efi" \ + --format="${_UEFI_ARCH}-efi" \ --compression="xz" \ - --output="/boot/efi/EFI/arch_grub/grub${SPEC_UEFI_ARCH}_standalone.efi" \ - "boot/grub/grub.cfg" &>"/tmp/grub_${UEFI_ARCH}_uefi_mkstandalone.log" + --output="/boot/efi/EFI/arch_grub/grub${_SPEC_UEFI_ARCH}_standalone.efi" \ + "boot/grub/grub.cfg" &>"/tmp/grub_${_UEFI_ARCH}_uefi_mkstandalone.log" chroot_umount @@ -4682,32 +4690,32 @@ EOF [[ -e "${DESTDIR}/boot/grub/grub.cfg.save" ]] && mv "${DESTDIR}/boot/grub/grub.cfg.save" "${DESTDIR}/boot/grub/grub.cfg" - cat "/tmp/grub_uefi_${UEFI_ARCH}_install.log" >> "${LOG}" + cat "/tmp/grub_uefi_${_UEFI_ARCH}_install.log" >> "${LOG}" - if [[ -e "${DESTDIR}/boot/efi/EFI/arch_grub/grub${SPEC_UEFI_ARCH}.efi" ]] && [[ -e "${DESTDIR}/boot/grub/${UEFI_ARCH}-efi/core.efi" ]]; then + if [[ -e "${DESTDIR}/boot/efi/EFI/arch_grub/grub${_SPEC_UEFI_ARCH}.efi" ]] && [[ -e "${DESTDIR}/boot/grub/${_UEFI_ARCH}-efi/core.efi" ]]; then _BOOTMGR_LABEL="Arch Linux (GRUB)" _BOOTMGR_LOADER_DIR="arch_grub" - _BOOTMGR_LOADER_FILE="grub${SPEC_UEFI_ARCH}.efi" + _BOOTMGR_LOADER_FILE="grub${_SPEC_UEFI_ARCH}.efi" do_uefi_bootmgr_setup - DIALOG --msgbox "GRUB(2) UEFI ${UEFI_ARCH} has been successfully installed." 0 0 + DIALOG --msgbox "GRUB(2) UEFI ${_UEFI_ARCH} has been successfully installed." 0 0 GRUB_PREFIX_DIR="/boot/grub/" GRUB_UEFI="1" dogrub_config GRUB_UEFI="" - DIALOG --defaultno --yesno "Do you want to copy /boot/efi/EFI/arch_grub/grub${SPEC_UEFI_ARCH}.efi to /boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi ?\n\nThis might be needed in some systems where efibootmgr may not work due to firmware issues." 0 0 && _UEFISYS_EFI_BOOT_DIR="1" + DIALOG --defaultno --yesno "Do you want to copy /boot/efi/EFI/arch_grub/grub${_SPEC_UEFI_ARCH}.efi to /boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi ?\n\nThis might be needed in some systems where efibootmgr may not work due to firmware issues." 0 0 && _UEFISYS_EFI_BOOT_DIR="1" if [[ "${_UEFISYS_EFI_BOOT_DIR}" == "1" ]]; then mkdir -p "${DESTDIR}/boot/efi/EFI/boot" - rm -f "${DESTDIR}/boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi" + rm -f "${DESTDIR}/boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" - cp -f "${DESTDIR}/boot/efi/EFI/arch_grub/grub${SPEC_UEFI_ARCH}.efi" "${DESTDIR}/boot/efi/EFI/boot/boot${SPEC_UEFI_ARCH}.efi" + cp -f "${DESTDIR}/boot/efi/EFI/arch_grub/grub${_SPEC_UEFI_ARCH}.efi" "${DESTDIR}/boot/efi/EFI/boot/boot${_SPEC_UEFI_ARCH}.efi" fi else - DIALOG --msgbox "Error installing GRUB UEFI ${UEFI_ARCH}.\nCheck /tmp/grub_uefi_${UEFI_ARCH}_install.log for more info.\n\nYou probably need to install it manually by chrooting into ${DESTDIR}.\nDon't forget to bind /dev, /sys and /proc into ${DESTDIR} before chrooting." 0 0 + DIALOG --msgbox "Error installing GRUB UEFI ${_UEFI_ARCH}.\nCheck /tmp/grub_uefi_${_UEFI_ARCH}_install.log for more info.\n\nYou probably need to install it manually by chrooting into ${DESTDIR}.\nDon't forget to bind /dev, /sys and /proc into ${DESTDIR} before chrooting." 0 0 return 1 fi