allow booting;
allow bootp;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.xxx 192.168.2.xxx;
option broadcast-address 192.168.2.255;
option routers 192.168.2.xxx;
option domain-name-servers 192.168.2.xxx;
filename "/pxelinux.0";
}
# force the client to this ip for pxe.
# This is only necessary assuming you want to send different images to different computers.
host pxe_client {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.2.xxx;
}
Copy the /etc/initramfs-tools to /etc/initramfs-pxe and change the boot flag using initrramfs.conf in /etc/initramfs-pxe folder rather than modifying the original
cp -r /etc/initramfs-tools /etc/initramfs-pxe
Now edit the file
nano /etc/initramfs-pxe/initramfs.conf
Find MODULES=most and replace it with MODULES=netboot, BOOT=local with BOOT=nfs, and DEVICE= DEVICE=eth0
Now run mkinitramfs
Now boot the client to PXE and make sure you can login with view user. If everything looks good then install desktop if needed, there are two ways to install it.
1) Install it in chroot enviornment, (you might ran into some issues)
2) Add view to sudo group chroot /nfs and add view to sudo group usermod -a -G sudo view && exit. Boot the client to PXE. Login as view user and make him root sudo bash and install packages you like. I used the second method and recommend using it.