Differences
This shows you the differences between two versions of the page.
linux_wiki:os_install_kickstart [2016/11/29 22:13] billdozor |
linux_wiki:os_install_kickstart [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== OS Install: Kickstart Examples ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Kickstart file examples. | ||
- | |||
- | **Checklist** | ||
- | * Distro(s): Enterprise Linux 6/7 | ||
- | |||
- | ---- | ||
- | |||
- | ====== External Resources ====== | ||
- | |||
- | * [[https:// | ||
- | |||
- | ---- | ||
- | |||
- | ====== Kickstart Install ====== | ||
- | |||
- | See this page for the complete process: [[linux_wiki: | ||
- | |||
- | ---- | ||
- | |||
- | ====== CentOS 6 Example Kickstart File ====== | ||
- | |||
- | The following kickstart file performs a network install of CentOS 6 minimal, on /dev/sda, using MBR, with LVM, and reboots after installation. | ||
- | |||
- | **Modify the encrypted root password before using.** | ||
- | |||
- | <code bash centos6-ks-bios.cfg> | ||
- | #### Title: CentOS 6 Generic Kickstart file for BIOS systems | ||
- | #### Description: | ||
- | |||
- | ######################################## | ||
- | #### CUSTOMIZE THESE SECTIONS BELOW #### | ||
- | ######################################## | ||
- | |||
- | ## Install Location ## | ||
- | install | ||
- | nfs --server=10.0.0.200 --dir=/ | ||
- | |||
- | ## Locale Settings ## | ||
- | lang en_US.UTF-8 | ||
- | keyboard us | ||
- | |||
- | ## System Configuration ## | ||
- | rootpw | ||
- | |||
- | ####################################### | ||
- | #### END OF CUSTOMIZATION SECTIONS #### | ||
- | ####################################### | ||
- | |||
- | ## Networking ## | ||
- | #network settings are inherited from the kernel image boot options in order to keep the kickstart generic | ||
- | |||
- | ## System Configuration ## | ||
- | firewall --service=ssh | ||
- | authconfig --enableshadow --passalgo=sha512 | ||
- | selinux --disabled | ||
- | timezone --utc America/ | ||
- | |||
- | ## Disk Partitioning ## | ||
- | bootloader --location=mbr --driveorder=sda --append=" | ||
- | |||
- | # 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=26624 --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=8192 | ||
- | 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 --eject | ||
- | |||
- | #### Auto execute post install commands #### | ||
- | %post --interpreter /bin/sh --log=/ | ||
- | ( | ||
- | ## Enter post install commands here to execute prior to reboot | ||
- | # Useful for performing something like the below example: | ||
- | |||
- | # Startup rpcbind for NFS | ||
- | #service rpcbind start | ||
- | |||
- | # Mount admin share | ||
- | #mount -vt nfs 10.1.2.3:/ | ||
- | |||
- | # Create / | ||
- | #mkdir / | ||
- | |||
- | # Copy the firstboot script to the new dir, set owner/ | ||
- | #cp -v / | ||
- | #chown -Rv root:root / | ||
- | #chmod -Rv 700 / | ||
- | |||
- | # Create line in rc.local to auto-execute the firstboot script | ||
- | #echo "/ | ||
- | |||
- | # Un-mount admin share | ||
- | #umount -v /mnt | ||
- | ) | ||
- | %end | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== CentOS 7 Example Kickstart File ====== | ||
- | |||
- | **Modify the encrypted root password before using.** | ||
- | |||
- | ===== CentOS 7 BIOS Kickstart ===== | ||
- | |||
- | <code bash centos7-ks-bios.cfg> | ||
- | #### Title: CentOS 7 Generic Kickstart file for BIOS systems | ||
- | #### Description: | ||
- | |||
- | ######################################## | ||
- | #### CUSTOMIZE THESE SECTIONS BELOW #### | ||
- | ######################################## | ||
- | |||
- | ## Install Location ## | ||
- | graphical | ||
- | nfs --server=10.1.2.3 --dir=/ | ||
- | |||
- | ## Locale Settings ## | ||
- | keyboard --vckeymap=us --xlayouts=' | ||
- | lang en_US.UTF-8 | ||
- | timezone America/ | ||
- | |||
- | ## System Configuration ## | ||
- | rootpw | ||
- | |||
- | ####################################### | ||
- | #### 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=" | ||
- | part pv.01 --fstype=" | ||
- | |||
- | # LVM Setup # | ||
- | volgroup vglocal --pesize=4096 pv.01 | ||
- | logvol /tmp --fstype=" | ||
- | logvol swap --fstype=" | ||
- | logvol /home --fstype=" | ||
- | logvol / --fstype=" | ||
- | logvol /var --fstype=" | ||
- | |||
- | ## System services ## | ||
- | services --enabled=" | ||
- | |||
- | ## Packages to Install ## | ||
- | %packages | ||
- | @^minimal | ||
- | @core | ||
- | chrony | ||
- | nfs-utils | ||
- | %end | ||
- | |||
- | ## KDUMP - Disable ## | ||
- | %addon com_redhat_kdump --disable --reserve-mb=' | ||
- | |||
- | %end | ||
- | |||
- | ## Reboot After Installation ## | ||
- | reboot --eject | ||
- | |||
- | #### Auto execute post install commands #### | ||
- | %post --interpreter /bin/sh --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:/ | ||
- | |||
- | # Create / | ||
- | #mkdir / | ||
- | |||
- | # Copy the firstboot script to the new dir, set owner/ | ||
- | #cp -v / | ||
- | #chown -Rv root:root / | ||
- | #chmod -Rv 700 / | ||
- | |||
- | # Copy firstboot service unit to system, set owner/ | ||
- | #cp -v / | ||
- | #chown -v root:root / | ||
- | #chmod -v 644 / | ||
- | |||
- | # Enable firstboot service for next boot | ||
- | #systemctl enable firstboot.service | ||
- | |||
- | # Un-mount admin share | ||
- | #umount -v /mnt | ||
- | ) | ||
- | %end | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== CentOS 6/7 EFI Kickstart ====== | ||
- | |||
- | The only difference for EFI based systems in a kickstart file is the addition of a /boot/efi partition. | ||
- | |||
- | It is placed in the " | ||
- | <code bash> | ||
- | # Physical Partitions # | ||
- | part /boot --fstype=" | ||
- | part /boot/efi --fstype=" | ||
- | part pv.01 --fstype=" | ||
- | </ | ||
- | |||
- | ---- | ||