Saturday, August 14, 2010

TFTP Server Installation in Linux

I have provided the simple step by step commands to setup TFTP Server in Linux

Install tftp-server package

mkdir /tftpboot
mkdir /tftpboot/linux-install
cd /tftpboot/linux-install/
cp /usr/lib/syslinux/pxelinux.0
mkdir (os-identifier) --> create no of dir for no of distro's
mkdir msgs
mkdir pxelinux.cfg
cd pxelinux.cfg
vi default ---> provides boot menu configuration
copy /images/pxeboot/vmlinuz and initrd to /tftpboot/linux-install/

Note : do the above step for all different distributions

vi /etc/xinetd.d/tftp ---> Enable tftp if disabled

service xinetd restart
chkconfig --level 345 xinetd on
chkconfig --level 345 tftp on


Configuring DHCP to Boot From TFTP:
------------------------------------

In Linux,
----------
1. vi /etc/dhcpd.conf
2.add following

allow booting;
allow unknown clients;
allow bootp;

network xx.xx.xx.xx xx.xx.xx.xx {

tftp-server "servername"
bootfile "linux-install/pxelinux.0"

}

In Windows,
-------------
open dhcp console... Click Configure Options..

set the following options

bootserver --> TFTP Server IP
bootfile ---> "linux-install/pxelinux.0"
bootserver name ---> your tftpserver name


boot the client through pxe booting... You will get the boot menu, which you configured in server