Kickstart Configuration

Installation:


yum install dhcp tftp-server syslinux vsftp


follow DHCP link for DHCP configuration, mak.e following enteries


[root@master ~]# cat /etc/dhcp/dhcpd.conf
allow booting;
allow bootp;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0{
range 192.168.0.10 192.168.0.15;                           #----------- client range
default-lease-time 600;
max-lease-time 7200;
next-server 192.168.0.7;                                          #-----------dhcp server ip
option root-path "/var/lib/tftpboot/";
filename "pxelinux.0"; 
#filename "pxeboot";
}
[root@master ~]# 

service dhcpd start
chkconfig dhcpd on


Follow TFTP server configuration below


modify file as per below

[root@master tftpboot]# cat /etc/xinetd.d/tftp 
# 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 = -v -s  /var/lib/tftpboot -r blksize
disable = no
per_source = 11
cps = 100 2
flags = IPv4
        bind                    = 192.168.0.7
}
[root@master tftpboot]#

service xinted restart
chkconfig xinted on


For vsftp follow vsftp configuration post


further steps
cd /var/lib/tftpboot
mkdir pxelinux.cfg

[root@master tftpboot]# find / -name isolinux.cfg
/var/lib/tftpboot/isolinux.cfg
/var/ftp/pub/RHEL6/isolinux/isolinux.cfg



copy isolinux

/var/ftp/pub/RHEL6/isolinux/* /var/lib/tftpboot

copy isolinux.cfg from iso

cp /var/ftp/pub/RHEL6/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default


copy pxelinux.0 file


cp /usr/share/syslinux/pxelinux.0  /var/lib/tftpboot


modify default file

vi /var/lib/tftpboot/pxelinux.cfg/default

[root@master isolinux]# cat /var/lib/tftpboot/pxelinux.cfg/default
default vesamenu.c32
#prompt 1
timeout 30

display boot.msg

menu background splash.jpg
menu title Welcome to Red Hat Enterprise Linux 6.1!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000

label linux
  menu label ^Install or upgrade an existing system
  menu default
  kernel vmlinuz
  append initrd=initrd.img linux ks=ftp://192.168.0.7/pub/ks.cfg
label vesa
  menu label Install system with ^basic video driver
  kernel vmlinuz
  append initrd=initrd.img xdriver=vesa nomodeset
label rescue
  menu label ^Rescue installed system
  kernel vmlinuz
  append initrd=initrd.img rescue
label local
  menu label Boot from ^local drive
  localboot 0xffff


Create kickstart ks.cfg file

system_config_kickstart

do installation of kickstart

save file in ks.cfg 

cp ks.cfg /var/ftp/pub


restart services
service vftpd restart

service xinted restart

service dhcpd restart


Client side 


boot it from network

it will start getting from dhcp 


troubleshoot









No comments:

Post a Comment