Title here
Summary here
Any manual install of rhel or centos will generate a kickstart from the options you chose during installation and store them in /root (anaconda-ks.cfg ks_post.log original-ks.cfg)
git clone https://github.com/rhinstaller/anaconda && \
cd anaconda
view pyanaconda/core/kickstart/commands.py
This is the preferred method, will need to track down my notes on how to create one.
linux inst.ks=https://git.andrewmercer.net/amercer/kickstart/raw/master/server_ks.cfg [ networking_options ]
# Project ID
curl https://git.andrewmercer.net/api/v3/projects?private_token=[ my_private_token ] | grep -i kickstart
# File ID
curl https://git.andrewmercer.net/api/v3/projects/145/repository/tree?private_token=[ my_private_token ]
linux inst.ks=https://[ gitlab_user ]:[ gitlab_password ]@git.andrewmercer.net/api/v3/projects/145/repository/raw_blobs/<file_id>?private_token=[ my_private_token ] [ networking_options ]
KS_DIR="/build/RHEL7/isolinux/ks"
mkdir -p $KS_DIR
cp [ kickstart_file ]_ks.cfg $KS_DIR/ks.cfg
sudo mkisofs -o <hostname>.iso -b isolinux.bin -c boot.cat -no-emul-boot -V 'CentOS 7 x86_64' -boot-load-size 4 -boot-info-table -R -J -v -T /build/RHEL7/isolinux/
linux inst.ks=cdrom:/dev/cdrom:/ks/[ kickstart_file ].cfg [ networking_options ]
linux inst.ks=http://[ server_address ]/kickstart/[ kickstart_file ].cfg [ networking_options ]
linux inst.ks=http://[ server_address ]/ks/[ kickstart_file ].cfg [ networking_options ] bond=bond0:ens160,ens192:mode=802.3ad,primary=ens160
(VMware floppy image)
linux inst.ks=hd:fd0:/[ kickstart_file ].cfg [ networking_options ]
(DRAC image file)
linux inst.ks=hd:/dev/sdb:/[ kickstart_file ].cfg [ networking_options ]
ip=192.168.1.238::192.168.1.1:255.255.255.0:[ my_hostname ]:ens160:none nameserver=192.168.1.1
ip=<ip>::<gateway>:<netmask>:<hostname>:<interface>:none nameserver=<nameserver_ip>
sudo dnf install pykickstart
Lint your kickstart files
ksvalidator ~/kickstart/standard_rhel7_virt_ks.cfg
See changes between Red Hat versions
ksverdiff -f rhel7 -t rhel8
I haven’t used this tool, but more information can be found in the man page
man ksflatten
ksshell is an interactive kickstart shell. I haven’t used this tool, but more information can be found in the man page
man ksshell
arp -an > leases_before.txt
For example:
sudo virt-install --name cluster0 --description "cluster0" --memory=1024 --vcpus=1 --location ~/CentOS-7-x86_64-Minimal-1908.iso \
--os-type=linux --os-variant=rhel7 --disk pool=default,bus=virtio,size=10 --network bridge=br0,model=virtio --graphics none --console=pty,target_type=serial \
--extra-args "console=ttyS0,115200n8 inst.sshd=1 ks=http://192.168.0.50:8000/standard_ks.cfg ip=dhcp"
arp -an > leases_after.txt
sdiff leases_before.txt leases_after.txt
ssh root@[ instance_ip ]
Shouldn’t require a password.