Table of contents /tftpboot /tftpboot/logsIf DHCP is handled by Mikrotik routers and TFTP is on other server, set:
Next ServerBoot File Name (in IP / DHCP Server / Networks.)
/ip dhcp-server network print detail... next-server=192.168.10.14 boot-file-name="pxelinux.0" ...#READMESee the files in the doc directory for documentation about SYSLINUX: syslinux.txt - Usage instructions; manual. distrib.txt - For creators of Linux distributions. pxelinux.txt - Documentation specific to PXELINUX. isolinux.txt - Documentation specific to ISOLINUX. extlinux.txt - Documentation specific to EXTLINUX. menu.txt - About the menu systems. usbkey.txt - About using SYSLINUX on USB keys. memdisk.txt - Documentation about MEMDISK.Also see the files: NEWS - List of changes from previous releases. TODO - About features planned for future releases. COPYING - For the license terms of this software.# From Syslinux 6.0 onwards there is support for three different firmware backends: BIOS, 32-bit EFI and 64-bit EFI.We use the BIOS backend from ../syslinux-x.xx/bios/...
# on the TFTP server:# create the directory "/tftpboot/pxelinux.cfg"# copy the following files to "/tftpboot":# pxelinux.0 - from the Syslinux distributioncp /tmp/syslinux-6.03/bios/core/pxelinux.0 /tftpboot# any kernel or initrd images you want to boot# (we will do this later)# ...# THE SIMPLE MENU SYSTEM is a single module located at# com32/menu/vesamenu.c32 (graphical) and# com32/menu/menu.c32 (text mode only).# It uses the same configuration file as the regular Syslinux command line, and displays all the LABEL statements.## Make sure menu.c32 and vesamenu.c32 is in the pxelinux.0 directory.cp -r /tmp/syslinux-6.03/bios/com32/menu/* /tftpboot/pxelinux.0# PXELINUX will search for different config files on the boot server in some way:# Ultimately, it will try looking for a file named "default" (in lower case) # in "/tftpboot/pxelinux.cfg" directory# see /syslinux-x.xx/doc/pxelinux.txt# create file "/tftpboot/pxelinux.cfg/deafault"For Raspberry Pi: PXE Boot from Qnap NAS
sudo cat /sys/class/net/eth0/address00:e0:4c:53:44:58md /pxeroot/4c534458/pxeroot directory from SD card ...cp -r /path/from/raspi/SD card/boot/* /tftpbootscript pxe.sh
#!/bin/sh#pxe.shPXECONF=pxeroot/confif ! [ -e $PXECONF/dhcpd.leases ] ; then touch $PXECONF/dhcpd.leases ; fiif ! [ -L /bin/pxe.sh ] ; then ln -s $PXECONF/pxe.sh /bin/pxe.sh >null 2>&1 ; fistart(){echo `date` Start APP "PXE" pxe.sh >> /var/log/pxe.log#======================================================================dhcpd -cf $PXECONF/dhcpd.conf -lf $PXECONF/dhcpd.leasessleep 1if [ -n "$(pidof dhcpd)" ]thenecho -e " \033[32m OK - dhcpd läuft \033[0m "elseecho -e "\033[31m ERROR - dhcpd läuft nicht \033[0m " exit 1fiif [ -e $PXECONF/opentftpd.log ] ; then rm $PXECONF/opentftpd.log ; fiopentftpd -i $PXECONF/opentftpd.ini -l $PXECONF/opentftpd.log#================================================}stop(){echo `date` Stop pxe.sh >> /var/log/pxe.log#====================================================================echo "Shutting down opentftpd and dhcpd"/bin/kill -9 `/bin/pidof opentftpd`/bin/kill -9 `/bin/pidof dhcpd`#================================================}# you do not need to edit this linescase "$1" instart)start;;stop)stop;;restart)# Restarting the Daemon$0 stopsleep 1$0 start;;*)## If no parameters are given, print which are avaiable.echo "Usage: $0 {start|stop|restart}"exit 1;;esacexit/pxeroot├── 4c534458 -> raspi/#1/boot├── bootcode.bin├── ccfc0bd9 -> raspi/#2/boot├── conf│ ├── dhcpd.conf│ ├── opentftpd.ini│ └── pxe.sh└── raspi├── Pi#1│ └── boot│└── Pi#2└── boot/tftpboot/pxelinux.cfg
#/pxeroot/pxelinux.cfg/defaultUI ubuntu-installer/i386/boot-screens/vesamenu.c32prompt 10menu title Meine Installationsauswahltimeout 6000label lokal menu label Booten von lokaler Festplatte LOCALBOOT 0LABEL ubuntu11 MENU LABEL Ubuntu 11.4 NetInstall kernel ubuntu-installer/i386/boot-screens/vesamenu.c32 append ubuntu-installer/i386/boot-screens/menu.cfgFor Arch Linux:
/pxeroot/arch/boot/x86_64/vmlinuz/pxeroot/arch/boot/intel_ucode.img/pxeroot/arch/boot/amd_ucode.img/pxeroot/arch/boot/x86_64/archiso.imgsudo md /tmp/logssudo mount.cifs //192.168.10.14/pxeroot/logs /tmp/logs ro,nounix,iocharset=utf8,file_mode=0777,cache=nonetail -F -n 30 /tmp/logs/opentftpd.log