diff options
Diffstat (limited to 'util/ks.cfg')
-rw-r--r-- | util/ks.cfg | 133 |
1 files changed, 72 insertions, 61 deletions
diff --git a/util/ks.cfg b/util/ks.cfg index 9e33f42f..dd31d8fd 100644 --- a/util/ks.cfg +++ b/util/ks.cfg @@ -1,27 +1,70 @@ +#version=DEVEL +# System authorization information +auth --useshadow --enablemd5 +# Install OS instead of upgrade install +# License agreement +eula --agreed +# Use text mode install text -cdrom -reboot --eject +# Firewall configuration +firewall --disabled +firstboot --disable +# Keyboard layouts +# old format: keyboard us +# new format: +keyboard --vckeymap=us --xlayouts='us' +network --onboot no --device eth0 --bootproto dhcp --noipv6 +network --onboot no --device eth1 --bootproto dhcp --noipv6 +network --onboot no --device eth2 --bootproto dhcp --noipv6 +# System language lang en_US.UTF-8 -keyboard us +# Installation logging level +logging --level=info +# Reboot after installation +reboot +# Root password rootpw root -timezone --utc Etc/UTC -firewall --disabled +# SELinux configuration selinux --disabled -unsupported_hardware +# System services +services --enabled="NetworkManager,sshd" +# Do not configure the X Window System skipx +# System timezone +timezone America/Los_Angeles --isUtc +# System bootloader configuration +bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel +# Disk partitioning information +part swap --asprimary --fstype="swap" --ondisk=sda --size=3072 +part /boot --asprimary --fstype="ext3" --ondisk=sda --size=500 +part pv.64 --fstype="lvmpv" --ondisk=sda --size=27145 +volgroup os --pesize=4096 pv.64 +logvol /var --fstype="ext3" --grow --percent=40 --name=varvol --vgname=os +logvol /tmp --fstype="ext3" --grow --percent=5 --name=tmpvol --vgname=os +logvol / --fstype="ext3" --grow --percent=50 --name=rootvol --vgname=os +logvol /home --fstype="ext3" --grow --percent=5 --name=homevol --vgname=os -# NEVER ever place zerombr here, it breaks automated installation -%include /tmp/bootloader.ks -%include /tmp/partition.ks - -# PREINSTALL SECTION -# HERE ARE COMMANDS THAT WILL BE LAUNCHED BEFORE -# INSTALLATION PROCESS ITSELF %pre #!/bin/sh -# hard drives +set -x -v +exec 1>/tmp/ks-pre.log 2>&1 +# Once root's homedir is there, copy over the log. +while : ; do + sleep 10 + if [ -d /mnt/sysimage/root ]; then + cp /tmp/ks-pre.log /mnt/sysimage/root/ + logger "Copied %pre section log to system" + break + fi +done & + +# hard drivedd drives=(`ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`) default_drive=${drives[0]} @@ -94,60 +137,30 @@ echo "logvol /var/log --vgname=os --size=4096 --percent 40 --grow --name=varlog echo "bootloader --location=mbr --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks %end -%packages --nobase --excludedocs -wget -git -yum -cobbler -cobbler-web -createrepo -mkisofs -syslinux -debmirror -pykickstart -cman -bind -rsync -dhcp -xinetd -tftp-server -gcc -httpd -libselinux-python -python-setuptools -python-devel -mysql-devel -mysql-server -mysql -MySQL-python -redis -mod_wsgi -rabbitmq-server -nfs-utils - %post echo -e "modprobe nf_conntrack_ipv4\nmodprobe nf_conntrack_ipv6\nmodprobe nf_conntrack_tftp\nmodprobe nf_nat_tftp" >> /etc/rc.modules chmod +x /etc/rc.modules echo -e "net.nf_conntrack_max=1048576" >> /etc/sysctl.conf mkdir -p /var/log/coredump echo -e "kernel.core_pattern=/var/log/coredump/core.%e.%p.%h.%t" >> /etc/sysctl.conf + chmod 777 /var/log/coredump echo -e "* soft core unlimited\n* hard core unlimited" >> /etc/security/limits.conf +%end -########################### post install before chroot #################### -%post --nochroot --log=/mnt/sysimage/root/anaconda-post-before-chroot.log +%post --nochroot --log=/root/anaconda-post-before-chroot.log #!/bin/sh set -x SOURCE="/mnt/sysimage/tmp/source" for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done mkdir -p "${SOURCE}" -mount -o bind "/mnt/source" "${SOURCE}" +mount -o bind "/mnt/install/source" "${SOURCE}" +%end -########################### post install after chroot #################### -%post --log=/root/anaconda-post-after-chroot.log -#!/bin/bash -set -x +%post --logfile /var/log/post_install.log +set -x -v +exec 1>/root/ks-post.log 2>&1 function save_nic_cfg() { scrFile="/etc/sysconfig/network-scripts/ifcfg-$1" @@ -197,31 +210,29 @@ ex_gw=$external_gw install_ip=$install_ip install_netmask=$install_netmask install_intf="eth1" -install_hwaddr=`ifconfig $install_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` +#install_hwaddr=`ifconfig $install_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` save_nic_cfg $install_intf $install_ip $install_netmask $install_hwaddr mgmt_ip=$mgmt_ip mgmt_netmask=$mgmt_netmask mgmt_intf="eth0" -mgmt_hwaddr=`ifconfig $mgmt_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` +#mgmt_hwaddr=`ifconfig $mgmt_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` save_nic_cfg $mgmt_intf $mgmt_ip $mgmt_netmask $mgmt_hwaddr external_ip=$external_ip external_netmask=$external_mask external_intf="eth2" -external_hwaddr=`ifconfig $external_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` +#external_hwaddr=`ifconfig $external_intf | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'` save_nic_cfg $external_intf $external_ip $external_netmask $external_hwaddr save_gateway -# already chroot SOURCE=/tmp/source FS=/tmp/fs -echo mkdir -p ${SOURCE} mkdir -p ${FS} @@ -229,7 +240,6 @@ repodir="/var/lib/install_iso" # Copying Centos files mkdir -p ${repodir} -cp -r ${SOURCE} ${repodir}/source cp -rf ${SOURCE} ${repodir}/source rm -rf ${repodir}/source/bootstrap/ \ @@ -247,9 +257,6 @@ cp -rf ${SOURCE}/repos/cobbler/* /opt/cobbler/ cp -rf ${SOURCE}/ansible/* /opt cp -rf ${SOURCE}/repos/* /opt cp -rf ${SOURCE}/loaders.tar.gz /opt - -mkdir -p /var/www - cp -rf ${SOURCE}/pip /var/www/pip cp -rf ${SOURCE}/guestimg /var/www/guestimg @@ -270,5 +277,9 @@ sed -i 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers sed -i 's/^UseDNS/#UseDNS/g' /etc/ssh/sshd_config echo "UseDNS no" >> /etc/ssh/sshd_config +# End post_install_network_config generated code %end +%packages --nobase +@core +%end |