Update for stable

This commit is contained in:
natemaia 2019-10-28 19:56:01 -07:00
parent 1f84d41940
commit 5e17099e1f

View File

@ -8,14 +8,13 @@
# check for syntax errors
# set -n
VER=2.0.98
VER=2.0.99
# default values {
: ${DIST=ArchLabs} # distro name if not set
MNT=/mnt # installation root mountpoint
ANS=/tmp/ans # dialog answer output file
BOOTDIR=boot # location to mount boot partition
FONT=ter-i16n # font used for the linux console
HOOKS=shutdown # additional mkinitcpio HOOKS
SEL=0 # currently selected menu item
@ -926,7 +925,7 @@ part_mountconf()
mount_menu()
{
msg "Mount Menu" "\nGathering device and partition information.\n" 0
msg "Mount Menu" "\nGathering device and partition information.\n" 1
no_bg_install || return 0
lvm_detect
umount_dir "$MNT"
@ -936,7 +935,7 @@ mount_menu()
select_root_partition || { ROOT_PART=''; return 1; }
select_boot_partition || { BOOT_PART=''; return 1; }
if [[ $BOOT_PART ]]; then
part_mount "$BOOT_PART" "/$BOOTDIR" && SEP_BOOT=true || return 1
part_mount "$BOOT_PART" "/boot" && SEP_BOOT=true || return 1
part_bootdev
fi
select_swap || return 1
@ -1301,8 +1300,8 @@ install_boot()
if [[ $SYS == 'UEFI' ]]; then
# remove our old install and generic BOOT/ dir
echo "Removing conflicting boot directories"
find "$MNT/$BOOTDIR/EFI/" -maxdepth 1 -mindepth 1 -iname "$DIST" -type d -delete -printf "remove %p\n"
find "$MNT/$BOOTDIR/EFI/" -maxdepth 1 -mindepth 1 -iname 'BOOT' -type d -delete -printf "remove %p\n"
find "$MNT/boot/EFI/" -maxdepth 1 -mindepth 1 -iname "$DIST" -type d -delete -printf "remove %p\n"
find "$MNT/boot/EFI/" -maxdepth 1 -mindepth 1 -iname 'BOOT' -type d -delete -printf "remove %p\n"
fi
prerun_$BOOTLDR
@ -1318,12 +1317,12 @@ install_boot()
if [[ $SYS == 'UEFI' ]]; then
# some UEFI firmware requires a generic esp/BOOT/BOOTX64.EFI
mkdir -pv "$MNT/$BOOTDIR/EFI/BOOT"
mkdir -pv "$MNT/boot/EFI/BOOT"
case "$BOOTLDR" in
grub) cp -fv "$MNT/$BOOTDIR/EFI/$DIST/grubx64.efi" "$MNT/$BOOTDIR/EFI/BOOT/BOOTX64.EFI" ;;
syslinux) cp -rf "$MNT/$BOOTDIR/EFI/syslinux/"* "$MNT/$BOOTDIR/EFI/BOOT/" && cp -f "$MNT/$BOOTDIR/EFI/syslinux/syslinux.efi" "$MNT/$BOOTDIR/EFI/BOOT/BOOTX64.EFI" ;;
refind-efi) sed -i '/#extra_kernel_version_strings/ c extra_kernel_version_strings linux-hardened,linux-zen,linux-lts,linux' "$MNT/$BOOTDIR/EFI/refind/refind.conf"
cp -fv "$MNT/$BOOTDIR/EFI/refind/refind_x64.efi" "$MNT/$BOOTDIR/EFI/BOOT/BOOTX64.EFI" ;;
grub) cp -fv "$MNT/boot/EFI/$DIST/grubx64.efi" "$MNT/boot/EFI/BOOT/BOOTX64.EFI" ;;
syslinux) cp -rf "$MNT/boot/EFI/syslinux/"* "$MNT/boot/EFI/BOOT/" && cp -f "$MNT/boot/EFI/syslinux/syslinux.efi" "$MNT/boot/EFI/BOOT/BOOTX64.EFI" ;;
refind-efi) sed -i '/#extra_kernel_version_strings/ c extra_kernel_version_strings linux-hardened,linux-zen,linux-lts,linux' "$MNT/boot/EFI/refind/refind.conf"
cp -fv "$MNT/boot/EFI/refind/refind_x64.efi" "$MNT/boot/EFI/BOOT/BOOTX64.EFI" ;;
esac
fi
@ -1674,7 +1673,7 @@ setup_grub()
BCMDS[grub]="grub-install --recheck --force --target=i386-pc $BOOT_DEV"
else
BCMDS[grub]="mount -t efivarfs efivarfs /sys/firmware/efi/efivars > /dev/null 2>&1
grub-install --recheck --force --target=x86_64-efi --efi-directory=/$BOOTDIR --bootloader-id=$DIST"
grub-install --recheck --force --target=x86_64-efi --efi-directory=/boot --bootloader-id=$DIST"
grep -q /sys/firmware/efi/efivars /proc/mounts || mount -t efivarfs efivarfs /sys/firmware/efi/efivars > /dev/null 2>&1
fi