Skip to content

Instantly share code, notes, and snippets.

@kevsersrca
Last active September 13, 2019 11:15
Show Gist options
  • Save kevsersrca/013dec9e9aa006f31c2e6de6cfd564fd to your computer and use it in GitHub Desktop.
Save kevsersrca/013dec9e9aa006f31c2e6de6cfd564fd to your computer and use it in GitHub Desktop.
Kickstart Notes for Virtualization 😍
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# 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 --device=eno1 --onboot=on --activate
network --bootproto=static --ip=x.x.x.x --netmask=255.255.255.0 --gateway=x.x.x.x --nameserver=8.8.8.8
network --hostname=localhost.localdomain
# Root password
rootpw --iscrypted someLongHashedPassword
# System timezone
timezone someTimeZone --isUtc --nontp
user --name=someUserName --password=someLongHashedPassword --iscrypted --gecos="someUserName"
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information. Erases all partitions from the sda drive.
clearpart --all --initlabel --drives=sda
# Disk partitioning information
part pv.204 --fstype="lvmpv" --ondisk=sda --size=1902212
part /boot/efi --fstype="efi" --ondisk=sda --size=200 --fsoptions="umask=0077,shortname=winnt"
part /boot --fstype="xfs" --ondisk=sda --size=500
volgroup centos --pesize=4096 pv.204
logvol / --fstype="xfs" --grow --maxsize=51200 --size=1024 --name=root --vgname=centos
logvol /home --fstype="xfs" --size=230400 --name=home --vgname=centos
logvol swap --fstype="swap" --size=7808 --name=swap --vgname=centos
%packages
@base
@compat-libraries
@core
@debugging
@development
@network-file-system-client
@remote-system-management
@security-tools
@smart-card
@virtualization-hypervisor
@virtualization-platform
@virtualization-tools
@virtualization-client
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
@kevsersrca
Copy link
Author

#version=DEVEL
install
url --url=http://ftp.funet.fi/pub/mirrors/centos.org/6/os/x86_64/
lang en_US.UTF-8
keyboard us
network --onboot yes --device eth0 --bootproto dhcp --ipv6 auto
rootpw  --iscrypted $6$GtMiMcUTplxvziNh$HPWRzZ8r2rDIBJIcCHspIfwTf5jbSPDXmvJUdy7cDRG01KMmG3Qs91c2U6cIShqaYBENTLU3xqyTMFrDpSfaa.
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --disabled
timezone --utc America/New_York
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet"
zerombr yes
clearpart --linux --drives=vda
volgroup VolGroup --pesize=4096 pv.253002
logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup --grow --size=1024 --maxsize=51200
logvol swap --name=lv_swap --vgname=VolGroup --grow --size=4032 --maxsize=4032

part /boot --fstype=ext4 --size=500
part pv.253002 --grow --size=1

repo --name="CentOS"  --baseurl=http://ftp.funet.fi/pub/mirrors/centos.org/6/os/x86_64/ --cost=100

%packages
@base
@console-internet
@core
@debugging
@directory-client
@hardware-monitoring
@java-platform
@large-systems
@network-file-system-client
@performance
@perl-runtime
@server-platform
@server-policy
@workstation-policy
pax
python-dmidecode
oddjob
sgpio
device-mapper-persistent-data
samba-winbind
certmonger
pam_krb5
krb5-workstation
perl-DBD-SQLite

@kevsersrca
Copy link
Author

#
#Generic Kickstart template for Ubuntu
#Platform: x86 and x86-64
#

#System language
lang en_US

#Language modules to install
langsupport en_US

#System keyboard
keyboard us

#System mouse
mouse

#System timezone
timezone America/New_York

#Root password
rootpw --iscrypted $6$GtMiMcUTplxvziNh$HPWRzZ8r2rDIBJIcCHspIfwTf5jbSPDXmvJUdy7cDRG01KMmG3Qs91c2U6cIShqaYBENTLU3xqyTMFrDpSfaa.

#Initial user (user with sudo capabilities) 
user ubuntu --fullname "Ubuntu User" --password 123qwe

preseed user-setup/allow-password-weak boolean true

#Reboot after installation
reboot

#Use text mode install
text

#Install OS instead of upgrade
install

#Installation media
cdrom
#nfs --server=server.com --dir=/path/to/ubuntu/

#System bootloader configuration
bootloader --location=mbr 

#Clear the Master Boot Record
zerombr yes

#Partition clearing information
clearpart --all --initlabel 

#Basic disk partition
part / --fstype ext4 --size 1 --grow --asprimary 
part swap --size 1024 
part /boot --fstype ext4 --size 256 --asprimary 

#Advanced partition
#part /boot --fstype=ext4 --size=500 --asprimary
#part pv.aQcByA-UM0N-siuB-Y96L-rmd3-n6vz-NMo8Vr --grow --size=1
#volgroup vg_mygroup --pesize=4096 pv.aQcByA-UM0N-siuB-Y96L-rmd3-n6vz-NMo8Vr
#logvol / --fstype=ext4 --name=lv_root --vgname=vg_mygroup --grow --size=10240 --maxsize=20480
#logvol swap --name=lv_swap --vgname=vg_mygroup --grow --size=1024 --maxsize=8192

#System authorization infomation
auth  --useshadow  --enablemd5 

#Network information
network --bootproto=static --ip=x.x.x.x--netmask=255.255.255.0 --gateway=x.x.x.x --nameserver=8.8.8.8 --device=eth1
#network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled 

#Do not configure the X Window System
skipx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment