User:Djflux/rhel8-min-cdrom-text-vbox

lang en_US keyboard us timezone America/Chicago --isUtc rootpw abc123 reboot cdrom text bootloader --append="rhgb quiet crashkernel=auto" zerombr clearpart --all --initlabel autopart authselect select minimal without-nullok with-pamaccess selinux --enforcing firewall --enabled --http --ssh firstboot --disable skipx %packages @^minimal-environment @network-tools git vim-enhanced net-tools bzip2 elfutils-libelf-devel gcc kernel-devel kernel-headers make perl tar %end
 * 1) Add inst.ks=https://www.mediawiki.org/w/index.php?title=User:Djflux/rhel8-min-cdrom-text-vbox&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
 * 4) ENSURE THE RHEL DVD OR ISO IS IN THE PHYSICAL OR VIRTUAL DVD ROM DRIVE. THIS KS FILE WILL NOT WORK
 * 5) WITHOUT IT.
 * 6) This kickstart file will install a RedHat Enterprise Linux 8 minimal environment from the local DVD
 * 7) on any machine. It is specifically designed to install git so that the admin
 * 8) may git clone meza and start a monolith installation on the machine.
 * 1) on any machine. It is specifically designed to install git so that the admin
 * 2) may git clone meza and start a monolith installation on the machine.
 * 1) platform x86_64
 * 1) Needed for compiling VirtualBox Guest Additions

%pre iotty=`tty` exec > $iotty 2> $iotty VB_CURR=`curl -s http://download.virtualbox.org/virtualbox/LATEST-STABLE.TXT` echo echo echo -n "Enter your version of VirtualBox (press ENTER for latest version: ${VB_CURR}): " read USER_VB

if [ ! "x"${USER_VB} == "x" ]; then VBOX_VERSION=${USER_VB} else VBOX_VERSION=${VB_CURR} fi

echo -n $VBOX_VERSION > /tmp/vbox_version.txt

cat >> /tmp/vbox_guest.sh << EOF VBOX_VERSION=`cat /tmp/vbox_version.txt`

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 EOF
 * 1) Cleanup

%end

%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

cp /tmp/vbox_guest.sh /mnt/sysimage/tmp/vbox_guest.sh chroot /mnt/sysimage /bin/sh /tmp/vbox_guest.sh %end