With the help of a kickstart file, it’s possible to do an almost unattended installation. In a kickstart file you give the answers to all the questions that are asked during an installation of a new server. When a server is installed the kickstart file of the installation can be found in the directory of the root account. It’s called anaconda-ks.cfg. The installation of the Oracle Enterprise Linux 5 update 4 created the following kickstart file:

# Kickstart file automatically generated by anaconda.
install
url --url http://192.168.0.250/OEL5u4_i386
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto static --ip 192.168.0.140 --netmask 255.255.255.0 --gateway 192.168.0.1 --nameserver 192.168.0.1 --hostname oel5u4
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc Europe/Amsterdam
bootloader --location=mbr --driveorder=sda
# 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
#clearpart --linux --drives=sda
#part /boot --fstype ext3 --size=100 --ondisk=sda
#part pv.2 --size=0 --grow --ondisk=sda
#volgroup VolGroup00 --pesize=32768 pv.2
#logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
#logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=1008 --grow --maxsize=2016
%packages
@base
@core
@system-tools
fipscheck
squashfs-tools
device-mapper-multipath
sgpio
e4fsprogs
oracle-validated
createrepo
audit
sysstat
-zisofs-tools
-vnc
-nmap
-screen
-xdelta
-OpenIPMI-tools
-openldap-clients
-samba-client
-bluez-hcidump
-zsh
  1. We can modify this kickstart file for an unattended installation. Modify the kickstart file, so that it looks similar to this:

# Kickstart file automatically generated by anaconda.

install

url –url http://192.168.0.250/OEL5u4_i386

lang en_US.UTF-8

keyboard us

network –device eth0 –bootproto=query

rootpw –iscrypted $1$wGAh8J7a$s3VZ07TWA8EcAUQG7esZt0

firewall –enabled –port=22:tcp

authconfig –enableshadow –enablemd5

selinux –enforcing

timezone –utc Europe/Amsterdam

bootloader –location=mbr –driveorder=sda

# 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

clearpart –linux –drives=sda

part /boot –fstype ext3 –size=100 –ondisk=sda

part pv.2 –size=0 –grow –ondisk=sda

volgroup VolGroup00 –pesize=32768 pv.2

logvol / –fstype ext3 –name=LogVol00 –vgname=VolGroup00 –size=1024 –grow

logvol swap –fstype swap –name=LogVol01 –vgname=VolGroup00 –size=1008 –grow –maxsize=2016

%packages

@base

@core

@system-tools

fipscheck

squashfs-tools

device-mapper-multipath

sgpio

e4fsprogs

oracle-validated

createrepo

audit

sysstat

-zisofs-tools

-vnc

-nmap

-screen

-xdelta

-OpenIPMI-tools

-openldap-clients

-samba-client

-bluez-hcidump

-zsh

In the above file the network setting has been changed to query for the settings. This will be the only time when the installation asks for the input. Also the comments signs have been removed in front of the partition settings.

  1. Create a directory in the DocumentRoot (/var/www/html) for the kickstartfiles.

# cd /var/www/html/

# mkdir kickstart

  1. Create the kickstart file in this new directory and call it OEL5u4-ks.cfg.
  1. Modify the file /tftpboot/pxelinux.cfg/default and add the following entries to the file:

LABEL OEL5u4_i386_unattended

MENU LABEL OEL5u4 i386 unattended

kernel vmlinuz_OEL5u4_i386

append initrd=initrd.img_OEL5u4_i386 ramdisk_size=10000 ks=http://192.168.0.250/kickstart/OEL5u4-ks.cfg

This will make sure that after the PXE boot this kickstart file is used for the installation.

  1. Boot the server that needs to be installed and select the right menu option. The installation of the server will start. The only thing that must be configured is the network part.