# System authorization information auth --enableshadow --passalgo=sha512 # we do not want Selinux selinux --disabled # services to activate services --disabled=lm_sensors # default root pass, willbe changed in post-install process anyway rootpw --lock # Accept eula eula --agreed # include the partitioning logic from the pre section. %include /tmp/part-include # disable kdump %addon com_redhat_kdump --disable %end # added for netinstall url --url https://mirror.canada.pialasse.com/releases/testing/10/smeos/x86_64/ repo --name=smeupdates --baseurl=https://mirror.canada.pialasse.com/releases/testing/10/smeupdates/x86_64/ #repo --name=remi-safe --baseurl=http://rpms.famillecollet.com/enterprise/7/safe/x86_64/ #repo --name=smeupdates-testing --baseurl=http://mirror.canada.pialasse.com/releases/testing/10/smeupdates-testing/x86_64/ #firewall --disabled # /added for netinstall %pre --interpreter=/bin/bash # pre section #----- partitioning logic below-------------- # pick the first drive that is not removable and is over MINSIZE DIR="/sys/block" # minimum size of hard drive needed specified in GIGABYTES MINSIZE=5 # Number of detected drives NDEV=0 for DEV in $(lsblk -nl | grep disk | cut -d' ' -f1); do if [ -d /sys/block/$DEV ]; then REMOVABLE=`cat /sys/block/$DEV/removable` if (( $REMOVABLE == 0 )); then SIZE=`cat /sys/block/$DEV/size` GB=$(($SIZE/2**21)) if [ $GB -gt $MINSIZE ]; then DRIVES[$NDEV]=$DEV ((NDEV++)) fi fi fi done # For now keep things simple and just use the first one # TODO: # * Create software RAID depending on the number of detected drives # * Allow non LVM install ROOTDRIVE=${DRIVES[0]} if [ $ROOTDRIVE == "" ] ; then echo "No drive suitable for installation found! Please proceed manually." # first in case detection fails... cat << EOF > /tmp/part-include # Clear the Master Boot Record zerombr # System bootloader configuration clearpart --all --initlabel # Automatically create partitions, no LVM autopart --lvm EOF else cat <<_EOF > /tmp/part-include zerombr clearpart --all --drives=$ROOTDRIVE --initlabel bootloader --boot-drive=$ROOTDRIVE part /boot/efi --fstype=efi --grow --maxsize=200 --size=20 part /boot --fstype xfs --size=500 --ondisk=$ROOTDRIVE --label=BOOT part pv.01 --size=4500 --grow --ondisk=$ROOTDRIVE volgroup main pv.01 logvol / --fstype xfs --name=root --vgname=main --grow --size=3000 --label=ROOT logvol swap --fstype swap --name=swap --vgname=main --recommended --label=SWAP _EOF fi %end # packages to install %packages @base @core -chrony -kexec-tools -firewalld %end %post --interpreter=/usr/bin/bash --log=/var/log/ks.post02.log # before reboot performing post-install # this is for first alpha iso. we should put this in anaconda # and / or handle possible upgrade later /sbin/rsyslogd; sleep 2; /sbin/e-smith/signal-event post-install; sleep 2; /sbin/e-smith/db configuration set UnsavedChanges no; touch /forcequotacheck %end %post --nochroot --log=/mnt/sysimage/var/log/ks.post01.log #!/bin/bash sysimage="/mnt/sysimage" cp -r /tmp/anaconda.log ${sysimage}/root/ %end