-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuildTimeConfig.cfg
executable file
·232 lines (211 loc) · 4.55 KB
/
buildTimeConfig.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
#!/bin/bash
#
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#################################################################################
#
# File: buildTimeConfig.cfg
#
# Description: autoinstall configuration
#
#################################################################################
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
text
reboot
# Run the Setup Agent on first boot
firstboot --disable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# System timezone
timezone America/New_York --isUtc
# Network information
network --bootproto=dhcp --device=eth0 --onboot=yes --ipv6=auto --hostname=localhost.localdomain
# Root password
rootpw "oracle"
# System services
services --disabled="firewalld,kdump,rhsmcertd" --enabled="ip6tables,iptables,network,sshd,rsyslog,chronyd"
selinux --permissive
firewall --service=ssh
# System bootloader configuration
bootloader --append="console=tty0" --location=mbr --timeout=1 --boot-drive=sda
# Partition clearing information
zerombr
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=sda --size=502 --label=/boot
#part / --fstype="xfs" --ondisk=sda --size=4096 --grow --label=/
part btrfs.12 --fstype="btrfs" --ondisk=sda --size=4096 --grow
btrfs none --label=btr_pool --data=single btrfs.12
btrfs / --subvol --name=root btr_pool
part swap --fstype="swap" --ondisk=sda --size=4096 --label=SWAP-VM
%packages --nobase
yum
initscripts
passwd
rsyslog
vim-minimal
openssh-server
openssh-clients
dhclient
chkconfig
rootfiles
policycoreutils
checkpolicy
selinux-policy
selinux-policy-targeted
libselinux
oraclelinux-release
yum-rhn-plugin
yum-plugin-security
# dmp pkgs is required for AMI, so comment these
device-mapper-libs
device-mapper
kpartx
net-tools
iptables-services
btrfs-progs
chrony
acpid
tmpwatch
ed
## Packages to Remove
-acl
-attr
-audit
-oraclelinux-release-notes
-efibootmgr
-kexec-tools
# deps for efibootmgr and kexec-tools
-bc
-busybox
-elfutils-libs
-mdadm
-pciutils-libs
-snappy
# crontabs related pkgs
-cronie-anacron
-cronie
-crontabs
-cyrus-sasl
-postfix
-lzo
-mysql-libs
# others
-NetworkManager
-aic94xx-firmware
-alsa-firmware
-alsa-lib
-alsa-tools-firmware
-iprutils
-ivtv-firmware
-iwl100-firmware
-iwl1000-firmware
-iwl105-firmware
-iwl135-firmware
-iwl2000-firmware
-iwl2030-firmware
-iwl3160-firmware
-iwl3945-firmware
-iwl4965-firmware
-iwl5000-firmware
-iwl5150-firmware
-iwl6000-firmware
-iwl6000g2a-firmware
-iwl6000g2b-firmware
-iwl6050-firmware
-iwl7260-firmware
-libertas-sd8686-firmware
-libertas-sd8787-firmware
-libertas-usb8388-firmware
-plymouth
-biosdevname
-b43-openfwwf
-wireless-tools
-system-config-securitylevel-tui
%end
# Add custom pre install scripts
#
%pre
#!/bin/sh
bootdev="sda"
fdisk -u /dev/${bootdev} >>log 2>&1 <<__FDISK_CMD__
x
h
64
s
32
c
2048
r
n
p
1
2048
1030143
n
p
2
1030144
9418751
n
p
3
9418752
t
2
82
w
__FDISK_CMD__
%end
%post --interpreter /bin/sh
echo -n "Network fixes"
# initscripts don't like this file to be missing.
cat > /etc/sysconfig/network << EOF
NETWORKING=yes
NOZEROCONF=yes
EOF
# 'eth0' _is_ the predictable device name, since
# we don't want to be tied to specific virtual (!) hardware
rm -f /etc/udev/rules.d/70*
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
# simple eth0 config, again not hard-coded to the build hardware
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
# generic localhost names
cat > /etc/hosts << EOF
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
EOF
echo .
# make sure firstboot doesn't start
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
#add user oracle password oracle in wheel ie sudo
useradd -G wheel oracle
echo "oracle:oracle" | chpasswd
%end