How To Install a Kick Start Server on RHEL

What is Kick Start Server?

The Red Hat Kickstart installation method is used primarily (but not exclusively) by the Red Hat Enterprise Linux operating system to automatically perform unattended operating system installation and configuration. Red Hat publishes Cobbler as a tool to automate the Kick Start configuration process.

 

Installing Kickstart Server on RHEL

The first step in setting up a Kickstart server is to install a basic web server to hold the Kickstart configuration files and OS installation files. It is assumed that there is already a basic CentOS web server ready to go, with a static IP address and GUI loaded.

Due to testing in a private lab environment, we can disable SELINUX. Do this by manually editing /etc/selinux/config to set SELINUX=disabled.

We will also be disabling iptables in the environment with this command:

    chkconfig –level 35 iptables off

After this is done, you will need to reboot the host. Check that SELINUX is disabled by using the command ‘getenforce.’ It should report back as disabled.

Log in to the server as root and check to see if a web server is installed by opening a terminal session; use the following command to check if Apache web server is installed:

    yum info httpd

If the yum command shows the status as installed, skip the Apache web server installation and configuration steps below. If the server shows the Apache web server is not installed, install it using the command below as the root user in a terminal window:

    yum -y install httpd

Once the web server is installed, start it by using the command:

    service httpd start

There may be some warnings about being unable to resolve the hostname. In this instance it isn’t a problem and the warning can be ignored. To check the web server is working, use the command:

    service httpd status

Make the web server automatically start on bootup, use the command:

    chkconfig –level 35 httpd on

Now the web server configuration steps are complete. Below are some rudimentary troubleshooting steps if something wasn’t working correctly.

Troubleshooting Your Kickstart Installation

At this point the basic web server should be up and running, even if the server is rebooted. Check that it is working by using a web browser on a separate machine and try and load the web page of the server, using its IP address if needed. If you cannot browse to the web page I would suggest checking the following items:

  1. Check the basic connectivity between the two machines.
  2. Check the status of the Apache web server.
  3. Ensure that no firewalls are blocking port 80 traffic.

 

Assuming that everything is now working we can progress with setting up the Kickstart server.

Setting up Kickstart

To make the server work with Kickstart, we need to add some content to the web server in the form of installation files and Kickstart configuration files. Using the console or terminal session, create a folder in the web server document root. In CentOS using Apache, the default document root is

    /var/www/html/

It is advisable that rather than just placing the files in the root of the web folder, create a folder layout that lends itself to running multiple versions of software and architectures for various Kickstart installs. Each CentOS version and architecture should have its own folder structure. To create a basic folder setup adhering to the above recommendation use the command:

    mkdir -p /var/www/html/centos/6/x64

The easiest way to copy the contents across to the new web server is to copy the contents from the installation media used to the relevant folder. This is done by using the following commands:

    mount /dev/cdrom /media
    cp -r /media/* /var/www/html/centos/6/x64/

Note: if a different version or operating system is being used, the media command will need to be modified to reflect the name of the mounted media; for example, CentOS_6.5_Final may need to be changed.

Once this is complete, it is time to start creating our Kickstart file. The Kickstart file holds what could be termed an “answers” file to questions that the installer needs to know in order to perform a complete installation. It is possible to manually create a kickstart file using a text editor but RHEL and CentOS provide a GUI Kickstart maker program.

Install the Kickstart builder application using the command:

    yum -y install system-config-kickstart.noarch

After installation is complete, notice that you have a new application, as shown above. Filling in the details field by field allows you to configure the settings for each configuration option. One thing to be aware of is the location of the installation files on the web server, especially as there is a nice ordered folder structure with various version folders.

Once the Kickstart file is created, it needs to be saved to web servers’ root folder so that any new clients can read it. It isn’t required to be in the root, but a user will need to make adjustments when the guests are installed. As mentioned before, by default, the root folder is /var/www/html/ in a standard CentOS installation. When it comes to saving the file, it is advised to give each configuration created a simple but informative name.

Booting Your Kickstart

All the hard work is now done and all that is left to do is to boot off a minimal install CD (or any bootable install media).

Run the automated install by booting from the disk media. When the guests get to the boot screen press the tab key. This allows you to change or add options to the boot configuration.

Simply add the addition content, substituting the IP address for that of the web server in use and the ks.cfg file for the Kickstart file name when the test Kickstart file was created earlier.

    vmlinuz initrd=initrd.img ks=http://192.168.200.131/ks.cfg

Now the guest system will boot the initial kernel and load the Kickstart file. A user will however have to interact with the installer when it asks how the disks are to be configured. This is a safety measure to ensure a user really does want to wipe the disks in question; however, it can be overridden. If someone wants to do this, please, make sure they understand that removing this safety feature can be dangerous.

Reference
How To Install a Kick Start Server on RHEL
http://www.tomsitpro.com/articles/kickstart-linux-automation,2-798.html

How to Install KickStart on Red Hat
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/ch-kickstart2.html


Leave a Reply

Your email address will not be published. Required fields are marked *