# Pitt CS Kickstart file for CentOS 7

#version=RHEL7
install
url --url=http://mirror.cs.pitt.edu/centos/7/os/x86_64
lang en_US.UTF-8
keyboard --vckeymap=us --xlayouts='us'
network --bootproto dhcp --activate
rootpw  --iscrypted $6$7sdFE9Ue/kviudcW$Kk6WJ/sq8CBYJCUO/eVCwFDVB.Jfw00Huy3hAzW2byfdh9U32jrTgMvFVXFJaYSt9fFhctdII2ak33s6WOFva/
authconfig --enableshadow --passalgo=sha512 --enablenis --nisdomain=cs --nisserver=lisa.cs.pitt.edu --enablekrb5 --krb5realm=UNIV.PITT.EDU --krb5kdc=univ.pitt.edu --krb5adminserver=pitt-proddc-01.cssd.pitt.edu
selinux --disabled
timezone America/New_York --isUtc
bootloader --location=mbr --append=" crashkernel=auto"
# 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 --all --initlabel

# part None --fstype=vfat --label="DellUtility" --onpart=sda1 --noformat
part /boot/efi --fstype=vfat --size=200 --ondisk=sda
part /boot --fstype=xfs --size=500 --ondisk=sda
part pv.sda --grow --size=1 --ondisk=sda

volgroup vg_cen7 --pesize=4096 pv.sda
logvol / --fstype=ext4 --name=lv_root --vgname=vg_cen7 --size=4096 --grow
logvol swap --name=lv_swap --vgname=vg_cen7 --size=524288

repo --name="CentOS"  --baseurl=http://mirror.cs.pitt.edu/centos/7/os/x86_64/ --cost=100
repo --name="CentOS 7 - x86_64 - Updates" --baseurl=http://mirror.cs.pitt.edu/centos/7/updates/x86_64/
#repo --name="Extra Packages for Enterprise Linux 7 - x86_64" --baseurl=http://mirror.cs.pitt.edu/epel/7/x86_64/

%packages
%pre
DISKS="/dev/sda"
for DISK in ${DISKS}; do
    parted -s ${DISK} print 2>&1 |grep "unrecognised disk label" > /dev/null
    if [ $? -eq 0 ]; then
        parted -s ${DISK} mklabel gpt
    fi
done
%end
%post
( wget -O /tmp/files.tar http://install.cs.pitt.edu/centos7/proto/files.tar
  cd /
  tar xfp /tmp/files.tar
  sh /tmp/install
  chmod 1777 /tmp
  sync
) 1>/root/post_install.log 2>&1
%end

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

%end
