Skip to content

Instantly share code, notes, and snippets.

@bkmeneguello
Last active October 23, 2019 21:36
Show Gist options
  • Save bkmeneguello/925697c03d01a25bc01f8c67923ff470 to your computer and use it in GitHub Desktop.
Save bkmeneguello/925697c03d01a25bc01f8c67923ff470 to your computer and use it in GitHub Desktop.
# https://pykickstart.readthedocs.io/en/latest/
# https://rhinstaller.github.io/anaconda
# virt-install --name teste --memory 2048 --disk size=10 --cpu host-passthrough --accelerate --hvm --location http://mirror.centos.org/centos/7/os/x86_64/ --os-variant centos7.0 --network bridge=virbr0,model=virtio --initrd-inject ks.cfg --extra-args "inst.ks=file:/ks.cfg inst-nosave=all console=tty0 console=ttyS0,115200" --nographics
#version=DEVEL
# System authorization information
auth --passalgo=sha512 --enableshadow
# Install OS instead of upgrade
install
cmdline
# Firewall configuration
firewall --enabled --service=ssh
firstboot --disable
ignoredisk --only-use=vda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts=''
# System language
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --device=eth0 --noipv6 --activate
network --hostname=localhost.localdomain
# Reboot after installation
reboot
# Use network installation
#url --url="http://mirror.centos.org/centos/7/os/x86_64/"
cdrom
# Root password
rootpw --plaintext root
# SELinux configuration
selinux --enforcing
# System services
services --enabled="chronyd"
# Do not configure the X Window System
skipx
# System timezone
timezone America/Sao_Paulo --isUtc
user --groups=wheel --name=centos --password=centos
# System bootloader configuration
bootloader --append="rhgb quiet crashkernel=auto" --location=mbr --boot-drive=vda
autopart --type=plain
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
%packages
@core
chrony
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%post
sed -e 's/\(^%wheel.*$\)/# \1/g' -e 's/^# \(%wheel.*NOPASSWD.*$\)/\1/g' -i /etc/sudoers
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment