88ca45980281b476f35ade051643ea65fd6849e7
[autocluster.git] / templates / nas-kickstart.cfg
1 # Merged kickstart.  Minor bugfixes come for free bug features should
2 # be configured for the correct version.
3 install
4 cdrom
5 #ignoredisk --drives=[sdb,sdc,sdd,sde,sdf,sdg,sdh,sdi,sdj,sdk,sdl,sdm,sdn,sdo,sdp,sdq,sdr,sds,sdt,sdu,sdv,sdw,sdx,sdy,sdz,sdaa]
6 lang @@KS_LANGUAGE@@
7 keyboard @@KEYBOARD@@
8 skipx
9 text
10 network --device eth0 --bootproto dhcp
11 network --device eth1 --onboot no --bootproto static
12 rootpw @@ROOTPASSWORD@@
13 firewall --disabled
14 selinux --disabled
15 authconfig --enableshadow --enablemd5
16 timezone --utc @@TIMEZONE@@
17 poweroff
18 # if you want to have quiet boots add option 'quiet' to the next line
19 # For debugging purposes or in case of trouble boot messages are very helpful
20 bootloader --location=mbr --driveorder=@@SYSTEM_DISK_PREFIX@@a --append="@@KS_KERNEL_OPTS@@"
21
22 # The following is the partition information you requested
23 # Note that any partitions you deleted are not expressed
24 # here so unless you clear all partitions first, this is
25 # not guaranteed to work
26 zerombr
27 clearpart --linux --initlabel
28 part / --ondisk=@@SYSTEM_DISK_PREFIX@@a --fstype="ext4" --size=@@ROOTSIZE@@
29 part swap --ondisk=@@SYSTEM_DISK_PREFIX@@a --size=@@SWAPSIZE@@
30
31
32
33 #The following Part lists all the packages that are needed for the Installation
34 %packages
35
36 @@@RHEL_PACKAGES@@@
37
38 @@_EXTRA_RHEL_PACKAGES@@
39
40 @@EXTRA_PACKAGES@@
41
42 %end
43
44 %post
45
46 (
47 set -x
48
49 @@@RHEL_SERVICES@@@
50
51 for i in @@EXTRA_CHKCONFIGS@@ ; do
52     chkconfig ${i%:*} ${i#*:}
53 done
54
55 ###
56 f="/etc/sysconfig/network"
57 echo "Switching off IPv6 in ${f}..."
58 sed -i.orig -e 's/NETWORKING_IPV6=yes/NETWORKING_IPV6=no/g' "$f"
59
60 ###
61 echo "Changing device scanning filter settings in lvm.conf to reduce boot time..."
62 x1='filter = \[ "a/\.\*/" \]'
63 y1='filter = \[ "a|\^/dev/mapper/\.\*|", "a|\^/dev/sda\.\*|", "r|\.\*|" ]'
64 x2='# By default we accept every block device:'
65 y2='# Exclude some block devices:'
66 sed -i.orig -e "s@${x1}@${y1}@" -e "s@${x2}@${y2}@" /etc/lvm/lvm.conf
67
68 ###
69 echo "Changing settings so sysstat also reports disk I/O..."
70 /etc/init.d/sysstat stop
71 rm -f /var/log/sa/*
72 for i in "/etc/init.d/sysstat" "/usr/lib64/sa/sa1" ; do
73     sed -i.orig -e 's/sadc -F -L/sadc -d -F -L/g' "$i"
74 done
75
76 ###
77 echo "Setting the value of max opened files..."
78 cat >/etc/security/limits.d/autocluster.cfg <<EOF
79 # Added by autocluster
80 *       soft    nofile  50000
81 *       hard    nofile  50000
82 *       soft    core    unlimited
83 EOF
84
85 ###
86 echo "Set sshd_config to allow more connections..."
87 cat >>/etc/ssh/sshd_config <<EOF
88 # Added by autocluster
89 MaxStartups 1024
90 EOF
91
92 ###
93 echo "Disabling prelinking in /etc/sysconfig/prelink ..."
94 sed -i.orig -e 's/PRELINKING=yes/# Modified by autocluster\n#&\nPRELINKING=no/' /etc/sysconfig/prelink
95
96 ###
97 echo "Disabling some modules..."
98 mkdir -p /etc/modprobe.d
99 cat >>/etc/modprobe.d/z-autocluster.conf <<EOF
100
101 # Added by autocluster
102 alias pcspkr off
103 alias lp off
104 alias parport off
105 alias parport_pc off
106 alias joydev off
107 alias bluetooth off
108 alias l2cap off
109 alias rfcomm off
110 alias video off
111 alias backlight off
112 alias button off
113 alias battery off
114 alias net-pf-10 off
115 alias ipv6 off
116 EOF
117
118 ###
119 echo "Creating new multipath.conf..."
120 f="/etc/multipath.conf"
121 mv -f "$f" "${f}.orig"
122
123 cat >"$f" <<EOF
124 # Added by autocluster
125 defaults {
126 udev_dir                /dev
127 getuid_callout          "/sbin/scsi_id -g -u -s /block/%n"
128 user_friendly_names     yes
129 }
130
131 blacklist {
132 devnode                 "^@@SYSTEM_DISK_PREFIX@@a[0-9]*$"
133 }
134 EOF
135
136 ###
137 echo "Enabling core dumps logging for multipathd..."
138 cat >>/etc/sysconfig/multipathd <<EOF
139 # Added by autocluster
140 DAEMON_COREFILE_LIMIT="unlimited"
141 EOF
142
143 @@@STANDARD_POSTINSTALL@@@
144
145 @@@POSTINSTALL_TEMPLATE@@@
146
147 sync
148
149 ) 2>&1 | tee /var/log/ks-postinstall.log > /dev/console
150
151 %end
152