To Configure kickstart to automate RHEL/CentOS 7 installation

In this article we will explain about the automated installation of RedHat based distributions by configuring the kickstart.

To install kickstart

The default configuration file for kickstart “ anaconda-ks.cfg” is available in the home directory of the root user. Supply the file via ftp or http for accessing the file while installing the operating system.
Install the following package for creating a new kickstart configuration file.
[root@linuxhelp ~]# yum install system-config-kickstart -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Resolving Dependencies
-->  Running transaction check
--->  Package system-config-kickstart.noarch 0:2.9.2-4.el7 will be installed
-->  Finished Dependency Resolution
.
.
.
Running transaction
  Installing : system-config-kickstart-2.9.2-4.el7.noarch                                                                               1/1 
  Verifying  : system-config-kickstart-2.9.2-4.el7.noarch                                                                               1/1 

Installed:
  system-config-kickstart.noarch 0:2.9.2-4.el7                                                                                              

Complete!
Go to Applications &rarr System Tools &rarr Kickstart for graphical mode or else run the following command to open.
[root@linuxhelp ~]# system-config-kickstart
Choose “ Basic Configuration” and choose your language, keyboard layout, timezone, root password. Select reboot system after installation.

Basic configuration
Select the Installation Method and Installation source.

Installation method and source
Select “ Boot Loader Options” and choose the required Installation Type, grub password and Install option.
boot loader option
Now choose “ Partition Information” and create the partitions as follows.
Partition Information
Enter the following details for /boot partitioning.
Mount Point/boot
File System Typexfs
Size500 MB

partitioning

partitioning
After entering the details click OK.
partitioning details
Now click Add
add option
Enter the following details for / partitioning.
Mount Point/
File System Typexfs
Size20 GB

Kickstart
kickstart
Select “ Network Configuration” and add the Network Device as follows. Here, you can choose either the DHCP or static IP.
network configuration
network configuration
And finally Save the file.
save
List the file in your home directory to view the new file called “ ks.cfg” for kickstart configuration.
Home directory file system
Open the “ anaconda-ks.cfg” file and copy the following lines to the “ ks.cfg” file during the installation process.
%packages
@base
@core
@desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11

%end

To configure ftp server

Now install the FTP package.
[root@linuxhelp ~]# yum install vsftpd -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: centos.mirror.net.in
 * updates: centos.mirror.net.in
Resolving Dependencies
-->  Running transaction check
--->  Package vsftpd.x86_64 0:3.0.2-11.el7_2 will be installed
-->  Finished Dependency Resolution
.
.
.
Running transaction
  Installing : vsftpd-3.0.2-11.el7_2.x86_64                                                                                             1/1 
  Verifying  : vsftpd-3.0.2-11.el7_2.x86_64                                                                                             1/1 

Installed:
  vsftpd.x86_64 0:3.0.2-11.el7_2                                                                                                            

Complete!
Copy the ks.cfg file from /root/ks.cfg to the ftp path /var/ftp/pub/
[root@linuxhelp ~]# cp ks.cfg /var/ftp/pub/
Add the firewall for FTP
[root@linuxhelp ~]# firewall-cmd --permanent --add-service=ftp
success
[root@linuxhelp ~]# firewall-cmd --reload
Success
Start and enable the FTP service.
[root@linuxhelp ~]# systemctl start vsftpd
[root@linuxhelp ~]# systemctl enable vsftpd
ln -s ' /usr/lib/systemd/system/vsftpd.service'  ' /etc/systemd/system/multi-user.target.wants/vsftpd.service' 

Bootup the client machine with Centos/RHEL 7 installation ISO image.

bootup
Press the “ Tab” button to inject the kickstart configuration file. Type the command ks=ftp://192.168.5.88/pub/ks.cfg as mentioned in the below image and press “ Enter” to continue with the installation.
kickstart configuration
tab option
user settings
After installation process completes, turn on the machine and choose the Language.
language
choosen language
Enter the login credentials and click next.
login credentials
Choose your location and click next
select location
Click next to proceed further.
data connecting to the cloud
Click Start using CentOS Linux
start using CentOS linux
Thus the CentOS 7 installed successfully and the home screen appears.
CentOS home page
Tags:
Author: 

Comments ( 0 )

No comments available

Frequently asked questions ( 5 )

Q
can I install and make changes over command line for Configuring kick start to automate RHEL/CentOS 7 installation
A
yes, you can but that’s a tedious process so Graphical mode is highly recommend for Desktop
Q
shall I make automatic partiotioning?
A
Yes. You can choose the options between manual and automatic partitioning
Q
how to start the installation ?
A
You can start it simply by rebooting the system.
Q
How to start the Graphical configuration ?
A
Go to Applications &rarr System Tools &rarr Kickstart for graphical mode or else run the following command to open.

system-config-kickstart
Q
How to install the FTP package.?
A
Install the FTP package using the following command 

yum install vsftpd -y