#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
text
# skip rhn
key --skip
# Firewall configuration
firewall --enabled --ssh
# 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 network installation
url --url=http://server0.example.com/install
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
#Root password
rootpw --iscrypted $1$F/cD2/$nV0/biUdPjDgea.cN2rEe.
# SELinux configuration
selinux --enforcing
# Do not configure the X Window System
skipx
# System timezone
timezone America/New_York
# Install OS instead of upgrade
install
# Disk partitioning information
part /boot --bytes-per-inode=4096 --fstype="ext3" --size=150
part pv.1 --bytes-per-inode=4096 --grow --size=0
%include /tmp/disk.cfg
%post
chvt 3
echo "executing post install"
chvt 1
%packages
@base
@core
ntp
vim-enhanced
-bluez-gnome
-bluez-libs
-bluez-utils
@localclient
%pre
echo "this is the %pre"
IPADDRESS=`ifconfig eth0 |grep 'inet addr' |awk -F: '{print $2 }' |awk '{print $1 }'`
HOSTNAME=`nslookup $IPADDRESS| grep Name | tail -1 | awk '{print $2}'`
HOST=`echo $HOSTNAME |awk -F. '{print $1}'`
if [ "$HOST" = "" ]; then
HOST="unconfigured"
fi
cat /tmp/disk.cfg
volgroup ${HOST}_volume --pesize 32768 pv.1
logvol swap --fstype swap --name=SwapVol --vgname=${HOST}_volume --size=1024 --grow --maxsize=8192
logvol / --fstype ext3 --name=RootVol --vgname=${HOST}_volume --size=8192 --grow
EOF
Ok, now that we have a complete example, we need to configure pxe to use the kickstart file.Here is our commands, %packages, %pre and %post sections.