DHCP hands out IP address (205.215.76.148) and filename (pxelinux.0)


aptitude --without-recommends install tftpd-hpa
sed -i -e 's/^RUN_DAEMON="no"$/RUN_DAEMON="yes"/g' /etc/default/tftpd-hpa
/etc/init.d/tftpd-hpa start

mkdir pxe ; cd pxe
wget --no-check-certificate https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz
tar -xzf syslinux-6.03.tar.gz
cd syslinux-6.03
mkdir -p /var/lib/tftpboot/pxelinux/bios /var/lib/tftpboot/pxelinux/efi64
cp --preserve=timestamps bios/core/lpxelinux.0 /var/lib/tftpboot/pxelinux/bios/
ln -sf lpxelinux.0 /var/lib/tftpboot/pxelinux/bios/pxelinux.0
cp --preserve=timestamps bios/com32/elflink/ldlinux/ldlinux.c32 /var/lib/tftpboot/pxelinux/bios/
cp --preserve=timestamps bios/com32/modules/pxechn.c32 /var/lib/tftpboot/pxelinux/bios/
cp --preserve=timestamps bios/com32/modules/poweroff.c32 /var/lib/tftpboot/pxelinux/bios/
cp --preserve=timestamps bios/com32/modules/reboot.c32 /var/lib/tftpboot/pxelinux/bios/
cp --preserve=timestamps bios/com32/chain/chain.c32 /var/lib/tftpboot/pxelinux/bios/
cp --preserve=timestamps bios/com32/menu/menu.c32 /var/lib/tftpboot/pxelinux/bios/
cp --preserve=timestamps bios/com32/lib/libcom32.c32 /var/lib/tftpboot/pxelinux/bios/
cp --preserve=timestamps bios/com32/libutil/libutil.c32 /var/lib/tftpboot/pxelinux/bios/
cp --preserve=timestamps bios/memdisk/memdisk /var/lib/tftpboot/pxelinux/
cp --preserve=timestamps efi64/efi/syslinux.efi /var/lib/tftpboot/pxelinux/efi64/
cp --preserve=timestamps efi64/com32/elflink/ldlinux/ldlinux.e64 /var/lib/tftpboot/pxelinux/efi64/
cp --preserve=timestamps efi64/com32/modules/poweroff.c32 /var/lib/tftpboot/pxelinux/efi64/
cp --preserve=timestamps efi64/com32/modules/reboot.c32 /var/lib/tftpboot/pxelinux/efi64/
cp --preserve=timestamps efi64/com32/chain/chain.c32 /var/lib/tftpboot/pxelinux/efi64/
cp --preserve=timestamps efi64/com32/menu/menu.c32 /var/lib/tftpboot/pxelinux/efi64/
cp --preserve=timestamps efi64/com32/lib/libcom32.c32 /var/lib/tftpboot/pxelinux/efi64/
cp --preserve=timestamps efi64/com32/libutil/libutil.c32 /var/lib/tftpboot/pxelinux/efi64/
cd ..
mkdir /var/lib/tftpboot/boot
wget http://www.memtest.org/download/5.01/memtest86+-5.01.bin.gz
gzip -d memtest86+-5.01.bin.gz
cp --preserve=timestamps memtest86+-5.01.bin /var/lib/tftpboot/boot/memtest86+
mkdir /var/lib/tftpboot/pxelinux.cfg
cat > /var/lib/tftpboot/pxelinux.cfg/default
DEFAULT menu.c32
PROMPT 0
 
MENU TITLE PNW PXE Boot Menu
MENU INCLUDE pxelinux.cfg/graphics.conf
MENU AUTOBOOT Starting Local System in # seconds
 
LABEL bootlocal
  MENU LABEL ^Boot local drive
  MENU DEFAULT
  LOCALBOOT 0
TIMEOUT 80
TOTALTIMEOUT 9000
 
LABEL testmenu
  MENU LABEL ^Test Menu
  KERNEL menu.c32
  APPEND pxelinux.cfg/test.menu
^D

cat > /var/lib/tftpboot/pxelinux.cfg/test.menu
MENU TITLE Test Menu
MENU INCLUDE pxelinux.cfg/graphics.conf
 
LABEL mainmenu
  MENU LABEL ^BACK (to main menu)
  KERNEL menu.c32
  APPEND pxelinux.cfg/default
 
LABEL memtest
  MENU LABEL ^Memtest86+
  KERNEL boot/memtest86+

LABEL fog
  MENU LABEL ^FOG server
  KERNEL boot/fog/undionly.0

LABEL clonedeploy
  MENU LABEL ^CloneDeploy
  KERNEL pxechn.c32
  APPEND 205.215.68.132::pxeboot.0
^D

# NOTE: probably should customize this - I just borrowed this from an example
cat > /var/lib/tftpboot/pxelinux.cfg/graphics.conf
MENU COLOR TABMSG    37;40 	#80ffffff #00000000
MENU COLOR HOTSEL    30;47 	#40000000 #20ffffff
MENU COLOR SEL       30;47 	#40000000 #20ffffff
MENU COLOR SCROLLBAR 30;47 	#40000000 #20ffffff
MENU MASTER PASSWD yourpassword
MENU WIDTH 80
MENU MARGIN 22
MENU PASSWORDMARGIN 26
MENU ROWS 6
MENU TABMSGROW 15
MENU CMDLINEROW 15
MENU ENDROW 24
MENU PASSWORDROW 12
MENU TIMEOUTROW 13
MENU VSHIFT 6
MENU PASSPROMPT Enter Password:
NOESCAPE 1
ALLOWOPTIONS 0
^D

scp -p tdobes@205.215.68.131:/tftpboot/default.ipxe tdobes@205.215.68.131:/tftpboot/undionly.kpxe .
mkdir /var/lib/tftpboot/boot/fog/
cp --preserve=timestamps undionly.kpxe /var/lib/tftpboot/boot/fog/
cp --preserve=timestamps default.ipxe /var/lib/tftpboot/boot/fog/
ln -s undionly.kpxe /var/lib/tftpboot/boot/fog/undionly.0
ln -s boot/fog/default.ipxe /var/lib/tftpboot/default.ipxe


side-note:  atftpd is an alternative.  It supports multicast, but it's unclear whether that would work here.
computer/tftp_boot_server.txt · Last modified: 2016/08/15 04:58 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS