Hey everyone...I could use a little bit of help.
I am trying to create a kickstart file to automatically build a CentOS 7 image (using virt-install) for Openstack. I keep running into the anaconda text menu, and I am trying to build an unattended installation. The menu always interrupts the installation and requires user input. It's been a long time since I've worked with Kickstart files.
Here's my .ks file:
Code:
# version RHEL7
install
# from where
url --url=http://mirrors.kernel.org/centos/7/os/x86_64
# language
lang en_US.UTF-8
# keyboard
keyboard --vckeymap=us --xlayouts='us'
# clear the MBR (Master Boot Record)
zerombr yes
# because nobody disagrees to a eula
eula --agreed
services --enabled=NetworkManager,sshd
reboot
# security? (seriously change this later)
firewall --disabled
selinux --disabled
# timezone
timezone America/New_York
# bootloader
bootloader --location=mbr --append="console=tty console=ttyS0 notsc"
# disk partitioning
clearpart --all --initlabel
part / --fstype=ext4 --size=1 --grow
# power off after installation
poweroff
# root password
rootpw openstack
packages nobase
@core
@server-policy
cloud-init
cloud-utils
cloud-utils-growpart
vim-enhanced
screen
end
%post
# set eth0 to recover from dhcp errors
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="yes"
PEERDNS="yes"
IPV6INIT="no"
PERSISTENT_DHCLIENT="1"
EOF
# eth1...the "other" interface
cat > /etc/sysconfig/network-scripts/ifcfg-eth1 << EOF
DEVICE="eth1"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="yes"
PEERDNS="yes"
IPV6INIT="no"
PERSISTENT_DHCLIENT="1"
EOF
# invite packer to the fun
/usr/bin/yum -y install sudo
/usr/sbin/groupadd packer
/usr/sbin/useradd packer -g packer -G wheel
echo "packer"|passwd --stdin packer
echo "packer ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/packer
chmod 0440 /etc/sudoers.d/packer
# drop the mic, we out
yum clean all
%end
EDIT: After a little bit of research, it seems I might have to download the mirror.centos.org/centos-7/7.1.1503/os/x86_64/ directory, place it somewhere and edit the isolinux.cfg file in order to make this work. Is that right?