-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrhel7.cfg
83 lines (68 loc) · 1.75 KB
/
rhel7.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
install
url --url http://mirror.airenetworks.es/CentOS//7/os/x86_64/
repo --name="CentOS" --baseurl=http://mirror.airenetworks.es/CentOS/7/os/x86_64/ --cost=100
#
lang en_US.UTF-8
keyboard us
#network --device=eth0 --bootproto=dhcp --noipv6
#%include /tmp/network.ks
rootpw password
sshpw --username=root password
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --disabled
timezone Europe/Madrid
eula --agreed
bootloader --location=mbr --append="console=ttyS0 elevator=noop"
text
skipx
zerombr
clearpart --all --initlabel
part /boot --asprimary --fstype ext3 --size=512
part / --asprimary --fstype xfs --size=1 --grow
part swap --asprimary --size=512
auth --useshadow --enablemd5
firstboot --disabled
# reboot after installation completes
reboot
%packages --nobase --ignoremissing --excludedocs
@core --nodefaults
-aic94xx-firmware*
-alsa-*
-biosdevname
-btrfs-progs*
-dhcp*
-dracut-network
-iprutils
-ivtv*
-iwl*firmware
-libertas*
-kexec-tools
-NetworkManager*
-plymouth*
-postfix
openssh-clients
%end
%pre
#!/bin/sh
for x in `cat /proc/cmdline`; do
case $x in HOSTNAME*)
eval $x
echo "network --device eth0 --bootproto dhcp --hostname ${HOSTNAME}" > /tmp/network.ks
;;
esac;
done
%end
%post --log=/root/post-log
#Disable IPV6
/bin/echo "# IPv6 disabled" > /etc/sysctl.d/40-ipv6.conf
/bin/echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.d/40-ipv6.conf
/bin/echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.d/40-ipv6.conf
/bin/echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.d/40-ipv6.conf
#Grub2
sed -i 's#GRUB_TIMEOUT=.*#GRUB_TIMEOUT=1#' /etc/default/grub
echo 'GRUB_DISABLE_LINUX_UUID=true' >> /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
%end
%addon com_redhat_kdump --disable
%end