Kikstart Installation
Automating OS installation using KikStart process -----
Following are the prerequisites for Kikstart server installation.
> DHCP Server and PXE Boot server
Note :- Refer the following URL to create "DHCP"and "PXE Boot"" server.
http://sappyit.blogspot.in/2014/12/create-pxe-boot-server-in-cent-os-6.html
> Install / configure HTTP server and copy all the Operating system dvd files to the new "centos66"directory.
Command :- #yum install httpd* ----- Install http server with yum installer
#service httpd restart ----- Restart http service
#chkconfig httpd on -----On http service permanently
#cd /var/www/html -----Go to html directory
#mkdir centos66 -----Create "centos66"directory in "html"directory
#cp -rv /media/centos6.6/* /var/www/html/centos66 ----- Copy all Os dvd contain to "centos66"directory.
> Create kikstart directory
Command :- #mkdir /var/www/html/centos66/ks -----Create "ks"directory in html directory
>Create and edit ks.cfg file in "ks"directory and put the following lines.
Command :- #vi ks.cfg ----- Create "ks.cfg"file with vi editor.
# Root password
rootpw --iscrypted $6$CN3rgs.pqQoNPKMF$7fXhIBuKP8kb8wMa7wRHKOaZlTkzak77lnOuT6Gbh4RjrouNIf41an1S0Ji6wGW8RogGLw8uN3Iws6MFkuDtJ/
# System authorization information
auth --useshadow --passalgo=sha512
# Use graphical install
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# System timezone
timezone --utc America/Denver
# Network information
network --onboot yes --device eth0 --bootproto dhcp --noipv6 --hostname=vlab01-vm
# System bootloader configuration
bootloader --location=mbr
# Clear the master boot record on the hard drive
zerombr yes
# Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part /boot --fstype ext4 --size=150
part swap --size=1024
part pv.01 --size=1 --grow
volgroup vg_root pv.01
logvol / --vgname=vg_root --size=1 --grow --name=lv_root
repo --name=cloudstack --baseurl=http://192.168.0.25/centos66/
%packages
@Base
@system-admin-tools
kvm
virt-manager
libvirt
libvirt-python
python-virtinst
virt-top
libguestfs-tools
cloudstack-agent
openvswitch
%end
%post
:wq
Save the file and exit.
Note:- I have created this file to install Cent OS 6.6 bit 64 with Base installation and enable KVM.
For more packages installation with kikstart add below options after %packages.
e.g :- %packages
@base
@client-mgmt-tools
@core
@debugging
@basic-desktop
@desktop-debugging
@desktop-platform
@directory-client
@general-desktop
@graphical-admin-tools
@identity-management-server
@input-methods
@internet-browser
@java-platform
@legacy-x
@network-file-system-client
@network-tools
@perl-runtime
@print-client
@remote-desktop-clients
@security-tools
@server-platform
@server-policy
@system-admin-tools
@x11
> Go to /var/lib/tftpboot/pxelinux.cfg directory
Command :- #cd /var/lib/tftpboot/pxelinux.cfg
> Edit default file and put the following lines which mark in a red text in PXE Boot menue.
Command :- #vi default
DEFAULT menu.c32
PROMPT 0
MENU TITLE VIRTELA LAB PXE BOOT MENU
TIMEOUT 200
ONTIMEOUT localdisk
#BOOT FROM LOCAL DISK MENU
LABEL localdisk
TEXT HELP
Boot from local hard drive.
ENDTEXT
MENU LABEL ^Local Hard Drive
MENU DEFAULT
LOCALBOOT 0
#BOOT FROM CENTOS 6.6 DVD ISO Auto
LABEL CentOS 6.5 Auto
TEXT HELP
CentOS 6.6 64 BIT DVD ISO With KVM
ENDTEXT
MENU LABEL CentOS-6.6-64-DVD 64-BIT (Auto)
KERNEL images/centos-66/vmlinuz
APPEND ks=http://192.168.0.25/centos66/ks/ks.cfg ksdevice=eth1 initrd=images/centos-65/initrd.img vga=normal ip=dhcp
:wq
Save the file and exit
Following are the prerequisites for Kikstart server installation.
> DHCP Server and PXE Boot server
Note :- Refer the following URL to create "DHCP"and "PXE Boot"" server.
http://sappyit.blogspot.in/2014/12/create-pxe-boot-server-in-cent-os-6.html
> Install / configure HTTP server and copy all the Operating system dvd files to the new "centos66"directory.
Command :- #yum install httpd* ----- Install http server with yum installer
#service httpd restart ----- Restart http service
#chkconfig httpd on -----On http service permanently
#cd /var/www/html -----Go to html directory
#mkdir centos66 -----Create "centos66"directory in "html"directory
#cp -rv /media/centos6.6/* /var/www/html/centos66 ----- Copy all Os dvd contain to "centos66"directory.
> Create kikstart directory
Command :- #mkdir /var/www/html/centos66/ks -----Create "ks"directory in html directory
>Create and edit ks.cfg file in "ks"directory and put the following lines.
Command :- #vi ks.cfg ----- Create "ks.cfg"file with vi editor.
# Root password
rootpw --iscrypted $6$CN3rgs.pqQoNPKMF$7fXhIBuKP8kb8wMa7wRHKOaZlTkzak77lnOuT6Gbh4RjrouNIf41an1S0Ji6wGW8RogGLw8uN3Iws6MFkuDtJ/
# System authorization information
auth --useshadow --passalgo=sha512
# Use graphical install
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# System timezone
timezone --utc America/Denver
# Network information
network --onboot yes --device eth0 --bootproto dhcp --noipv6 --hostname=vlab01-vm
# System bootloader configuration
bootloader --location=mbr
# Clear the master boot record on the hard drive
zerombr yes
# Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part /boot --fstype ext4 --size=150
part swap --size=1024
part pv.01 --size=1 --grow
volgroup vg_root pv.01
logvol / --vgname=vg_root --size=1 --grow --name=lv_root
repo --name=cloudstack --baseurl=http://192.168.0.25/centos66/
%packages
@Base
@system-admin-tools
kvm
virt-manager
libvirt
libvirt-python
python-virtinst
virt-top
libguestfs-tools
cloudstack-agent
openvswitch
%end
%post
:wq
Save the file and exit.
Note:- I have created this file to install Cent OS 6.6 bit 64 with Base installation and enable KVM.
For more packages installation with kikstart add below options after %packages.
e.g :- %packages
@base
@client-mgmt-tools
@core
@debugging
@basic-desktop
@desktop-debugging
@desktop-platform
@directory-client
@general-desktop
@graphical-admin-tools
@identity-management-server
@input-methods
@internet-browser
@java-platform
@legacy-x
@network-file-system-client
@network-tools
@perl-runtime
@print-client
@remote-desktop-clients
@security-tools
@server-platform
@server-policy
@system-admin-tools
@x11
> Go to /var/lib/tftpboot/pxelinux.cfg directory
Command :- #cd /var/lib/tftpboot/pxelinux.cfg
> Edit default file and put the following lines which mark in a red text in PXE Boot menue.
Command :- #vi default
DEFAULT menu.c32
PROMPT 0
MENU TITLE VIRTELA LAB PXE BOOT MENU
TIMEOUT 200
ONTIMEOUT localdisk
#BOOT FROM LOCAL DISK MENU
LABEL localdisk
TEXT HELP
Boot from local hard drive.
ENDTEXT
MENU LABEL ^Local Hard Drive
MENU DEFAULT
LOCALBOOT 0
#BOOT FROM CENTOS 6.6 DVD ISO Auto
LABEL CentOS 6.5 Auto
TEXT HELP
CentOS 6.6 64 BIT DVD ISO With KVM
ENDTEXT
MENU LABEL CentOS-6.6-64-DVD 64-BIT (Auto)
KERNEL images/centos-66/vmlinuz
APPEND ks=http://192.168.0.25/centos66/ks/ks.cfg ksdevice=eth1 initrd=images/centos-65/initrd.img vga=normal ip=dhcp
:wq
Save the file and exit
Comments
Post a Comment