diff --git a/Slax/debian/bootfiles/bootinst.bat b/Slax/debian/bootfiles/bootinst.bat index 545d165..8cfd8a0 100644 --- a/Slax/debian/bootfiles/bootinst.bat +++ b/Slax/debian/bootfiles/bootinst.bat @@ -1,6 +1,6 @@ -#!/bin/sh -exec /bin/bash "$(dirname "$0")"/bootinst.sh -exec /bin/sh "$(dirname "$0")"/bootinst.sh +#!/bin/sh +exec /bin/bash "$(dirname "$0")"/bootinst.sh +exec /bin/sh "$(dirname "$0")"/bootinst.sh @echo off COLOR 2F @@ -54,14 +54,19 @@ goto setup95 :setupNT \slax\boot\syslinux.exe -maf -d /slax/boot/ %DISK%: -if %ERRORLEVEL% == 0 goto setupDone +if %ERRORLEVEL% == 0 goto setupEFI goto errorFound :setup95 \slax\boot\syslinux.com -maf -d /slax/boot/ %DISK%: -if %ERRORLEVEL% == 0 goto setupDone +if %ERRORLEVEL% == 0 goto setupEFI goto errorFound +:setupEFI +mkdir %DISK%:\EFI\Boot +copy \slax\boot\EFI\Boot\* %DISK%:\EFI\Boot +goto setupDone + :setupDone echo Installation finished. goto pauseit diff --git a/Slax/debian/bootfiles/bootinst.sh b/Slax/debian/bootfiles/bootinst.sh index b4ab2c6..7ec48d0 100644 --- a/Slax/debian/bootfiles/bootinst.sh +++ b/Slax/debian/bootfiles/bootinst.sh @@ -148,6 +148,10 @@ if [ "$DEV" != "$PART" ]; then ) | fdisk $DEV >/dev/null 2>&1 fi +# UEFI boot loader +mkdir -p "$BOOT/../../EFI" +mv "EFI/Boot" "$BOOT/../../EFI/" + echo "Boot installation finished." echo "Press Enter..." read junk diff --git a/bootfiles/EFI/Boot/ldlinux.e64 b/bootfiles/EFI/Boot/ldlinux.e64 new file mode 100644 index 0000000..fac6464 Binary files /dev/null and b/bootfiles/EFI/Boot/ldlinux.e64 differ diff --git a/bootfiles/EFI/Boot/libutil.c32 b/bootfiles/EFI/Boot/libutil.c32 new file mode 100644 index 0000000..9069f6c Binary files /dev/null and b/bootfiles/EFI/Boot/libutil.c32 differ diff --git a/bootfiles/EFI/Boot/menu.c32 b/bootfiles/EFI/Boot/menu.c32 new file mode 100644 index 0000000..8353385 Binary files /dev/null and b/bootfiles/EFI/Boot/menu.c32 differ diff --git a/bootfiles/EFI/Boot/syslinux.efi b/bootfiles/EFI/Boot/syslinux.efi new file mode 100755 index 0000000..c169973 Binary files /dev/null and b/bootfiles/EFI/Boot/syslinux.efi differ diff --git a/bootfiles/bootinst.bat b/bootfiles/bootinst.bat index eb19345..7a13483 100755 --- a/bootfiles/bootinst.bat +++ b/bootfiles/bootinst.bat @@ -11,7 +11,7 @@ set BOOTFLAG=boot666s.tmp echo This file is used to determine current drive letter. It should be deleted. >\%BOOTFLAG% if not exist \%BOOTFLAG% goto readOnly -echo wait please ... +echo wait please ... for %%d in ( C D E F G H I J K L M N O P Q R S T U V W X Y Z ) do if exist %%d:\%BOOTFLAG% set DISK=%%d del \%BOOTFLAG% if %DISK% == none goto DiskNotFound @@ -24,10 +24,16 @@ goto setup95 :setupNT \boot\syslinux.exe -maf -d /boot/ %DISK%: -goto setupDone +goto setupEFI :setup95 \boot\syslinux.com -maf -d /boot/ %DISK%: +goto setupEFI + +:setupEFI +mkdir %DISK%:\EFI\Boot +copy \boot\EFI\Boot\* %DISK%:\EFI\Boot +goto setupDone :setupDone echo Installation finished. diff --git a/bootfiles/bootinst.sh b/bootfiles/bootinst.sh index 0106c61..bc38034 100755 --- a/bootfiles/bootinst.sh +++ b/bootfiles/bootinst.sh @@ -40,5 +40,9 @@ if [ "$DEV" != "$PART" ]; then ) | fdisk $DEV >/dev/null 2>&1 fi +# UEFI boot loader +mkdir -p "$BOOT/../../EFI" +mv "EFI/Boot" "$BOOT/../../EFI/" + echo "Boot installation finished." cd "$CWD" diff --git a/build b/build index 582a265..f9e3536 100755 --- a/build +++ b/build @@ -49,11 +49,15 @@ if [ "$INITRAMFS" != "" ]; then mv "$INITRAMFS" $BOOT/initrfs.img fi -cp bootfiles/* $BOOT +cp -r bootfiles/* $BOOT cat bootfiles/syslinux.cfg | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" > $BOOT/syslinux.cfg cat bootfiles/bootinst.bat | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" | sed -r "s:\\\\boot\\\\:\\\\$LIVEKITNAME\\\\boot\\\\:" > $BOOT/bootinst.bat cp $VMLINUZ $BOOT/ || exit +# UEFI booting +mv $BOOT/EFI/Boot/syslinux.efi $BOOT/EFI/Boot/bootx64.efi +cat $BOOT/syslinux.cfg | sed -r "s:/$LIVEKITNAME/boot/vesa::" > $BOOT/EFI/Boot/syslinux.cfg + # create compressed 01-core.sb COREFS="" for i in $MKMOD; do