From acef733edaddd0228f0aa30335900c16ffc14e7d Mon Sep 17 00:00:00 2001 From: natemaia Date: Sun, 16 Dec 2018 01:42:34 -0800 Subject: [PATCH] Fix: syslinux install --- src/archlabs-installer | 2 +- src/lib/boot.sh | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/archlabs-installer b/src/archlabs-installer index 19ae11e..d54c809 100755 --- a/src/archlabs-installer +++ b/src/archlabs-installer @@ -10,7 +10,7 @@ # immutable globals -readonly VER="1.7.39" # Installer version +readonly VER="1.7.40" # Installer version readonly DIST="ArchLabs" # Linux distributor readonly MNT="/mnt" # Install mountpoint readonly ERR="/tmp/errlog" # Built-in error log diff --git a/src/lib/boot.sh b/src/lib/boot.sh index 3a6be2e..1247f9f 100644 --- a/src/lib/boot.sh +++ b/src/lib/boot.sh @@ -182,15 +182,15 @@ prerun_syslinux() { if [[ $SYS == 'UEFI' ]]; then local cfgdir="${MNT}${BMNTS[$SYS-$BOOTLDR]}/EFI/syslinux" - local cfgsrcdir="/usr/lib/syslinux/efi32/" + local cfgsrcdir="/usr/lib/syslinux/efi32" [[ $IS_64BIT == true ]] && cfgsrcdir="/usr/lib/syslinux/efi64/" else local cfgdir="$MNT${BMNTS[$SYS-$BOOTLDR]}/syslinux" - local cfgsrcdir="/usr/lib/syslinux/bios/" + local cfgsrcdir="/usr/lib/syslinux/bios" fi mkdir -p $cfgdir - cp -r $cfgsrcdir $cfgdir/ + cp -rf $cfgsrcdir/* $cfgdir/ cat > $cfgdir/syslinux.cfg << EOF UI menu.c32 PROMPT 0 @@ -264,8 +264,7 @@ uefi_boot_fallback() local esp="${MNT}${BMNTS[$SYS-$BOOTLDR]}" local default="boot" - default="$(find $esp/EFI/ -maxdepth 1 -mindepth 1 \ - -name '[Bb][oO][oO][tT]' -type d)" + default="$(find $esp/EFI/ -maxdepth 1 -mindepth 1 -name '[Bb][oO][oO][tT]' -type d)" default="$(basename $default)" if [[ -d $esp/EFI/$default ]]; then @@ -278,17 +277,9 @@ uefi_boot_fallback() cp -rf $esp/EFI/syslinux/* $esp/EFI/$default/ cp -f $esp/EFI/syslinux/syslinux.efi $esp/EFI/$default/bootx64.efi elif [[ $BOOTLDR == 'grub' && $IS_64BIT == true ]]; then - if [[ -d $esp/EFI/$DIST ]]; then - cp -f $esp/EFI/$DIST/grubx64.efi $esp/EFI/$default/bootx64.efi - else - cp -f $esp/EFI/grub/grubx64.efi $esp/EFI/$default/bootx64.efi - fi + cp -f $esp/EFI/$DIST/grubx64.efi $esp/EFI/$default/bootx64.efi elif [[ $BOOTLDR == 'grub' ]]; then - if [[ -d $esp/EFI/$DIST ]]; then - cp -f $esp/EFI/$DIST/grubia32.efi $esp/EFI/$default/bootia32.efi - else - cp -f $esp/EFI/grub/grubia32.efi $esp/EFI/$default/bootia32.efi - fi + cp -f $esp/EFI/$DIST/grubia32.efi $esp/EFI/$default/bootia32.efi fi return 0