# Base settings # Install OS instead of upgrade install cdrom # System keyboard keyboard us # System language lang en_US # Installation logging level logging --level=debug # Network information network --device eth0 --bootproto=dhcp # System timezone timezone --utc UTC # Do not configure the X Window System #skipx # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part /boot --fstype="ext4" --size=200 part swap --fstype="swap" --size=512 part / --fstype="ext4" --grow --size=100 auth --useshadow --enablemd5 # Firewall configuration firewall --disabled # Run the Setup Agent on first boot firstboot --disable #Root password rootpw --plain vagrant # SELinux configuration selinux --permissive # Services services --disable=iscsi,iscsid,iptables,ip6tables reboot # Use network installation url --url=http://centos.osuosl.org/6/os/x86_64/ repo --name=updates --baseurl=http://centos.osuosl.org/6/updates/x86_64/ %packages @base -aspell -aspell-en -bluez-utils -bluez-gnome -bluez-hcidump -bluez-libs -ccid -coolkey -finger -gpm -iptstate -irda-utils -jwhois -lftp -logwatch -NetworkManager -pcmciautils -pinfo -rdate -rsh -telnet -firstboot-tui -system-config-network-tui -nfs-utils -nfs-utils-lib -policycoreutils -zsh -autofs -ksh -mdadm -smartmontools -udftools -ipsec-tools -nmap -samba-client -samba-common -xdelta -zisofs-tools -vnc -sendmail postfix acpid e2fsprogs sudo -rdist -ivtv-firmware %post /usr/sbin/groupadd vagrant /usr/sbin/useradd vagrant -g vagrant -G wheel echo "vagrant"|passwd --stdin vagrant echo "vagrant"|passwd --stdin root echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers # kick networking ifdown eth0 ifup eth0 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 # Remove unwanted packages we don't use to save up space yum -y remove gnome-mount gtk2 cups cups-libs libX11 libXau libXdmcp atk \ alsa-lib audiofile portmap ppp avahi iwl*firmware* ql*firmware* \ ipw*firmware aic94xx-firmware atmel-firmware bfa-firmware \ libertas-usb8388-firmware rt61pci-firmware rt73usb-firmware \ xorg-x11-drv-ati-firmware zd1211-firmware wireless-tools # Set yum repos to us for i in CentOS-Base epel ; do sed -i -e 's/^\(mirrorlist.*\)/#\1/g' /etc/yum.repos.d/$i.repo done sed -i -e 's/^#baseurl=.*$releasever\/os\/$basearch\//baseurl=http\:\/\/centos.osuosl.org\/$releasever\/os\/$basearch\//g' /etc/yum.repos.d/CentOS-Base.repo sed -i -e 's/^#baseurl=.*$releasever\/updates\/$basearch\//baseurl=http\:\/\/centos.osuosl.org\/$releasever\/updates\/$basearch\//g' /etc/yum.repos.d/CentOS-Base.repo sed -i -e 's/^#baseurl=.*$releasever\/addons\/$basearch\//baseurl=http\:\/\/centos.osuosl.org\/$releasever\/addons\/$basearch\//g' /etc/yum.repos.d/CentOS-Base.repo sed -i -e 's/^#baseurl=.*$releasever\/extras\/$basearch\//baseurl=http\:\/\/centos.osuosl.org\/$releasever\/extras\/$basearch\//g' /etc/yum.repos.d/CentOS-Base.repo sed -i -e 's/^#baseurl=.*$releasever\/centosplus\/$basearch\//baseurl=http\:\/\/centos.osuosl.org\/$releasever\/centosplus\/$basearch\//g' /etc/yum.repos.d/CentOS-Base.repo sed -i -e 's/^#baseurl=.*$releasever\/contrib\/$basearch\//baseurl=http\:\/\/centos.osuosl.org\/$releasever\/contrib\/$basearch\//g' /etc/yum.repos.d/CentOS-Base.repo # Upgrade anything that may have been missed yum -y upgrade # Really disable selinux cat > /etc/selinux/config << EOM SELINUX=disabled SELINUXTYPE=targeted EOM %end