mirror of
https://github.com/HEYAHONG/linux-live.git
synced 2025-10-14 02:07:48 +08:00
UEFI Boot support (#84)
* EFI bootloader files need to be in /EFI/Boot in order to be portable * EFI bootloader files need to be in /EFI/Boot on portable media to get picked up, I've retained the mixture of line endings in these files as requested (https://github.com/Tomas-M/linux-live/pull/84#issuecomment-623150025) * Again, these files need to be in /EFI/Boot to be portable * There will be an EFI structure under boot that is consistent with what EFI requires. Additionally, the syslinux build for EFI doesn't support the vesamenu properly at currently so we have to use the non-vesa menu * EFI executables from syslinux 6.03 * to support the VESA menu we need additional files * These are the syslinux 6.04pre-1 files that support vesamenu on EFI. All other builds are broken and all the post pre-1 builds are known to be unreliable according to the syslinux mailing list
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
BIN
bootfiles/EFI/Boot/ldlinux.e64
Normal file
BIN
bootfiles/EFI/Boot/ldlinux.e64
Normal file
Binary file not shown.
BIN
bootfiles/EFI/Boot/libcom32.c32
Executable file
BIN
bootfiles/EFI/Boot/libcom32.c32
Executable file
Binary file not shown.
BIN
bootfiles/EFI/Boot/libutil.c32
Normal file
BIN
bootfiles/EFI/Boot/libutil.c32
Normal file
Binary file not shown.
BIN
bootfiles/EFI/Boot/menu.c32
Normal file
BIN
bootfiles/EFI/Boot/menu.c32
Normal file
Binary file not shown.
BIN
bootfiles/EFI/Boot/syslinux.efi
Executable file
BIN
bootfiles/EFI/Boot/syslinux.efi
Executable file
Binary file not shown.
BIN
bootfiles/EFI/Boot/vesamenu.c32
Executable file
BIN
bootfiles/EFI/Boot/vesamenu.c32
Executable file
Binary file not shown.
@@ -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.
|
||||
|
@@ -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"
|
||||
|
9
build
9
build
@@ -49,11 +49,18 @@ if [ "$INITRAMFS" != "" ]; then
|
||||
mv "$INITRAMFS" $BOOT/initrfs.img
|
||||
fi
|
||||
|
||||
cp bootfiles/* $BOOT
|
||||
# BIOS / MBR booting
|
||||
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
|
||||
mkdir -p $BOOT/EFI/Boot
|
||||
cp bootfiles/EFI/Boot/syslinux.efi $BOOT/EFI/Boot/bootx64.efi
|
||||
cp bootfiles/EFI/Boot/{ldlinux.e64,menu.c32,libutil.c32,vesamenu.c32,libcom32.c32} $BOOT/EFI/Boot
|
||||
cat $BOOT/syslinux.cfg | sed -r "s:/$LIVEKITNAME/boot/vesamenu:vesamenu:" > $BOOT/EFI/Boot/syslinux.cfg
|
||||
|
||||
# create compressed 01-core.sb
|
||||
COREFS=""
|
||||
for i in $MKMOD; do
|
||||
|
Reference in New Issue
Block a user