Agenda
If you have linux server, and you don't have USB stick to boot PC (merry! Talking horse!) then you can boot your PC over The network.
I assume we are using Ubuntu 14.04 server. Installation on other linux distributions will be pretty much the same.
Second thing is: I'm using /tftpboot directory as workdir.
Preparing
Faster and less crazy way
1. We need to instal isc-dhcp-server, and configure the following
host BootMeJently {
hardware ethernet ;
fixed-address 192.168.0.100;
filename "pxelinux.0";
next-server 192.168.0.1;
option routers 192.168.0.1;
}
Now, theese two lines can be added either to whole dynamic address pool or to single host. Whichever suits your needs better. Everything elese you can configure as usual.
2. Next we'll need tftpd-hpa package.
We should make config file at /etc/default/tftpd-hpa as follows
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
Right, don't forget to restart tftp server and open UDP 69 port on your firewall (iptables in my case).
3. Now we need to install syslinux package.
Next do the following
mkdir -p /tftpboot/pxelinux.cfg
mkdir /tftpboot/win
mkdir -p /tftpboot/debian/wheezy
cd /usr/lib/syslinux
cp menu.c32 pxelinux.0 memdisk /tftpboot
cd /tftpboot
vim /tftpboot/pxelinux.cfg/default
download debian files: initrd.gz and linux, for example from here: http://ftp.debian.org/debian/dists/wheezy/main/installer-i386/current/images/netboot/debian-installer/i386/
And put your windows iso files into win folder.
then fill /tftpboot/pxelinux.cfg/default with following:
default menu.c32
menu title PXE Network Boot Menu
prompt 0
timeout 1200
label Boot from first hard disk
localboot 0x80
############### OS DEBIAN ########
menu begin
menu title Debian
label ..
menu exit
LABEL wheezy_i386_install
kernel debian/wheezy/i386/linux
append vga=normal initrd=debian/wheezy/i386/initrd.gz --
LABEL wheezy_i386_linux
kernel debian/wheezy/i386/linux
append vga=normal initrd=debian/wheezy/i386/initrd.gz --
LABEL wheezy_i386_expert
kernel debian/wheezy/i386/linux
append priority=low vga=normal initrd=debian/wheezy/i386/initrd.gz --
LABEL wheezy_i386_rescue
kernel debian/wheezy/i386/linux
append vga=normal initrd=debian/wheezy/i386/initrd.gz rescue/enable=true --
menu end
##################################
############## OS Windows ########
menu begin
menu title Windows
label ..
menu exit
LABEL Windows10 installer
kernel memdisk
initrd win/win10.iso
append iso
LABEL WindowsXP installer
kernel memdisk
initrd win/winxpsp3.iso
append iso raw
menu end
##################################
Save everything.