kickstart_file_example
Kickstart Example File
This builds a machine with known partitions and a known root password
- ks.ks
#version=RHEL7 # System authorization information auth --enableshadow --passalgo=sha512 # Agree to any EULA eula --agreed # Use CDROM installation media cdrom # Use text install text # Reboot after install reboot --eject # Run the Setup Agent on first boot firstboot --enable ignoredisk --only-use=sda # Keyboard layouts keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 # Network information network --bootproto=dhcp --onboot=on --ipv6=auto network --hostname=changeme.cyli.org # Root password rootpw --iscrypted $6$GsAW0S/07xHgUyWd$doV1nU/kBTUIWLSirqD./R.g69xLVDEdKjJ2zJNUjK3t6IJBdIYW4v9hQM380i0yUAks90O4nJ4WoZ9d42cqX0 # Generate tha password with; # python -c 'import crypt,getpass;pw=getpass.getpass();print(crypt.crypt(pw) \ # if (pw==getpass.getpass("Confirm: ")) else exit())' # System timezone timezone America/New_York --isUtc # System bootloader configuration bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda # Partition clearing information clearpart --all --initlabel # Disk partitioning information # Create /boot as 2GiB part /boot --fstype="xfs" --size=2000 # Create the Physical Volume as the remainder of the drive part pv.1 --fstype="lvmpv" --size=1 --grow # Create a Volume Group named Centos volgroup centos pv.1 # Create the Swap Logical Volume as 8GiB logvol swap --fstype="swap" --size=8000 --name=swap --vgname=centos # Create the Route Logical Volume as the rest of the drive logvol / --fstype="xfs" --size=1 --grow --name=root --vgname=centos %packages @core kexec-tools vim-minimal %end %addon com_redhat_kdump --enable --reserve-mb='auto' %end %post CFG=$(ls /etc/sysconfig/network-scripts/ifcfg-e* | head -1) echo "DOMAIN=\"cotton.cyli.org cyli.org voip.cyli.org\"" >> ${CFG} %end
kickstart_file_example.txt · Last modified: by steve
