diff --git a/usr/lib/archboot/installer/bootloader.sh b/usr/lib/archboot/installer/bootloader.sh index 9fada0963..bfc0b2c2a 100644 --- a/usr/lib/archboot/installer/bootloader.sh +++ b/usr/lib/archboot/installer/bootloader.sh @@ -901,8 +901,13 @@ _do_grub_uefi() { _dialog --infobox "Pacman is running...\n\nInstalling grub-2:2.06.r533.g78bc9a9b2-1 to ${_DESTDIR}...\n\nCheck ${_VC} console (ALT-F${_VC_NUM}) for progress..." 8 70 # fix broken grub with last working version: # https://lists.gnu.org/archive/html/grub-devel/2023-06/msg00121.html - ${_DLPROG} https://archboot.com/src/grub/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst -P ${_DESTDIR} - ${_DLPROG} https://archboot.com/src/grub/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst.sig -P ${_DESTDIR} + if [[ -e "${_LOCAL_DB}" ]]; then + cp /var/cache/pacman/pkg/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst ${_DESTDIR} + cp /var/cache/pacman/pkg/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst.sig ${_DESTDIR} + else + ${_DLPROG} https://archboot.com/src/grub/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst -P ${_DESTDIR} + ${_DLPROG} https://archboot.com/src/grub/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst.sig -P ${_DESTDIR} + fi ${_NSPAWN} pacman -U --noconfirm /grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst >>"${_LOG}" rm ${_DESTDIR}/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst rm ${_DESTDIR}/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst.sig diff --git a/usr/lib/archboot/release.sh b/usr/lib/archboot/release.sh index c3b7a1400..757116b18 100644 --- a/usr/lib/archboot/release.sh +++ b/usr/lib/archboot/release.sh @@ -43,6 +43,11 @@ _create_iso() { ${_NSPAWN} "${_W_DIR}" pacman -Rdd lvm2 --noconfirm &>/dev/null echo "Generating local ISO..." # generate local iso in container + if [[ "${_ARCH}" == "x86_64" ]]; then + echo "Adding custom grub..." + wget -q https://archboot.com/src/grub/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst -P ${_W_DIR}/var/cache/pacman/pkg + wget -q https://archboot.com/src/grub/grub-2:2.06.r533.g78bc9a9b2-1-x86_64.pkg.tar.zst.sig -P ${_W_DIR}/var/cache/pacman/pkg + fi ${_NSPAWN} "${_W_DIR}" /bin/bash -c "umount /tmp;rm -rf /tmp/*;archboot-${_ARCH}-iso.sh -g -s \ -p=${_PRESET_LOCAL} -i=${_ISONAME}-local-${_ARCH}" || exit 1 echo "Generating latest ISO..."