|
||||||||||||||||||||||||||||||||||||||||
TFTP SetupThe Quickstart server requires that a small boot images be initiated to the client server to be booted. This entails setting up a TFTP boot service and images. The follwing describes how to install and configure this service. Note that a basic DHCP server must have already been installed and configured. See Basic DHCP Server Setup. Steps
tfpboot File Setup
PrerequisitUse wget to obtain copies of vmlinuz and initrd.img for the linux version that is to be installed: [root@kickstart ~]# wget http://mirror.stanford.edu/yum/pub/centos/5.9/os/x86_64/isolinux/vmlinuz [root@kickstart ~]# wget http://mirror.stanford.edu/yum/pub/centos/5.9/os/x86_64/isolinux/initrd.img Install tftp ServerPerform yum to install the tftp Server software (e.g. yum -y install tftp-server): [root@kickstart ~]# yum install tftp-server Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.hmc.edu * extras: mirrors.easynews.com * updates: mirror.5ninesolutions.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package tftp-server.x86_64 0:0.49-2.el5.centos set to be updated --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Installing: tftp-server x86_64 0.49-2.el5.centos base 32 k Transaction Summary ========================================================================================== Install 1 Package(s) Upgrade 0 Package(s) Total download size: 32 k Is this ok [y/N]: y Downloading Packages: tftp-server-0.49-2.el5.centos.x86_64.rpm | 32 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : tftp-server 1/1 Installed: tftp-server.x86_64 0:0.49-2.el5.centos Complete! [root@kickstart ~]# Edit the tftp Configuration FileEdit /etc/xinetd.d/tftp and change the 'disable' parameter to 'no': # default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 } Start the xinetd ServiceStart the xinetd service with the service command (e.g service xinetd start) [root@kickstart ~]# service xinetd start
Starting xinetd: [ OK ]
[root@kickstart ~]#
Install syslinuxSyslinux is a collection of boot loaders for the Linux operating system. Install this pacakge using yum (yum install syslinux): [root@kickstart ~]# yum install syslinux Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.hmc.edu * extras: mirrors.easynews.com * updates: mirror.5ninesolutions.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package syslinux.x86_64 0:3.11-7 set to be updated --> Finished Dependency Resolution Dependencies Resolved ========================================================================================== Package Arch Version Repository Size ========================================================================================== Installing: syslinux x86_64 3.11-7 base 474 k Transaction Summary ========================================================================================== Install 1 Package(s) Upgrade 0 Package(s) Total download size: 474 k Is this ok [y/N]: y Downloading Packages: syslinux-3.11-7.x86_64.rpm | 474 kB 00:01 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : syslinux 1/1 Installed: syslinux.x86_64 0:3.11-7 Complete! [root@kickstart ~]# Create the TFTP Directory LayoutIn the root directory, create the tftpboot directory and copy pxelinux software [root@kickstart ~]# cd / [root@kickstart /]# mkdir -p /tftpboot/images [root@kickstart /]# mkdir -p /tftpboot/pxelinux.cfg [root@kickstart /]# cp /usr/share/syslinux/menu.c32 /tftpboot [root@kickstart /]# cp /usr/share/syslinux/pxelinux.0 /tftpboot [root@kickstart /]# PrerequisitUse wget to obtain copies of vmlinuz and initrd.img for the linux version that is to be installed: (this is from a public site). You can get this from the OS ISO or from an internal OS install site. [root@kickstart ~]# wget http://www.gtlib.gatech.edu/pub/centos/5.8/os/x86_64/isolinux/vmlinuz [root@kickstart ~]# wget http://www.gtlib.gatech.edu/pub/centos/5.8/os/x86_64/isolinux/initrd.img Copy vmlinux and initrd.imgCopy vmlinuz and initrd.img to /tftpboot/images [root@kickstart ~]# cp vmlinuz /tftpboot/images/ [root@kickstart ~]# cp initrd.img /tftpboot/images/ [root@kickstart ~]# ls -l /tftpboot/images/ total 14140 -rw-r--r-- 1 root root 12340659 Mar 23 19:56 initrd.img -rw-r--r-- 1 root root 2115772 Mar 23 19:56 vmlinuz [root@kickstart ~]# Create Default PXE Configuration FileCreate a default pxe configuration file in /tftpboot/pxelinux.cfg/ directory using a text editor [root@kickstart ~]# vi /tftpboot/pxelinux.cfg/default consisting of ## /tftpboot/pxelinux.cfg/default ## default menu.c32 prompt 0 timeout 10 MENU TITLE PXE Menu LABEL CentOS 5.8 x86_64 MENU LABEL CentOS 5.8 x86_64 KERNEL images/vmlinuz append initrd=images/initrd.img linux ks=http://192.168.201.1/OS_IMAGES/kickstart/test.cfg NOTE: The 192.168.201.1 address assumes you are going to use the dhcpd/tftpboot server to contain the OS install file with a http server Open Firewall PortsOpen Firewall ports 67, 68 and 69:
Either use command line: [root@kickstart ~]# vi /etc/sysconfig/iptables
# -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 67 -j ACCEPT
# -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 68 -j ACCEPT
# -A RH-Firewall-1-INPUT -m udp -p udp --dport 69 -j ACCEPT [root@kickstart ~]
# service iptables restart Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_n[ OK ]
[root@kickstart ~]#
Or run the GUI (e.g. system-config-securitylevel) TestingStart up a new server and defined it to look for a pxe network boot. You should see the following screen followed by the PXE Menu that was defined.
Note:
|
||||||||||||||||||||||||||||||||||||||||
Click for more info |