# usual setup
install
reboot
bootloader --timeout=0
lang en_US.UTF-8
keyboard us
timezone --utc Australia/Melbourne
selinux --enforcing
# Perform a text-based install
text
# System authorization information
auth --enableshadow --passalgo=sha512
# clear the disk and create a new mbr partition for boot
zerombr
clearpart --all --initlabel
bootloader --location=mbr --boot-drive=sda
reqpart --add-boot
# create a new logical volume and group for everything lese
part pv.01 --grow --ondisk=sda
volgroup atomicos pv.01
# add a 20GB XFS partition for root
logvol / --size=20000 --fstype="xfs" --name=root --vgname=atomicos
# add a 2GB swap partition
logvol swap --fstype swap --name=lv_swap --vgname=atomicos --size=2048
# disable cloud-init, enable ntp, docker and ssh
services --disabled="cloud-init,cloud-config,cloud-final,cloud-init-local,docker" --enabled="systemd-timesyncd,network,iptables-services,sshd,docker-latest"
# set up OSTree to pull a tree from the USB key
ostreesetup --osname="centos-atomic-host" --remote="centos-atomic-host" --url="file:///install/ostree" --ref="centos-atomic-host/7/x86_64/standard" --nogpg
# create dhcp network interface for initial build
network --bootproto=dhcp --hostname=aemdesign --onboot=yes --device=enp0s3 --ipv6=auto
# create sudo user.
user --name=aemdesign --groups=wheel --password=aemdesign
# once the system boots, switch the ostree repo to be the upstream one so that
# we can pull a new ostree, then upgrade
%post --erroronfail
rm -f /etc/ostree/remotes.d/centos-atomic-host.conf
ostree remote add --set=gpg-verify=true centos-atomic-host 'http://mirror.centos.org/centos/7/atomic/x86_64/repo'
%end
# show IP of vm after boot
%post --erroronfail
echo '#!/bin/sh' > /etc/rc.d/rc.local
echo $'IP0=$(/sbin/ip addr show | grep global | grep brd | grep \'inet \' | cut -d: -f2 | awk \'{ print $2}\')' >> /etc/rc.d/rc.local
echo 'echo "IP: $IP0" > /etc/issue' >> /etc/rc.d/rc.local
echo 'exit 0' >> /etc/rc.d/rc.local
chmod a+x /etc/rc.d/rc.local
%end
# allow aemdesign user to sudo
%post --erroronfail
sed -i '$ a\%aemdesign ALL=(ALL) NOPASSWD:ALL' /etc/sudoers
#sed -i '$ a\%sudo ALL=(ALL) NOPASSWD:ALL' /etc/sudoers
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
%end
#setup second drive for docker image volumes
%post --erroronfail
echo "STORAGE_DRIVER=overlay2
DEVS=/dev/sdb
WIPE_SIGNATURES=true
CONTAINER_ROOT_LV_NAME=dockerlv
CONTAINER_ROOT_LV_SIZE=100%FREE
CONTAINER_ROOT_LV_MOUNT_PATH=/var/lib/docker
VG=dockervg" > /etc/sysconfig/docker-storage-setup
container-storage-setup
%end
Hi all,
I have been trying to figure out why working Kickstart file stoped working after 1803 build.
I am trying to build a Atomic docker host with overlay2 and getting an error:
I am using images from here: http://cloud.centos.org/centos/7/atomic/images/ And I am using Packer.io to drive Virtualbox.
This works fine on 1803 iso.
Here is my kickstart:
Error Screenshots: