3.1 Creating a Kickstart File

3.1.1 Installation Options Section
3.1.2 Packages Section
3.1.3 Pre-installation Configuration Section
3.1.4 Post-installation Configuration Section

A Kickstart configuration file contains all the information that Kickstart requires to perform an automated installation. Every Oracle Linux installation creates a Kickstart file, /root/anaconda-ks.cfg. You can use this file to repeat an installation, or you can customize the settings in this file for different system configurations. The file is also useful for troubleshooting a boot-time problem with an installed system. You can use the Kickstart Configurator (system-config-kickstart) to create or modify a Kickstart file.

3.1.1 Installation Options Section

The first part of a Kickstart file defines the installation options and their associated values, and it defines how to configure the system storage, for example:

#platform=x86, AMD64, or Intel EM64T
# Firewall configuration
firewall --enabled --service=ssh

# Install OS instead of upgrade

# Use CDROM installation media
repo --name="Oracle Linux Server" --baseurl=cdrom:sr0 --cost=100

# System authorization information
auth  --useshadow  --passalgo=sha512

# Root password
rootpw --iscrypted SHA512_password_hash

# Use graphical install
firstboot --disable

# System keyboard
keyboard us

# System language
lang en_US

# SELinux configuration
selinux --enforcing

# Installation logging level
logging --level=info

# System timezone
timezone  America/Los_Angeles

# Network information
network --bootproto=dhcp --device=eth0 --onboot=on

# System bootloader configuration
bootloader --append="rhgb crashkernel=auto quiet" --location=mbr --driveorder="sda"

# Non-administrative user
user --name=user --homedir=/home/user --password=SHA512_password_hash --iscrypted

# Partition information

clearpart --all --drives=sda

part /boot --fstype=ext4 --size=500
part pv.008002 --grow --size=1

volgroup vg_hostname --pesize=4096 pv.008002
logvol / --fstype=ext4 --name=lv_root --vgname=vg_hostname --grow --size=1024 --maxsize=51200
logvol swap --name=lv_swap --vgname=vg_hostname --grow --size=2016 --maxsize=4032

Comments in the Kickstart file begin with a # character.


The Unbreakable Enterprise Kernel supports the use of the setting crashkernel=auto for UEK release 3 quarterly update 1 and later.

PXE cannot bring up the network interface unless you include a line such as the following:

network --bootproto=dhcp --device=eth0 --onboot=on

You can include multiple repo lines in the file, For example, if you use an HTTP-based network installation server, you might want to include both the Server and UEK2 repositories.

url --url
repo --name="OL6.4 Server repo" --baseurl=
repo --name="OL6.4 UEK R2 repo" --baseurl=

You can also include repo lines that point to the latest channels on Oracle Public Yum so that the system is automatically up to date after the installation. For example:

repo --name="OL6.4 latest" \
repo --name="OL6.4 UEK R2 latest" \

Do not use the \ line-continuation character in a Kickstart file. This character is used in the example to break long lines for printing.

3.1.2 Packages Section

The %packages section defines the packages to be installed on the system, for example:


Package group names start with a @ character. You can use the yum grouplist command on an existing Oracle Linux server to display both the installed package groups and the package groups that are available to install.

Individual packages to be installed are named without the @ prefix. If you specify a - character as a prefix, the package is not installed.

The %packages keyword takes the following options:


Installs the packages without attempting to fix any unresolved dependencies.


Installs the available packages without prompting about missing packages. By default, Kickstart interrupts the installation and asks you whether you want to continue the installation.


Install the packages and prompt if there are any unresolved dependencies.

You can also use a package list that is available as a local file in Kickstart's ramdisk file system or that is accessible on an HTTP server, for example:

%packages --ignoremissing
%include /tmp/package-list

3.1.3 Pre-installation Configuration Section

The %pre section defines any actions that Kickstart must perform before installation. This section is optional.

For example, the following %pre section runs the script config-partitions that is stored on an HTTP server and downloads a list of packages for use with a %include /tmp/package-list statement in the %packages section.

wget -q -O- > /tmp/package-list

In this example, the wget command saves the package list in Kickstart's file system, which exists as a ramdisk in memory.

An included script or file must be accessible at the specified path or URL.

As name service is not available before installation, you must use IP addresses instead of domain names in the %pre section or in any script that it includes.

3.1.4 Post-installation Configuration Section

The %post section defines any actions that Kickstart must perform after installation. This section is optional.

By default, Kickstart runs post-installation tasks in a chroot environment that is based on the root file system of the newly installed system. If you need to access any files that are outside the chroot environment, specify the --nochroot option to %post. You can then access files in the Kickstart file system with the newly installed system's root file system being mounted at /mnt/sysimage.

For example, the following %post section runs the script /tmp/post-config in Kickstart's file system:

%post --nochroot
%include /tmp/post-config

If you configure the installed system's network interface to obtain its settings using DHCP, you must either use IP addresses instead of domain names or set up a temporary resolv.conf file, for example:

wget -q -O- > /etc/resolv.conf
%include http://instsvr.mydom.com/scripts/post-config