PXE Boot server on CentOS

This post will be helpful for linux admins who frequently installs diff linux os. PXE boot is one of the best option to start linux installation & for rescue of the other failed systems. we are using CentOS as pxe boot server.
install syslinux & tftp-server

yum install tftp-server syslinux -y

enable syslinux at boot time.

vi /etc/xinetd.d/tftp and change disable to ‘no’
disable = no
service xinetd restart
chkconfig xinetd on

Copy needed files from syslinux to the tftpboot directory

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

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

mkdir -p /tftpboot/images/centos/i386/5.4
cp /tmp/dvd-centos-54/images/pxeboot/vmlinuz /tftpboot/images/centos/i386/5.4/
cp /tmp/dvd-centos-54/images/pxeboot/initrd.img /tftpboot/images/centos/i386/5.4/

Configure dhcp-server. Add this to your existing or new /etc/dhcpd.conf.
Note: xxx.xxx.xxx.xxx is the IP address of your PXE server

How to configure dhcp server on centos

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″;
service dhcpd restart

Create the directory for your PXE menus

mkdir /tftpboot/pxelinux.cfg

Sample config file
vi /tftpboot/pxelinux.cfg/default

default menu.c32
 
 
prompt 0
timeout 50
ONTIMEOUT localboot
 
MENU TITLE PXE Menu
 
LABEL localboot
MENU LABEL Boot From Hard Disk
LOCALBOOT  0
 
LABEL CentoS 5.4 i386 Installer
MENU LABEL CentOS 5.4 i386 Installer
KERNEL images/centos/i386/5.4/vmlinuz
append vga=normal initrd=images/centos/i386/5.4/initrd.img ramdisk_size=32768
 
LABEL CentoS 5.5 i386 Installer
MENU LABEL CentOS 5.5 i386 Installer
KERNEL images/centos/i386/5.5/vmlinuz
append vga=normal initrd=images/centos/i386/5.5/initrd.img ramdisk_size=32768

Refer

3 Comments

    • TechieNote » PXE Boot server on CentOS says:

      [...] lease, and start booting successfully from the network For troubleshooting check /var/log/messages Credits // Share| Leave a comment | [...]

    • PXE boot Ubuntu -10.04 | LinuxReaders says:

      [...] you are done setting-up PXE Server, you might need few OS booting from network / pxe for rescue [...]

    • Blackberry Speed Comparisons | www.avehot.com says:

      [...] PXE Boot server on CentOS | LinuxReaders [...]

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

    Archives

    Categories

    Page optimized by WP Minify WordPress Plugin