Linux Services Organization

Our goal, introduce Linux services to the enterprise world.
Contact us in contact@linuxsv.org

Linux Services Organization : Kickstart Linux Server

Kickstart

Red Hat Linux has developed kickstart tool for automated installations. A kickstart configuration file is used as response file on the installation process in order to get a full automatic installation. Actually there are two methods for creating the kickstart configuration file :


* anaconda-ks.cfg file from /root, contains the kickstart configuration file with the installation parameters used on the local installation. This file is created by Anaconda, the Red Hat installation program, and can be used as template to generate a custom kickstart configuration file .

* system-config-kickstart, creates a custom kickstart configuration file for new installations.

Kickstart configuration file

The following is a commented kickstart configuration file :

$ cat /root/anaconda-ks.cfg

# Kickstart file automatically generated by anaconda.

# Start the installation process
install

# The installation source that can be local 'cdrom', remote http 'url --url http://', remote ftp 'url --url ftp://' or remote nfs 'nfs --server=serverip --dir=/instdir'
url --url http://server/Centos54


# Skip registration process
key --skip


# Language used during the installation process
lang en_US.UTF-8


# Keyboard configuration
keyboard us


# System graphical configuration. It starts X Server boot
xconfig --startxonboot


# System network configuration. It can also be a fixed via dhcp with 'network --device eth0 --bootproto dhcp'
network --device eth0 --bootproto static --ip 192.168.1.10 --netmask 255.255.255.0 --gateway 192.168.1.1 --nameserver 192.168.1.1 --hostname node01


# Sets the root password. This password can be copied from /etc/shadow
rootpw --iscrypted $1$BjKJOwe$1pHW4VDq4a5HmdCFRd.YT/


# Firewall configuration. The firewall is active and allowing connections only to 22/tcp (ssh) port
firewall --enabled --port=22:tcp


# By default, the authconfig command sets up the Shadow Password Suite (--enableshadow) and MD5 encryption (--enablemd5)
authconfig --enableshadow --enablemd5


# SElinux configuration. If do not know what is use 'selinux --disabled'
selinux --enforcing


# System clock configuration
timezone --utc Europe/Madrid


# GRUB configuration
bootloader --location=mbr --driveorder=sda --append="rhgb quiet"


# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work

# Remove all Linux partitions on the unique disk on the system : sda
clearpart --linux


# /boot primary partition of 100M size ext3 on sda
part /boot --fstype ext3 --size=100 --asprimary


# PV Physical Volume 6G primary partition on sda
part pv.8 --size=6000 --asprimary


# Volgroup Volgroup00 generation on PV
volgroup VolGroup00 --pesize=32768 pv.8


# Logical Volume LVM 4G partition for /
logvol / --fstype ext3 --name=LogVol00Root --vgname=VolGroup00 --size=4000


# Logical Volume LVM 1024M partition for swap
logvol swap --fstype swap --name=LogVol00Swap --vgname=VolGroup00 --size=1024



# RPMs to be installed: @ means rpms group and - means uninstallation
%packages
@office
@editors
@system-tools
@text-internet
@dialup
@core
@base
@games
@java
@legacy-software-support
@base-x
@graphics
@printing
@kde-desktop
@server-cfg
@sound-and-video
@admin-tools
@graphical-internet
emacs
audit
kexec-tools
device-mapper-multipath
xorg-x11-utils
xorg-x11-server-Xnest
libsane-hpaio
-sysreport

# After the installation we can execute an script/command
%post

Kickstart execution

Once the kickstart configuration file ks.cfg has been created from anaconda-ks.cfg or using system-config-kickstart tool the next step is make it available to the installation process via cdrom, nfs, http, etc. Then the installation process must be executed using the first Centos installation CD, the Centos installation DVD or a diskless installation image from a TFTPBOOT server and at 'boot :' stage depending the method the kickstart is available must be typed :

boot: linux ks=cdrom:/ks.cfg
boot: linux ks=nfs:server:/ks.cfg
boot: linux ks=http:server:/ks.cfg



Then the automated installs start without any interactive questions/answers...

Questions

1.- Samba is a valid method as source installation for kickstart (true/false).

2.- Which parameter must be present on kickstart configuration file in order to remove 'gimp' rpm from the installation ?

3.- Which parameter controls the execution of a script/command after an installation on kickstart configuration file ?

4.- Raid partition is supported on Kickstart (true/false).

5.- Kickstart file can not be acceded via floppy (true/false).

6.- Which command must be used at 'boot :' installation stanza in order to start a kickstart installation with the file ks.log on a floppy ?

7.- The parameter @everything on %packages kickstart configuration files means that all packages must be installed ? (true/false).

8.- Kickstart is not a valid installation method for CentOS distribution (true/false).

9.- In order remove all linux partitions on the unique disk on the system (sda) which of the following options must be on kickstart configuration file ?
A - clearpart --remove all
B - clearpart --linux
C - clearpart --linux all

10.- In order configure network via dhcp which of the following options must be on kickstart configuration file ?
A - network --dev eth0 --bootproto dhcp'
B - network --device eth0 --boot dhcp
C - network --device eth0 --bootproto dhcp
D - All of them
D - None of them

Labs

1.- Create a kickstart configuration file ks.cfg from your latest Centos virtual system.

2.- Make accessible via http your ks.cfg file to your LAN.

3.- Create a new empty Centos5 virtual machine and install it using ks.cfg. Be careful the new system is going to be installed and all data will be removed

-- This page is part of Linux Server online tutorial --