User:Djflux/r8-vbox-kickstart

text lang en_US keyboard us timezone America/New_York --isUtc rootpw abc123 reboot url --url=https://ord.mirror.rackspace.com/rocky/8/BaseOS/x86_64/os bootloader --append="rhgb quiet crashkernel=auto" zerombr clearpart --all --initlabel autopart auth --passalgo=sha512 --useshadow selinux --enforcing firewall --enabled --http --ssh firstboot --disable %packages @^workstation-product-environment @network-tools git vim-enhanced net-tools gcc make perl kernel-devel kernel-headers elfutils-libelf-devel %end
 * 1) Add inst.ks=https://www.mediawiki.org/w/index.php?title=Meza/RockyLinuxKickstart&action=raw to the boot statement
 * 2) See https://github.com/pykickstart/pykickstart/blob/master/docs/kickstart-docs.rst for kickstart documentation
 * 3) Use this Kickstart File for testing Meza version: https://github.com/djflux/meza/tree/rhel8-35.x
 * 1) platform x86_64
 * 1) Needed for compiling VirtualBox Guest Addtions

%post --nochroot --log=/mnt/sysimage/var/log/ks-post.log cat >> /mnt/sysimage/etc/profile.d/mystuff.sh << EOF alias dir='ls --color -la | more' alias cls=clear alias vi=vim

export PS1="[\u@\h \w]\\\\$ " EOF %end

%post iotty=`tty` exec > $iotty 2> $iotty { echo -n "Enter the VirtualBox version running (e.g. 6.1.34): " read VBOX_VERSION

cd /tmp curl -O http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
 * 1) Change to temp directory and download VboxGuestAdditions

mkdir -p /mnt/vbox mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt/vbox sh /mnt/vbox/VBoxLinuxAdditions.run
 * 1) Mount and run iso

umount /mnt/vbox rm /tmp/VBoxGuestAdditions_$VBOX_VERSION.iso
 * 1) Cleanup

}|& tee -a /tmp/vbox-guestinstall.log

systemctl set-default graphical.target %end
 * 1) Set GUI login as default