Skip to content

Commit 2d391f9

Browse files
committed
Check in centos 8.1 kickstart with updated GRUB_TIMEOUT/GRUB_TIMEOUT_STYLE settings, config for point release builds and bind-utils per CentOS/sig-cloud-instance-build#173
1 parent 8f46a34 commit 2d391f9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ks/azure/centos81.ks

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ rng-tools
9090
cracklib
9191
cracklib-dicts
9292
centos-release
93+
bind-utils
9394
python3
9495

9596
# pull firmware packages out
@@ -137,21 +138,27 @@ gdisk
137138
# Disable the root account
138139
usermod root -p '!!'
139140

141+
# Set these to the point release baseurls so we can recreate a previous point release without current major version updates
140142
# Set Base and AppStream repos to the Azure mirrors
141143
sed -i 's/mirror.centos.org/olcentgbl.trafficmanager.net/' /etc/yum.repos.d/CentOS-AppStream.repo
142144
sed -i 's/^mirrorlist/#mirrorlist/' /etc/yum.repos.d/CentOS-AppStream.repo
143145
sed -i 's/^#baseurl/baseurl/' /etc/yum.repos.d/CentOS-AppStream.repo
146+
sed -i -e 's/$releasever/8.1.1911/' /etc/yum.repos.d/CentOS-AppStream.repo
144147

145148
sed -i 's/mirror.centos.org/olcentgbl.trafficmanager.net/' /etc/yum.repos.d/CentOS-Base.repo
146149
sed -i 's/^mirrorlist/#mirrorlist/' /etc/yum.repos.d/CentOS-Base.repo
147150
sed -i 's/^#baseurl/baseurl/' /etc/yum.repos.d/CentOS-Base.repo
151+
sed -i -e 's/$releasever/8.1.1911/' /etc/yum.repos.d/CentOS-Base.repo
148152

149153
# Import CentOS public key
150154
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
151155

152156
# Set the kernel cmdline
153157
sed -i 's/^\(GRUB_CMDLINE_LINUX\)=".*"$/\1="console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 rootdelay=300 scsi_mod.use_blk_mq=y"/g' /etc/default/grub
154158

159+
# Enforce GRUB_TIMEOUT=1 and remove any existing GRUB_TIMEOUT_STYLE and append GRUB_TIMEOUT_STYLE=countdown after GRUB_TIMEOUT
160+
sed -i -n -e 's/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=1/' -e '/^GRUB_TIMEOUT_STYLE=/!p' -e '/^GRUB_TIMEOUT=/aGRUB_TIMEOUT_STYLE=countdown' /etc/default/grub
161+
155162
# Enable grub serial console
156163
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >> /etc/default/grub
157164
sed -i 's/^GRUB_TERMINAL_OUTPUT=".*"$/GRUB_TERMINAL="serial console"/g' /etc/default/grub
@@ -242,6 +249,11 @@ dnf clean all
242249
# Set tuned profile
243250
echo "virtual-guest" > /etc/tuned/active_profile
244251

252+
253+
# Unset point release at the end of the post-install script so we can recreate a previous point release without current major version updates
254+
sed -i -e 's/8.1.1911/$releasever/' /etc/yum.repos.d/CentOS-Base.repo
255+
sed -i -e 's/8.1.1911/$releasever/' /etc/yum.repos.d/CentOS-AppStream.repo
256+
245257
# Deprovision and prepare for Azure
246258
/usr/sbin/waagent -force -deprovision
247259

0 commit comments

Comments
 (0)