This is an old revision of the document!
OS Install: Kickstart
General Information
How to install Enterprise Linux using a kickstart file.
Checklist
- Enterprise Linux 6/7 Install DVD
- NFS Server sharing the kickstart file and install iso
Kickstart Install
- Boot a system to installation media
- On the “Welcome to CentOS” screen, highlight “Install or Upgrade an existing system” and press “tab” to edit boot options.
- After “vmlinuz initrd=initrd.img”, append:
ks=nfs:<nfs-server-ip>:/ISO/centos6.7-dvd/centos6-ks.cfg ksdevice=eth0 ip=x.x.x.x netmask=x.x.x.x gateway=x.x.x.x nameserver=<dns-ip>,<dns-ip>
- Note: This can be pasted into the console by using most KVM menus. (Keyboard > Send Text to Target… > Paste in text > click Ok)
CentOS 6 Example Kickstart File
The following kickstart file performs a network install of CentOS 6 minimal, on /dev/sda, with LVM, and reboots after installation.
Modify the IP addresses in the “CUSTOMIZE” sections and paste in an encrypted root password before using.
- centos6-ks.cfg
#### Title: CentOS 6 Generic Kickstart file #### Description: Uses /dev/sda, eth0, and LVM to prepare a CentOS minimal installed system. ######################################## #### CUSTOMIZE THESE SECTIONS BELOW #### ######################################## ## Install Location ## install nfs --server=10.0.0.200 --dir=/ISO/centos6.7-dvd ## Locale Settings ## lang en_US.UTF-8 keyboard us ## Networking ## network --onboot yes --device eth0 --bootproto static --ip 10.0.0.100 --netmask 255.255.255.0 --gateway 10.0.0.254 --noipv6 --nameserver 10.0.0.1,10.0.0.2 --hostname myserver.local ## System Configuration ## rootpw --iscrypted <root-hash-here> ####################################### #### END OF CUSTOMIZATION SECTIONS #### ####################################### ## System Configuration ## firewall --service=ssh authconfig --enableshadow --passalgo=sha512 selinux --disabled timezone --utc America/Chicago bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" ## Disk Partitioning ## # Clear Partitions => clear disk /dev/sda partitions, initialize partition tables (zerombr) # clearpart --drives=sda --all zerombr # Physical Partitions # part /boot --fstype=ext4 --size=512 --ondisk=sda part pv.01 --grow --size=18500 --ondisk=sda # LVM Setup # volgroup vglocal --pesize=4096 pv.01 logvol /home --fstype=ext4 --name=lvhome --vgname=vglocal --size=4096 logvol / --fstype=ext4 --name=lvroot --vgname=vglocal --size=4096 logvol swap --name=lvswap --vgname=vglocal --size=4096 logvol /tmp --fstype=ext4 --name=lvtmp --vgname=vglocal --size=2048 logvol /var --fstype=ext4 --name=lvvar --vgname=vglocal --size=4096 ## Packages to Install ## %packages @core @server-policy @workstation-policy nfs-utils %end ## Reboot After Installation ## reboot