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 1HqhvrfNCiZYFWhkfwKUryMCt2fQVmWpjS
Share This Post

About Author: Curtis K

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

  • 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?

  • Imre Bertalan

    Dear Heigi,

    Thank you for the config file, maybe you’ll know the answer to my issue.
    I’m using your ks.cfg file with a standard CentOS7 ISO within KVM and whenever I start the virtual machine I get stuck at the following:
    [ 5.930242] scsi 0:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5
    [ 5.943713] sr 0:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
    [ 5.944661] cdrom: Uniform CD-ROM driver Revision: 3.20

    Then dracut emergency comes up and that’s all.

    All I have modified is the lang, timezone, firewall and the rootpw. Also commented out the repo and URL since I need to create this in an offline environment. Do you have an idea what could go wrong?

    Thanks in advance!

    Best Regards:

  • Kiran Zinjurde

    Hi Curtis,

    Could you please share the steps to create CentOS 7 minimal custom ISO.
    Also, share the kickstart configuration with it.

    Thanks in Advance !!