All posts in the PXEboot category

Kickstart With PXEboot

Published May 17, 2012 by Siva

Kickstart With PXEboot

I have used Centos 5.5, please read the below steps (I have used)

Centos 5.5 Media
Creating Kickstart file(ks.cfg)
Setup NFS server
Installing PXE boot loader
Setup TFTp Server
Setup DHCP server

1. Copy the Centos DVD media files to my NFS server.

#cp -fr /mnt/media /share/centos5.5
#mkisofs –J –r –T –o RHEL-disc1.iso /share/centos5.5

Create a customized kickstart configuration file by using “ Applications -> Systems Tools -> Kickstart”. Save this file to /share/centos5.5 directory.

#vi /share/centos5.5/ks.cfg

#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth –useshadow –enablemd5
key –skip
# System bootloader configuration
bootloader –location=mbr
# Partition clearing information
clearpart –all –initlabel
# Use graphical install
# Firewall configuration
firewall –disabled
# Run the Setup Agent on first boot
firstboot –disable
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging –level=info
# Use NFS installation media
nfs –server= –dir=/data/install/ISO
# Network information
network –bootproto=dhcp –device=eth0 –onboot=on
#Root password
rootpw admin123

# SELinux configuration
selinux –disabled
# System timezone
timezone Asia/Calcutta
# Install OS instead of upgrade
# X Window System configuration information
xconfig –defaultdesktop=GNOME –depth=8 –resolution=800×600
# Disk partitioning information
part /boot –bytes-per-inode=4096 –fstype=”ext3″ –size=100
part / –bytes-per-inode=4096 –fstype=”ext3″ –size=10000
part swap –bytes-per-inode=4096 –fstype=”swap” –size=512
@GNOME Desktop Environment
@Text-based Internet
@Development Tools
@FTP Server
@Administration Tools

3. Setup the NFS server
vim /etc/exports
/share/centos5.5 *(ro)

#/etc/init.d/nfs restart
#/etc/init.d/portmap restart

4. TFTP Configuration

yum install syslinux
cp /usr/lib/syslinux/pxelinux.0 /tftpboot

Create the pxelinux.cfg directory in /tftpboot and edit the default file:

# You can have multiple Kickstart file having multiple versions
default linux
label linux
kernel vmlinuz
append ksdevice=eth0 load_ramdisk=1 initrd=initrd.img network ks=nfs:

Configure the TFTP server by editing /etc/xinetd.conf/tftp file:

#service xinetd restart

5. DHCP Configuration


i added the following block

host mysys {
hardware ethernet 00:ab:cd:df:11:12;
filename “pxelinux.0”;
#service dhcpd restart

6. Client Side

Please boot via network card (it should support network booting), It will fetch the IP from my DHCP server, start the installation.. 🙂