Cobbler Server with Kickstart file

Cobbler Server with Kicktart file.

Prerequisites.

> Cobbler server installed and configured on CentOS 6.5 Bit 64. Use the following URL to install and configured Cobbler Server.
URL:- http://sappyit.blogspot.in/2015/02/cobbler-installation-and-configuration.html


Steps to Add Kickstart file in Cobbler Server.

> Go to Kickstart directory.
Command: #cd /var/lib/cobbler/kickstarts/


> Create new kickstart file with vim edit command.
Command: #vim centos65.ks
Note: I have created < centos65.ks > file for CentOS version 6.5 operating system installation.


> Add the following configuration in centos65.ks file.
Note: Following kickstart file design for KVM server automated installation in Runlevel 3. You can configure kickstart file as per your lab requirement.
 
install

# Use http as the package repository
# It is where are the image files

url --url http://192.168.0.65/cobbler/ks_mirror/CentOS_6.5-x86-64/

# Use the text installation interface.
text
# Use UTF-8 encoded USA English as the Language
lang en_US.UTF-8

# Configure time zone.
timezone --utc America/Denver

# Use us keyboard.
keyboard us

# Set bootloader location.
bootloader --location=mbr

# Set root password
# Use crypt to create a encripted one
rootpw  --iscrypted $6$CN3rgs.pqQoNPKMF$7fXhIBuKP8kb8wMa7wRHKOaZlTkzak77lnOuT6Gbh4RjrouNIf41an1S0Ji6wGW8RogGLw8uN3Iws6MFkuDtJ/

# Enable shadowing and defines algorithm
authconfig --enableshadow --passalgo=sha512

# Disables SELinux for default
# This is a little tricky with cloudera manager
selinux --disabled

# Use DHCP and disable IPv6
# set hostname to hduser
network --onboot yes --device eth0 --bootproto dhcp --noipv6 --hostname=vlab01-vm

# Clear the master boot record on the hard drive.
zerombr yes

# Clear existing partitions
clearpart --all --initlabel

part swap --asprimary --fstype="swap" --size=1024
part /boot --fstype ext4 --size=100
part pv.01 --size=1 --grow
volgroup vg_root pv.01
logvol / --vgname=vg_root --size=1 --grow --name=lv_root

%packages --ignoremissing
@core
@Base
@system-admin-tools
kvm
virt-manager
libvirt
libvirt-python
python-virtinst
virt-top
libguestfs-tools

# Enable post process logging.
%post --log=~/install-post.log

service sshd start
chkconfig sshd on

%end

# Reboot after installation
reboot


> Add the distribution information to the pxe server.
Command: #cobbler distro add --name=CentOS_6.5-x86-64 --kernel=/var/www/cobbler/ks_mirror/CentOS_6.5-x86-64/isolinux/vmlinuz --initrd=/var/www/cobbler/ks_mirror/CentOS_6.5-x86-64/isolinux/initrd.img



> Add the kickstart file to the pxe server.
Command: #cobbler profile add --name=CentOS_6.5-x86-64 --distro=CentOS_6.5 --kickstart=/var/lib/cobbler/kickstarts/centos65.ks


> Restart Cobbler service.
Command: #service cobblerd restart


> Run cobbler sync command to save the changes.
Command: #cobbler sync


> Once client machine boot from Network you will get the following Cobbler bootable screen.
Second option is use for kickstart boot.


EOF

Comments

  1. @himanshu
    thanks for writing the document, it is very helpful.
    I want to copy image of my server to install another one via cobbler server. can you please give some hint to get this done?
    Many thanks in advance

    ReplyDelete

Post a Comment

Popular posts from this blog

KVM Live Migration without Shared Storage

Create CentOS 6 Local package and Group package Repository

Create Linux ( LUCI ) Cluster