Add uefi support for pxe boot

close #15
Add the uefi files in subdir and symlinks to avoid files duplication.
This commit is contained in:
Jeremy Gardais 2018-02-12 17:29:08 +01:00
parent 96b74ca2d9
commit 1654bf7683
38 changed files with 41 additions and 5 deletions

View File

@ -11,7 +11,7 @@
## Overview
All needed files to set up a PXE server.
All needed files to set up a PXE server for both standard bios and UEFI (32b and 64b).
## Description
@ -20,24 +20,48 @@ Use some bootloaders files provide by:
* `pxelinux` debian package:
* gpxelinux.0
* pxelinux.0
* `syslinux-efi` debian package:
* syslinux.efi
* `syslinux-common` debian package:
* chain.c32
* ldlinux.c32
* ldlinux.e32
* ldlinux.e64
* libcom32.c32
* libutil.c32
* menu.c32
* reboot.c32
* vesamenu.c32
To get those files from the packages of your repositories:
* To get those files from the packages of your repositories:
``` sh
mkdir -p temp_pxe_files
cd temp_pxe_files
aptitude download pxelinux syslinux-common
mkdir bios efi32 efi64
aptitude pxelinux syslinux-common syslinux-efi
ar p pxelinux*.deb data.tar.xz | tar xJ -C . --strip-components=4 ./usr/lib/PXELINUX/{g,}pxelinux.0
ar p syslinux-common*.deb data.tar.xz | tar xJ -C . --strip-components=6 ./usr/lib/syslinux/modules/bios/{chain,ldlinux,libcom32,libutil,menu,reboot,vesamenu}.c32
ar p pxelinux*.deb data.tar.xz | tar xJ -C bios/ --strip-components=4 ./usr/lib/PXELINUX/{g,}pxelinux.0
ar p syslinux-efi*.deb data.tar.xz | tar xJ -C efi32/ --strip-components=5 ./usr/lib/SYSLINUX.EFI/efi32/syslinux.efi
ar p syslinux-efi*.deb data.tar.xz | tar xJ -C efi64/ --strip-components=5 ./usr/lib/SYSLINUX.EFI/efi64/syslinux.efi
ar p syslinux-common*.deb data.tar.xz | tar xJ -C . --strip-components=6 ./usr/lib/syslinux/modules/bios/{chain,ldlinux,libcom32,libutil,menu,reboot,vesamenu}.*
ar p syslinux-common*.deb data.tar.xz | tar xJ -C bios/ --strip-components=6 ./usr/lib/syslinux/modules/bios/{chain,ldlinux,libcom32,libutil,menu,reboot,vesamenu}.*
ar p syslinux-common*.deb data.tar.xz | tar xJ -C efi32/ --strip-components=6 ./usr/lib/syslinux/modules/efi32/{chain.c32,ldlinux.e32,libcom32.c32,libutil.c32,menu.c32,reboot.c32,vesamenu.c32}
ar p syslinux-common*.deb data.tar.xz | tar xJ -C efi64/ --strip-components=6 ./usr/lib/syslinux/modules/efi64/{chain.c32,ldlinux.e64,libcom32.c32,libutil.c32,menu.c32,reboot.c32,vesamenu.c32}
```
The MD5 checksum can mismatch between the files from this repo and those from Debian's packages.
* The MD5 checksum can mismatch between the files from this repo and those from Debian's packages.
* Then create symlinks to avoid to duplicate files:
``` sh
for DIR in bios efi32 efi64; do
ln -s ../config "${DIR}"
ln -s ../installer "${DIR}"
ln -s ../preseed "${DIR}"
ln -s ../pxelinux.cfg "${DIR}"
done
```
### Configuration files
Contains the files which defines the PXE menu. The [first one][main menu.cfg] will:

BIN
bios/chain.c32 Normal file

Binary file not shown.

1
bios/config Symbolic link
View File

@ -0,0 +1 @@
../config

BIN
bios/gpxelinux.0 Normal file

Binary file not shown.

1
bios/installer Symbolic link
View File

@ -0,0 +1 @@
../installer

BIN
bios/ldlinux.c32 Normal file

Binary file not shown.

BIN
bios/libcom32.c32 Normal file

Binary file not shown.

BIN
bios/libutil.c32 Normal file

Binary file not shown.

BIN
bios/menu.c32 Normal file

Binary file not shown.

1
bios/preseed Symbolic link
View File

@ -0,0 +1 @@
../preseed

BIN
bios/pxelinux.0 Normal file

Binary file not shown.

1
bios/pxelinux.cfg Symbolic link
View File

@ -0,0 +1 @@
../pxelinux.cfg

BIN
bios/reboot.c32 Normal file

Binary file not shown.

BIN
bios/vesamenu.c32 Normal file

Binary file not shown.

BIN
efi32/chain.c32 Normal file

Binary file not shown.

1
efi32/config Symbolic link
View File

@ -0,0 +1 @@
../config

1
efi32/installer Symbolic link
View File

@ -0,0 +1 @@
../installer

BIN
efi32/ldlinux.e32 Normal file

Binary file not shown.

BIN
efi32/libcom32.c32 Normal file

Binary file not shown.

BIN
efi32/libutil.c32 Normal file

Binary file not shown.

BIN
efi32/menu.c32 Normal file

Binary file not shown.

1
efi32/preseed Symbolic link
View File

@ -0,0 +1 @@
../preseed

1
efi32/pxelinux.cfg Symbolic link
View File

@ -0,0 +1 @@
../pxelinux.cfg

BIN
efi32/reboot.c32 Normal file

Binary file not shown.

BIN
efi32/syslinux.efi Normal file

Binary file not shown.

BIN
efi32/vesamenu.c32 Normal file

Binary file not shown.

BIN
efi64/chain.c32 Normal file

Binary file not shown.

1
efi64/config Symbolic link
View File

@ -0,0 +1 @@
../config

1
efi64/installer Symbolic link
View File

@ -0,0 +1 @@
../installer

BIN
efi64/ldlinux.e64 Normal file

Binary file not shown.

BIN
efi64/libcom32.c32 Normal file

Binary file not shown.

BIN
efi64/libutil.c32 Normal file

Binary file not shown.

BIN
efi64/menu.c32 Normal file

Binary file not shown.

1
efi64/preseed Symbolic link
View File

@ -0,0 +1 @@
../preseed

1
efi64/pxelinux.cfg Symbolic link
View File

@ -0,0 +1 @@
../pxelinux.cfg

BIN
efi64/reboot.c32 Normal file

Binary file not shown.

BIN
efi64/syslinux.efi Normal file

Binary file not shown.

BIN
efi64/vesamenu.c32 Normal file

Binary file not shown.