Centos Fedora: PXE boot server setup

Centos Fedora: PXE boot server setup

Centos Fedora: PXE boot server setup 150 150 Roderick Derks

* yum install tftp-server

* vi /etc/xinetd.d/tftp and change disable to 'no' and check root path for tftp server

disable = no server_args = -s /tftpboot

* restart xinetd

service xinetd restart

* Install syslinux

yum install syslinux

* Copy needed files from syslinux to the tftpboot directory

cp /usr/share/syslinux/pxelinux.0 /tftpboot cp /usr/share/syslinux/menu.c32 /tftpboot cp /usr/share/syslinux/memdisk /tftpboot cp /usr/share/syslinux/mboot.c32 /tftpboot cp /usr/share/syslinux/chain.c32 /tftpboot

* Create the directory for your PXE menus

mkdir /tftpboot/pxelinux.cfg

* Create a base directory for images. Create directories for each CentOS release you are supporting.

mkdir -p /tftpboot/images/centos/x86_64/5.0 mkdir -p /tftpboot/images/centos/x86_64/5.1 mkdir -p /tftpboot/images/vsphere/esxi5

* For each "Release" and "ARCH" Copy vmlinuz and initrd.img from /images/pxeboot/ directory on "disc 1" of that $Release/$ARCH to /tftpboot/images/centos/$ARCH/$RELEASE

* Add this to your existing or new /etc/dhcpd.conf.

Note: xxx.xxx.xxx.xxx is the IP address of your PXE server

allow booting; allow bootp; option option-128 code 128 = string; option option-129 code 129 = text; next-server xxx.xxx.xxx.xxx; filename "/pxelinux.0";

* Restart DHCP server

service dhcpd restart

* vi /tftpboot/pxelinux.cfg/default

default menu.c32 #default CentOS 5.6 x86 prompt 0 timeout 100 ONTIMEOUT local MENU TITLE RICT Consultancy PXE Menu LABEL CentOS 5.6 x86 MENU LABEL CentOS 5.6 x86 KickStart KERNEL images/centos/i386/5.6/vmlinuz APPEND initrd=images/centos/i386/5.6/initrd.img ramdisk_size=300000 ks=http://10.0.2.14:8080/Centos_5.6/cd1/ks.cfg ksdevice=eth0 LABEL CentOS 5.6 x86 Manual eth0 MENU LABEL CentOS 5.6 x86 Manual eth0 KERNEL images/centos/i386/5.6/vmlinuz APPEND initrd=images/centos/i386/5.6/initrd.img ramdisk_size=300000 napic acpi=off ksdevice=eth0 LABEL ESXi 4.1 KickStart menu label ESXi 4.1 KickStart kernel mboot.c32 append images/vmware/esxi/4.1/vmkboot.gz ks=http://10.0.2.14:8080/vSphere/ESXi_4.1/ks.cfg --- images/vmware/esxi/4.1/vmkernel.gz --- images/vmware/esxi/4.1/sys.vgz --- images/vmware/esxi/4.1/cim.vgz --- images/vmware/esxi/4.1/ienviron.vgz --- images/vmware/esxi/4.1/install.vgz label ESXi 4.0u1 KickStart menu label ESXi 4.0u1 KickStart kernel mboot.c32 append images/vmware/esxi/4.0u1/vmkboot.gz ks=http://10.0.2.14:8080/vSphere/ESXi_4.0u1/ks.cfg --- images/vmware/esxi/4.0u1/vmkernel.gz --- images/vmware/esxi/4.0u1/sys.vgz --- images/vmware/esxi/4.0u1/cim.vgz --- images/vmware/esxi/4.0u1/ienviron.tgz --- images/vmware/esxi/4.0u1/install.tgz

* Copy files from the first linux CD and the ESX 4.1 ISO to a webserver

* For ESXi copy the following files to your TFTP directory, in this case for 4.1 /tftproot/images/vmware/esxi/4.1 :
cim.vgz  ienviron.vgz  install.vgz  sys.vgz  vmkboot.gz  vmkernel.gz

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Your Name (required)

Your Email (required)

Subject

Your Message

Your Name (required)

Your Email (required)

Subject

Your Message