pxe

apt install syslinux pxelinux tftpd-hpa nfs-kernel-server lighttpd -y
vim /etc/default/tftpd-hpa
TFTP_OPTIONS="--secure --ipv4"
mkdir --p /netboot/tftp/pxelinux.cfg
mkdir -p /netboot/pxe/configs
mkdir -p /netboot/pxe/data
chmod -R 777 /netboot/pxe
chown -R www-data:www-data pxe
ssh-keygen
cp ~/.ssh/id_rsa.pub /netboot/pxe/sshkeys.pub
mkdir -p /netboot/nfs/
vim /etc/exports
/netboot/nfs/  *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure,no_subtree_check)
exportfs -a
echo "Setting up NFS for local network"
echo "/netboot/pxe 10.0.9.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)" >> /etc/exports
echo "Restarting NFS service"
exportfs -ra 
vim /etc/lighttpd/lighttpd.conf
server.document-root = "/netboot/pxe"
dir-listing.activate        = "enable"
service lighttpd restart
cd /netboot/pxe/
wget http://nl.alpinelinux.org/alpine/v3.9/releases/x86_64/netboot/vmlinuz-vanilla
wget http://nl.alpinelinux.org/alpine/v3.9/releases/x86_64/netboot/modloop-vanilla
wget http://nl.alpinelinux.org/alpine/v3.9/releases/x86_64/netboot/initramfs-vanilla
cp -v /usr/lib/PXELINUX/pxelinux.0 /netboot/tftp/
cp -v  /usr/lib/syslinux/modules/bios/{ldlinux.c32,libcom32.c32,libutil.c32,vesamenu.c32} /netboot/tftp/
touch /netboot/tftp/pxelinux.cfg/default
vim /netboot/tfpt/pxelinux.cfg/default
DEFAULT vesamenu.c32
PROMPT 0
TIMEOUT 300
MENU TITLE PXE Network Boot Menu
LABEL local
MENU LABEL Von Festplatte starten
MENU DEFAULT
LOCALBOOT 0
LABEL memtest
MENU LABEL Speichertest mit memtest86+ v4.20
KERNEL memtest
wget http://releases.ubuntu.com/18.04/ubuntu-18.04.3-desktop-amd64.iso
mount -o loop ubuntu-18.04.3-desktop-amd64.iso /mnt
mkdir -v /netboot/{nfs,tftp}/ubuntu1804
cp -Rfv /mnt/* /netboot/nfs/ubuntu1804/
cp -v /mnt/casper/{vmlinuz,initrd} /netboot/tftp/ubuntu1804/
chmod -Rfv 777 /netboot
umount /mnt
rm ubuntu-18.04.3-desktop-amd64.iso
vim /netboot/tftp/pxelinux.cfg/default
default vesamenu.c32
 
label install1
menu label ^Install Ubuntu 18.04 LTS Desktop
menu default
kernel ubuntu1804/vmlinuz
append initrd=ubuntu1804/initrd boot=casper netboot=nfs nfsroot=super41.home:/
netboot/nfs/ubuntu1804/ splash toram ---

pxe alpine