A quick 'n dirty tutorial on how to setup a network install server for installing Kali from PXE Boot.
So, let's dive right into it. Sometimes it's nicer to be able to simply press some kind of F-Key, and boot over the network, and start installing, instead of runnng running around with boot media like CD-ROM's and USB flashdrives. Yes' I'm lazy, I know :)
First, a warning. If you allready have a DHCP server running, then turn it off, we're going to add out own, and two DHCP servers on the same network, not configured for it, is NOT a good idea, so..you've been warned :)
Next, we need to figure out, what DHCP range we need, most times 192.168.x.x will work, so that's what I'll use here. Yours can be different, and I leave it up to you to figure that part out :)
So, jump unto a Kali box, and download what we need to it, from the official Kali mirrors. We need the netboot files, and we grab them like this.
# for 64 bit systems:
wget http://http.kali.org/kali/dists/kali-rolling/main/installer-amd64/current/images/netboot/netboot.tar.gz
# for 32 bit systems:
wget http://http.kali.org/kali/dists/kali-rolling/main/installer-i386/current/images/netboot/netboot.tar.gz
PLEASE, note that the URL will depend on what system you're installing. It's most likely a 64 Bit system, like most are today, so grab that. The 32 Bit, are for old legacy systems, and it's not very likely you have one of those.
Next, we need to setup a directory under the /, like so.
mkdir -p /tftpboot/
Unpack the tar file to that directory, and let's move on, and install the dnsmasq service, and configure it.
apt install dnsmasq
The next we need to do, is configure the server, so open the VI editor, with the config file /etc/dnsmasq.conf.
Normally, every option will be disabled, so jump down to the bottom of /etc/dnsmasq.conf, and type this out, and when you're done, save the file.
interface=eth0
dhcp-range=192.168.101.100,192.168.101.200,12h
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/tftpboot/
dhcp-option=3,192.168.101.1
dhcp-option=6,8.8.8.8,8.8.4.4
NOTE : The settings here, are an example. Adjust them to your network. Especially dhcp-option 3 and 6. 3 is the network gateway, and 6 is dns servers, here it's Googles.
DHCP-Range is what addresses you'll want the machines to have, and the lease time. It have to be ranges that fit into your network, so adjust accordingly :)
The last thing we need, is starting the service with
systemctl start dnsmasq
OR
systemctl restart dnsmasq
Now, find some machine you have in storage, figure out how to PXE boot it, and jump in. Normally that's the easy part.
It' should be fairly simple, and from there on, it's simply a matter of going through the installer the normal way. Do note that a network install can be slower, but it will finish eventually, it just needs time.
Have fun :)