Fix: syslinux install
This commit is contained in:
parent
f086d55071
commit
acef733eda
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user