#### Title: CentOS 7 Generic Kickstart file for BIOS systems #### Description: Uses /dev/sda, MBR, and LVM to prepare a CentOS minimal installed system. ######################################## #### CUSTOMIZE THESE SECTIONS BELOW #### ######################################## ## Install Location ## graphical nfs --server=10.1.2.3 --dir=/iso/centos7.2-dvd ## Locale Settings ## keyboard --vckeymap=us --xlayouts='us' lang en_US.UTF-8 timezone America/Chicago --isUtc --ntpservers=x.x.x.x,x.x.x.x ## System Configuration ## rootpw --iscrypted ####################################### #### END OF CUSTOMIZATION SECTIONS #### ####################################### ## Networking ## #network settings are inherited from the kernel image boot options in order to keep the kickstart generic ## System Configuration ## auth --enableshadow --passalgo=sha512 eula --agreed firewall --service=ssh selinux --disabled ## Disk Partitioning ## ignoredisk --only-use=sda bootloader --location=mbr --boot-drive=sda clearpart --all --initlabel --drives=sda zerombr # Physical Partitions # part /boot --fstype="ext4" --ondisk=sda --size=512 part pv.01 --fstype="lvmpv" --ondisk=sda --grow --size=18512 # LVM Setup # volgroup vglocal --pesize=4096 pv.01 logvol /tmp --fstype="ext4" --size=2048 --name=lvtmp --vgname=vglocal logvol swap --fstype="swap" --size=8192 --name=lvswap --vgname=vglocal logvol /home --fstype="ext4" --size=4096 --name=lvhome --vgname=vglocal logvol / --fstype="ext4" --size=4096 --name=lvroot --vgname=vglocal logvol /var --fstype="ext4" --size=4096 --name=lvvar --vgname=vglocal ## System services ## services --enabled="chronyd" ## Packages to Install ## %packages @^minimal @core chrony nfs-utils %end ## KDUMP - Disable ## %addon com_redhat_kdump --disable --reserve-mb='auto' %end ## Reboot After Installation ## reboot --eject #### Auto execute post install commands #### %post --interpreter /bin/sh --log=/root/ks-post.log ( ## Enter post install commands here to execute prior to reboot # Useful for performing something like the below example: # Startup rpcbind for NFS #systemctl start rpcbind # Mount admin share #mount -vt nfs 10.1.2.3:/admin /mnt # Create /root/scripts dir #mkdir /root/scripts # Copy the firstboot script to the new dir, set owner/permissions #cp -v /mnt/deploy/firstboot/firstboot.sh /root/scripts/ #chown -Rv root:root /root/scripts #chmod -Rv 700 /root/scripts # Copy firstboot service unit to system, set owner/permissions #cp -v /mnt/deploy/firstboot/firstboot.service /etc/systemd/system/ #chown -v root:root /etc/systemd/system/firstboot.service #chmod -v 644 /etc/systemd/system/firstboot.service # Enable firstboot service for next boot #systemctl enable firstboot.service # Un-mount admin share #umount -v /mnt ) %end