The objective of this article is to provide a getting started guide to Kickstart file creation on Redhat Linux.
Operating System and Software Versions
Operating System: - Redhat 7
Privileged access to your Redhat Linux system may be required.
# - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user
The Kickstart file is used to automate Redhat operating system installation. The basic idea behind kickstart file is to provide all required installation information to the installer via kickstart configuration file which would normally be submitted interactively. This can speed up an installation and provide a non-interactive ability for large-scale deployments.
Minimal Kickstart Example
The following is a minimal kickstart configuration file example:
rootpw --plaintext mypassword
part / --fstype="xfs" --grow
Te above Kickstart file will use Redhat's anaconda installer to perform a text based minimal Redhat Linux installation. Let's have a closer look an all options used by this kickstart file:
rootpw --plaintext mypassword - Set root's password to mypassword
url --url="ftp://PACKAGE_SERVER/" - Provide installation source directory or network location with the installation files. This example uses FTP.
text - Perform text based installation using anaconda installer
%packages - Begin list of packages
@core - Install core package group. More packages or grups to install can be specified here. One group or package per line.
%end - End list of packages
%timezone Australia/Sydney - Set timezone to Australia/Sydney To list all available timezones on Redhat Linux run timedatectl list-timezones command.
clearpart --all - Prepare disk and clear all current partitions.
part / --fstype="xfs" --grow - Create a partition and grow to maximum available size and mount it under /.
Other basic Kickstart file parameters
On top of the all above parameters the following list will provide you with some other but optional basic Kickstart parameter to tune your Redhat Linux installation:
keyboard 'us' - Set keayboard to us
lang en_AU - Set language to en_AU
firewall --disabled - Disable firewall
selinux --disabled - Disable SELinux
network --bootproto=dhcp --device=eth0 - Name network interface eth0 and set to obtain the network configuration via DHCP
reboot - After the installation is completed, reboot the newly installed system.
bootloader --location=mbr - Set boot-loader installation location to Master Boot Record.
Using Kickstart from previous installation
Another alternative to generate a fresh Kiskstart file tailored to your requirements is to perform initial Redhat Linux installation. During the installation the installer will log all your installation selections and generate Kickstart file which can be found in root's home directory ( /root/anaconda-ks.cfg ) once the installation is completed.
To generate more robust Kickstart configuration files you may consider to use system-config-kickstart command. system-config-kickstart is a great tool which allows you to configure almost any aspect of your custom Redhat installation from keaybord settings to post installation scrips. To install system-config-kickstart kickstart generation tool execute:
# yum install system-config-kickstart
Once installed you can start system-config-kickstart tool by the following linux command:
ARE YOU LOOKING FOR A LINUX JOB? Submit your RESUME or create a JOB ALERT on LinuxCareers.com job portal.
DO YOU NEED ADDITIONAL HELP? Get extra help by visiting our LINUX FORUM or simply use comments below.