CentOS 7 Minimal kickstart file

I searched around a bit and couldn’t find any published kickstart files around for CentOS 7 (and the ones I did, didn’t work correctly and looked overly complex), therefore I’m attaching my CentOS 7 minimal kickstart file for anyone else who may be searching for one!


1) Firewall service and selinux are disabled in this kickstart file (for testing). Please change them to enabled if preferred.
2) Filesystem is XFS with LVM
3) Update url and repo with your local mirror if preferred.

lang en_GB.UTF-8
keyboard us
timezone Australia/Melbourne
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
services --enabled=NetworkManager,sshd
eula --agreed
ignoredisk --only-use=sda

bootloader --location=mbr
clearpart --all --initlabel
part swap --asprimary --fstype="swap" --size=1024
part /boot --fstype xfs --size=200
part pv.01 --size=1 --grow
volgroup rootvg01 pv.01
logvol / --fstype xfs --name=lv01 --vgname=rootvg01 --size=1 --grow

rootpw --iscrypted $YOUR_ROOT_PASSWORD_HASH_HERE

repo --name=base --baseurl=http://mirror.cogentco.com/pub/linux/centos/7/os/x86_64/
url --url="http://mirror.cogentco.com/pub/linux/centos/7/os/x86_64/"

%packages --nobase --ignoremissing

Please let me know if you have any issues or have suggestions to improve the above CentOS 7 minimal kickstart file.

Scan to Donate Bitcoin
Like this? Donate Bitcoin to at:
Bitcoin 14M4a7UHEX61VoHkyjj4dxbUBNGGz3hmhM
Share This Post

About Author: Curtis K

Hi! My name is Curtis, and I am the creator of CentOS Blog. Please feel free to comment any suggestions, feedback or questions on my posts!

  • adam

    Has the setup for Pre-scipts changed? I am trying to use my pre-install scripts from centos 5&6 and everytime it lauches the script, I loose my keyboard.


    I am facing problems.

    XenServer release 6.2.0-70446c
    CentOS 7


    Error: Starting VM ‘XXX – Internal error: xenopsd internal error: VM = 32ac5ae6-7713-506c-272d-120a1f584fdd; domid = 67; Bootloader.Bad_error Traceback (most recent call last):
    File “/usr/bin/pygrub”, line 903, in ?
    fs = fsimage.open(file, part_offs[0], bootfsoptions)
    IOError: [Errno 95] Operation not supported

    • Florian Heigl

      Hello Mr. I am facing problems.

      You’ll need to swap those partitions and also use ext on /boot.
      /boot should be primary and active and all this stuff. Like in the DOS days. Otherwise shitty python code by “clever devs” will not boot, but explode.
      So, change the below so that /boot is the first one, and primary. your swap doens’t need to be a primary partition, can be on LVM too unless you want to coredump to it. You don’t since it won’t work with a Xen VM anyway.

      part swap –asprimary –fstype=”swap” –size=1024
      part /boot –fstype xfs –size=200

  • Johnonymous

    Thanks for providing your example, I am trying to do something similar. I tried this kickstart script exactly as you stated. I am generating the iso fine with the livecd-creator. I mount the iso on a vmware vm and boot it. It boots to a install looking screen, but the only option is Troubleshooting. My desire is to have a minimal install with the ability to logon as root to a shell prompt.

    Any ideas?