Fix: syslinux install
This commit is contained in:
parent
f086d55071
commit
acef733eda
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# immutable globals
|
# immutable globals
|
||||||
readonly VER="1.7.39" # Installer version
|
readonly VER="1.7.40" # Installer version
|
||||||
readonly DIST="ArchLabs" # Linux distributor
|
readonly DIST="ArchLabs" # Linux distributor
|
||||||
readonly MNT="/mnt" # Install mountpoint
|
readonly MNT="/mnt" # Install mountpoint
|
||||||
readonly ERR="/tmp/errlog" # Built-in error log
|
readonly ERR="/tmp/errlog" # Built-in error log
|
||||||
|
@ -182,15 +182,15 @@ prerun_syslinux()
|
|||||||
{
|
{
|
||||||
if [[ $SYS == 'UEFI' ]]; then
|
if [[ $SYS == 'UEFI' ]]; then
|
||||||
local cfgdir="${MNT}${BMNTS[$SYS-$BOOTLDR]}/EFI/syslinux"
|
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/"
|
[[ $IS_64BIT == true ]] && cfgsrcdir="/usr/lib/syslinux/efi64/"
|
||||||
else
|
else
|
||||||
local cfgdir="$MNT${BMNTS[$SYS-$BOOTLDR]}/syslinux"
|
local cfgdir="$MNT${BMNTS[$SYS-$BOOTLDR]}/syslinux"
|
||||||
local cfgsrcdir="/usr/lib/syslinux/bios/"
|
local cfgsrcdir="/usr/lib/syslinux/bios"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $cfgdir
|
mkdir -p $cfgdir
|
||||||
cp -r $cfgsrcdir $cfgdir/
|
cp -rf $cfgsrcdir/* $cfgdir/
|
||||||
cat > $cfgdir/syslinux.cfg << EOF
|
cat > $cfgdir/syslinux.cfg << EOF
|
||||||
UI menu.c32
|
UI menu.c32
|
||||||
PROMPT 0
|
PROMPT 0
|
||||||
@ -264,8 +264,7 @@ uefi_boot_fallback()
|
|||||||
|
|
||||||
local esp="${MNT}${BMNTS[$SYS-$BOOTLDR]}"
|
local esp="${MNT}${BMNTS[$SYS-$BOOTLDR]}"
|
||||||
local default="boot"
|
local default="boot"
|
||||||
default="$(find $esp/EFI/ -maxdepth 1 -mindepth 1 \
|
default="$(find $esp/EFI/ -maxdepth 1 -mindepth 1 -name '[Bb][oO][oO][tT]' -type d)"
|
||||||
-name '[Bb][oO][oO][tT]' -type d)"
|
|
||||||
default="$(basename $default)"
|
default="$(basename $default)"
|
||||||
|
|
||||||
if [[ -d $esp/EFI/$default ]]; then
|
if [[ -d $esp/EFI/$default ]]; then
|
||||||
@ -278,17 +277,9 @@ uefi_boot_fallback()
|
|||||||
cp -rf $esp/EFI/syslinux/* $esp/EFI/$default/
|
cp -rf $esp/EFI/syslinux/* $esp/EFI/$default/
|
||||||
cp -f $esp/EFI/syslinux/syslinux.efi $esp/EFI/$default/bootx64.efi
|
cp -f $esp/EFI/syslinux/syslinux.efi $esp/EFI/$default/bootx64.efi
|
||||||
elif [[ $BOOTLDR == 'grub' && $IS_64BIT == true ]]; then
|
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
|
||||||
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
|
|
||||||
elif [[ $BOOTLDR == 'grub' ]]; then
|
elif [[ $BOOTLDR == 'grub' ]]; then
|
||||||
if [[ -d $esp/EFI/$DIST ]]; then
|
cp -f $esp/EFI/$DIST/grubia32.efi $esp/EFI/$default/bootia32.efi
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
Reference in New Issue
Block a user