Listing 1:

port=0 # DNS uitzetten
dhcp-range=192.168.122.0,proxy # proxy op dit netwerk
dhcp-boot=pxelinux.0
pxe-service=x86PC,"Network Boot",pxelinux
enable-tftp
tftp-root=/srv/tftp

 

Listing 2:

# Listing 2: directory-boom voor tftp
sudo mkdir -p /srv/tftp/{pxelinux.cfg,debian,devuan,kali}
sudo cp /usr/lib/syslinux/modules/bios/* /srv/tftp/

Listing 3:

default menu.c32
prompt 0

LABEL Reboot computer
        COM32 reboot.c32

LABEL Install Debian
        kernel debian/vmlinuz
        append vga=788 initrd=debian/initrd.gz

LABEL Install Devuan
        kernel devuan/vmlinuz
        append vga=788 initrd=debian/initrd.gz

LABEL Install Kali Linux
        kernel kali/vmlinuz
        append vga=788 initrd=kali/initrd.gz

Listing 4:

#!/bin/sh

# Debian bestanden
sudo curl ftp.nluug.nl/pub/os/Linux/distr/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/pxelinux.0 -o /srv/tftp/pxelinux.0  
sudo curl ftp.nluug.nl/pub/os/Linux/distr/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux -o /srv/tftp/debian/vmlinuz
sudo curl ftp.nluug.nl/pub/os/Linux/distr/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz -o /srv/tftp/debian/initrd.gz

# Devuan bestanden
sudo curl https://pkgmaster.devuan.org/devuan/dists/chimaera/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux -o /srv/tftp/devuan/vmlinuz
sudo curl https://pkgmaster.devuan.org/devuan/dists/chimaera/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz -o /srv/tftp/devuan/initrd.gz

Listing 5:

#!/bin/sh

curl http://http.kali.org/kali/dists/kali-rolling/main/installer-amd64/current/images/netboot/netboot.tar.gz -o /tmp/netboot.tar.gz
cd /tmp
tar -zxvf netboot.tar.gz
cd debian-installer/amd64
sudo cp linux /srv/tftp/kali/vmlinuz
sudo cp initrd.gz /srv/tftp/kali/
cd
rm -f /tmp/netboot.tar.gz
rm -rf /tmp/debian-installer