Search form

CentOS 7: Kickstart Script

Basic CentOS 7 Kickstart installation script for setting up servers automatically.

To use, create a bootable disc containing the script below in the /isolinux directory and type linux ks=cdrom:/ks.cfg at the boot: prompt.

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

# Use CDROM installation media
# cdrom
# Use network installation
repo --name=base --baseurl=
url --url=""
# Run the Setup Agent on first boot
firstboot --enable
# Accept Eula
eula --agreed
# Reboot afer installing
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --device=enp0s3 --onboot=on--ipv6=auto
network  --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $YOUR_ROOT_PASSWORD_HASH_HERE
# System timezone
timezone America/Chicago --isUtc,,,
user --name=USERNAME --password=$USER_PASSWORD_HASH_HERE --iscrypted --gecos="USERNAME"
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel



%addon com_redhat_kdump --enable --reserve-mb='auto'