AUTOMATING INSTALLATION WITH KICKSTART

 


CHAPTER 1 

AUTOMATING    INSTALLATION    WITH      KICKSTART


Some Information about Kickstart

If we install Linux OS on  single standalone machine, it is easy to install manually. But if we want to install 30/40 or more machines  for your organization, then it will be more complicated work due of time. Right?

So, then we will use automated  installation process. so that all client machines can be installed from a single server machine automatically. 

That's why - we will  " kickstart method"

** Kickstart is an automated installation method used primarily by Red Hat Enterprise Linux.

** Kickstart in Red Hat Enterprise Linux is similar to Jumpstart for Oracle Solaris, or to an unattended installation (WDS Deployment) for Microsoft Windows.


Video Links:
Part-01:




Part-02:




Our LAB Scenario :

But we will take One Client and One Server

Server Name -> Kickstart-Server

Client Name -> Kickstart-Client-1

In VMware, We will connect those 2 machines by host-only adapter


Now let's start our work at Kickstart-Server

To perform a kickstart installation, we need to follow these steps:

Step-01:

Create a Kickstart file, a plain text file with several predefined configuration options.

To create this file we have to use   "system-config-kickstart"  command. But we have to install this package first

To install this package:

[root@kickstart-server ~]#  yum   install   system-config-kickstart    -y

After installing the package you can check it.

[root@kickstart-server ~]# rpm   -qa   system-config-kickstart


Now type, system-config-kickstart

[root@kickstart-server ~]system-config-kickstart


You will be prompted a "Kickstart Configuration" window

"Basic Configuration" Option


"Installation Method" Option


"Basic Loader Options" Option

"Partition Information" Option









Final "Partition Information" Option



"Network Configuration" Option


"Firewall Configuration" Option


"Post Installation Script" Option

useradd  mushfiq

echo  mmr  |  passwd  mushfiq

useradd  itbd

echo  itbd  | passwd  itbd

Now, we will save this file with any name but extension will be         .cfg





Our  kickstart configuration file has created which is named - "http-ks.cfg". which has been saved in Desktop.
But at this file, we do not select any package
if we want to add some packages at this file, we can add. But HOW?
We will copy the packages option from default 'anaconda-ks.cfg' which is stored in "/root"  directory. Now we will copy these and we will paste into "http-ks.cfg" at bottom.


We will paste it into http-ks.cfg  file at bottom part  and save it by pressing save button

=====================================================================
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$zzlGk/Br$xnZahmLWx4L2pSCvK9hc7.
# System language
lang en_US
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use graphical install
graphical
firstboot --disable
# SELinux configuration
selinux --disabled


# Firewall configuration
firewall --disabled
# Network information
network  --bootproto=dhcp --device=eth0
# Reboot after installation
reboot
# System timezone
timezone Asia/Dhaka
# Use network installation
url --url="http://192.168.61.131/dvd"
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="ext4" --size=500
part / --fstype="ext4" --size=20000
part /home --fstype="ext4" --size=2000

%post
useradd  mushfiq
echo  mmr  |  passwd  mushfiq

useradd  itbd
echo  itbd  | passwd  itbd
%end

%packages
@^graphical-server-environment
@base
@core
@desktop-debugging
@dial-up
@dns-server
@file-server
@fonts
@ftp-server
@gnome-desktop
@guest-agents
@guest-desktop-agents
@hardware-monitoring
@input-methods
@internet-browser
@multimedia
@print-client
@remote-system-management
@virtualization-tools
@x11
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end
=====================================================================
To check our newly created kickstart configuration file(http-ks.cfg), we will use "ksvalidator"  command

[root@kickstart-server ~]# ksvalidator    /root/Desktop/http-ks.cfg


if there is no output, means - your file is ok

 So, our step-01 is done.


Step-02:

Now, we have to install http package, because of our clients will take our configuration file through http.

[root@kickstart-server ~]# yum   install   http*   -y

After installing this package, we will get  "/var/www/hrml"  folder, which is default location of http service

Hope, you have remember that, we gave a directory named "dvd" into our http server. So we have to create a directoty named "dvd", where we will put our configuration file (http-ks.cfg) and our ISO file.

So, Let's do it.

To copy http-ks.cfg  file from Desktop  into html folder:

[root@kickstart-server ~]# cp   /root/Desktop/http-ks.cfg   /var/www/http/

Now we will copy our ISO file. Which is like below. In my case, it is on Desktop.


But you can not copy it, because it is "block device file" (Filesystem is = /dev/sr0 ) which is mounted in   /run/media/root  folder by default. 
How can I know this?
We can know this by simple "df  -hT" command. h=Human Readable; T=Type




We will mount this device file into another folder in "/test" and mount /dev/sr0  into  /test  folder

We have mounted our device file into test folder. Now we will copy all files & folders of  "/test"  folder into /var/www/html/dvd/

Here,
V= Verbose = You will be able to see what files are copying 
R = Recursive = It will copy all directories and their sub-directories
* = All files of  'test' folder

Now, all files have copied into /var/www/html/dvd folder.
By default folders permission is 755
We will change  permission  to 777  by below command: 

[root@kickstart-server test]# chmod    -R  777    /var/www/html/dvd/
Here- R is recursive. Means all files and folders and their sub-folders permission will be 777






















Comments

  1. Thank you sir. The directions of doing this work are good and helpful.

    ReplyDelete
  2. Thank you sir. The directions of doing this work are good and helpful.

    ReplyDelete

Post a Comment

Popular posts from this blog

Some Questions for MTCNA Exam

ডিপ্লোমা লেভেল এর ইন্ডাস্ট্রিয়াল এটাচমেন্ট এ আসার পূর্বে একটু ভেবে আসার অনুরোধ রইলো