Updates docs for SR1 with final revision
[genesis.git] / fuel / build / f_isoroot / f_kscfg / ks.cfg.orig
1 install
2 text
3 %include /tmp/source.ks
4 reboot --eject
5 lang en_US.UTF-8
6 keyboard us
7 rootpw r00tme
8 timezone --utc Etc/UTC
9 firewall --disabled
10 selinux --disabled
11 # ignore unsupported hardware warning
12 unsupported_hardware
13 # SKIP CONFIGURING X
14 skipx
15 # NEVER ever place zerombr here, it breaks automated installation
16 %include /tmp/bootloader.ks
17 %include /tmp/partition.ks
18
19 # PREINSTALL SECTION
20 # HERE ARE COMMANDS THAT WILL BE LAUNCHED BEFORE
21 # INSTALLATION PROCESS ITSELF
22 %pre
23 #!/bin/sh
24
25 # hard drives
26 drives=""
27 removable_drives=""
28 for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do
29     if !(blkid | grep -q "${drv}.*Fuel"); then
30       if (grep -q 0 /sys/block/${drv}/removable); then
31           drives="${drives} ${drv}"
32       else
33           removable_drives="${removable_drives} ${drv}"
34       fi
35     fi
36 done
37 default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
38
39 installdrive="undefined"
40 forceformat="no"
41 for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
42
43 set ${drives} ${removable_drives}
44 numdrives=`echo $#`
45
46 tgtdrive="${installdrive}"
47
48 function confirm_format {
49   check_drive="$1"
50   local confirm_format="no"
51
52   if [[ "$forceformat" == "yes" ]] ; then
53     return 0
54   fi
55
56   if parted -s /dev/$check_drive print &>/dev/null ; then
57     echo
58     echo "$check_drive drive contains partition table:"
59     parted -s /dev/$check_drive print
60     echo
61     read -p "Are you sure you want to erase ALL data on disk $check_drive? (y/N)" confirm_format
62     if [[ "$confirm_format" == "y" ]] || [[ "$confirm_format" == "Y" ]] || [[ "$forceformat" == "yes" ]]; then
63       return 0
64     else
65       return 1
66     fi
67   else
68     return 0
69   fi
70 }
71
72 format_confirmed="no"
73
74 if [ $numdrives -lt 1 ]; then
75     exec < /dev/tty3 > /dev/tty3 2>&1
76     chvt 3
77     clear
78     echo
79     echo '********************************************************************'
80     echo '*                            E R R O R                             *'
81     echo '*                                                                  *'
82     echo '*      There is no suitable media available for installation.      *'
83     echo '*                Please attach a drive and try again.              *'
84     echo '*                                                                  *'
85     echo '********************************************************************'
86     echo
87     read -p "Press Enter to shut down the system: " _
88     poweroff
89 fi
90
91 if [ ${numdrives} -gt 1 ] || [ `echo ${drives} | wc -w` -eq 0 ] ; then
92     exec < /dev/tty3 > /dev/tty3 2>&1
93     chvt 3
94     while [ "${tgtdrive}" = "undefined" ]; do
95         clear
96         echo
97         echo '********************************************************************************'
98         echo '*                                 W A R N I N G                                *'
99         echo '*                                                                              *'
100         echo '*  Which of the detected hard drives do you want to be used as                 *'
101         echo '*  the installation target?                                                    *'
102         echo '*                                                                              *'
103         echo '********************************************************************************'
104         echo
105         echo "Possible choices"
106         echo "Persistent drives: ${drives}"
107         echo "Removable drives: ${removable_drives}"
108         echo
109         if [ `echo ${drives} | wc -w` -eq 1 ] ; then
110             read -t 30 -p "Choose hard drive: " tgtdrive || tgtdrive=$default_drive
111         else
112             read -p "Choose hard drive: " tgtdrive
113         fi
114         match="no"
115         for drive in ${drives[@]} ${removable_drives[@]}; do
116           if [[ "$drive" == "$tgtdrive" ]] && match="yes" ; then
117             if confirm_format $tgtdrive ; then
118               format_confirmed="yes"
119               break
120             else
121               tgtdrive="undefined"
122               read -p "You may select another disk. Press Enter to continue." _
123             fi
124           fi
125         done
126         if [[ "$match" == "no" ]]; then
127           tgtdrive="undefined"
128           read -p "Invalid choice. Press Enter to continue." _
129         fi
130     done
131     clear
132     chvt 1
133 else
134     tgtdrive=`echo ${drives} | sed -e "s/^\s*//" -e "s/\s*$//"`
135 fi
136
137 if [ "$format_confirmed" != "yes" ] ; then
138   exec < /dev/tty3 > /dev/tty3 2>&1
139   chvt 3
140   if ! confirm_format $tgtdrive ; then
141       clear
142       echo
143       echo '********************************************************************'
144       echo '*                            E R R O R                             *'
145       echo '*                                                                  *'
146       echo '*           Disk $tgtdrive contains active partition(s).           *'
147       echo '*        Installation cannot continue without confirmation.        *'
148       echo '*                                                                  *'
149       echo '********************************************************************'
150       echo
151       read -p "Press Enter to restart: " _
152       reboot
153   fi
154   chvt 1
155 fi
156
157 # verify tgtdrive is at least 41GB
158 tgtdrivesize=$(( $(cat "/sys/class/block/${tgtdrive}/size") / 2 / 1024 ))
159 if [ $tgtdrivesize -lt 41984 ]; then
160     exec < /dev/tty3 > /dev/tty3 2>&1
161     chvt 3
162     clear
163     echo
164     echo '********************************************************************'
165     echo '*                            E R R O R                             *'
166     echo '*                                                                  *'
167     echo '*  Your disk is under 41GB in size. Installation cannot continue.  *'
168     echo '*             Restart installation with a larger disk.             *'
169     echo '*                                                                  *'
170     echo '********************************************************************'
171     echo
172     read -p "Press Enter to restart: " _
173     reboot
174 fi
175
176 # paths in /dev have "/" instead of "!" for cciss devices
177 tgtdrive=$(echo $tgtdrive | sed -e 's/!/\//')
178
179 # source
180 if test -e /dev/disk/by-label/"OpenStack_Fuel"; then
181     echo "harddrive --partition=LABEL="OpenStack_Fuel" --dir=/" > /tmp/source.ks
182 elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
183     echo "harddrive --partition=UUID=will_be_substituted_with_actual_uuid --dir=/" > /tmp/source.ks
184 else
185     echo "cdrom" > /tmp/source.ks
186 fi
187
188 vgremove -ff os
189 dd if=/dev/zero of=/dev/${tgtdrive} bs=10M count=10
190 sleep 3
191 hdparm -z /dev/${tgtdrive}
192 parted -s /dev/${tgtdrive} mklabel gpt
193 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 0 24
194 parted -s /dev/${tgtdrive} set 1 bios_grub on
195 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary fat16 24 224
196 parted -s /dev/${tgtdrive} set 2 boot on
197 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 224 424
198 sleep 3
199 hdparm -z /dev/${tgtdrive}
200
201 # partition
202
203 # This adds support for the p seperator required for cciss devices
204 if echo ${tgtdrive} | grep -q -e cciss ; then
205     bootdev=${tgtdrive}p
206 else
207     bootdev=${tgtdrive}
208 fi
209 echo > /tmp/partition.ks
210 echo "partition /boot --onpart=/dev/${bootdev}3" >> /tmp/partition.ks
211 echo "partition /boot/efi --onpart=/dev/${bootdev}2" >> /tmp/partition.ks
212 echo "partition pv.001 --ondisk=${tgtdrive} --size=41000 --grow" >> /tmp/partition.ks
213 echo "volgroup os pv.001" >> /tmp/partition.ks
214 echo "logvol swap --vgname=os --recommended --name=swap" >> /tmp/partition.ks
215 echo "logvol / --vgname=os --size=10000 --name=root --fstype=ext4" >> /tmp/partition.ks
216 echo "logvol /var --vgname=os --size=10000 --percent 30 --grow --name=var --fstype=ext4" >> /tmp/partition.ks
217 echo "logvol /var/lib/docker --vgname=os --size=17000  --percent 20 --grow --name=varlibdocker --fstype=ext4" >> /tmp/partition.ks
218 echo "logvol /var/log --vgname=os --size=4096 --percent 50 --grow --name=varlog --fstype=ext4" >> /tmp/partition.ks
219
220
221 # bootloader
222 echo "bootloader --location=partition --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks
223
224 # Anaconda can not install grub 0.97 on disks which are >4T.
225 # The reason is that grub does not support such large geometries
226 # and it simply thinks that the cylinder number has negative value.
227 # Here we just set geometry manually so that grub thinks that disk
228 # size is equal to 1G.
229 # 130 cylinders * (16065 * 512 = 8225280 bytes) = 1G
230 echo "%post --nochroot --log=/mnt/sysimage/root/anaconda-post-partition.log" > /tmp/post_partition.ks
231 echo "echo \"device (hd0) /dev/${tgtdrive}\" >> /tmp/grub.script" >> /tmp/post_partition.ks
232 echo "echo \"geometry (hd0) 130 255 63\" >> /tmp/grub.script" >> /tmp/post_partition.ks
233 echo "echo \"root (hd0,2)\" >> /tmp/grub.script" >> /tmp/post_partition.ks
234 echo "echo \"install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf\" >> /tmp/grub.script" >> /tmp/post_partition.ks
235 echo "echo quit >> /tmp/grub.script" >> /tmp/post_partition.ks
236 echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --no-floppy --batch" >> /tmp/post_partition.ks
237
238 %end
239
240 %packages --nobase --excludedocs
241 @Core
242 fuel
243 fuel-library
244 fuel-dockerctl
245 authconfig
246 bind-utils
247 cronie
248 crontabs
249 curl
250 daemonize
251 dhcp
252 docker-io
253 fuel-bootstrap-image
254 fuel-createmirror
255 fuel-target-centos-images
256 fuel-package-updates
257 fuelmenu
258 fuel-docker-images
259 gdisk
260 lrzip
261 lsof
262 man
263 mlocate
264 nmap-ncat
265 ntp
266 ntpdate
267 openssh-clients
268 policycoreutils
269 python-daemon
270 rsync
271 ruby21-puppet
272 ruby21-rubygem-netaddr
273 ruby21-rubygem-openstack
274 selinux-policy-targeted
275 strace
276 subscription-manager
277 sysstat
278 system-config-firewall-base
279 tcpdump
280 telnet
281 vim-enhanced
282 virt-what
283 wget
284 yum
285 yum-plugin-priorities
286
287 %include /tmp/post_partition.ks
288
289 # POSTINSTALL SECTION
290 # HERE ARE COMMANDS THAT WILL BE LAUNCHED JUST AFTER
291 # INSTALLATION ITSELF COMPLETED
292 %post
293 echo -e "modprobe nf_conntrack_ipv4\nmodprobe nf_conntrack_ipv6\nmodprobe nf_conntrack_tftp\nmodprobe nf_nat_tftp" >> /etc/rc.modules
294 chmod +x /etc/rc.modules
295 echo -e "net.nf_conntrack_max=1048576" >> /etc/sysctl.conf
296 mkdir -p /var/log/coredump
297 echo -e "kernel.core_pattern=/var/log/coredump/core.%e.%p.%h.%t" >> /etc/sysctl.conf
298 chmod 777 /var/log/coredump
299 echo -e "* soft core unlimited\n* hard core unlimited" >> /etc/security/limits.conf
300
301 # Mount installation media in chroot
302 %post --nochroot --log=/mnt/sysimage/root/anaconda-post-before-chroot.log
303 #!/bin/sh
304
305 set -x
306
307 SOURCE="/mnt/sysimage/tmp/source"
308
309 for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
310
311 mkdir -p "${SOURCE}"
312
313 case "${repo}" in
314   nfs:*)
315     nfs_url="${repo#nfs:}"
316     mount -t nfs "${nfs_url}" "${SOURCE}"
317   ;;
318   *)
319     if [ -d "/mnt/source" ]; then
320       mount -o bind "/mnt/source" "${SOURCE}"
321     fi
322   ;;
323 esac
324
325 %post --log=/root/anaconda-post-after-chroot.log
326 #!/bin/bash
327
328 set -x
329
330 function save_cfg {
331     scrFile="/etc/sysconfig/network-scripts/ifcfg-$device"
332     search="domain $domain\nsearch $domain"
333     sed -i -e 's#^\(HOSTNAME=\).*$#\1'"$hostname"'#' /etc/sysconfig/network
334     grep -q "^\s*$ip\s+$hostname" /etc/hosts || echo "$ip $hostname" >> /etc/hosts
335     echo "${search}\nnameserver 127.0.0.1" > /etc/resolv.conf
336     [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/resolv.conf
337     [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/dnsmasq.upstream
338     [ $dns2 ] && echo "nameserver $dns2" >> /etc/resolv.conf
339     [ $dns2 ] && echo "nameserver $dns2" >> /etc/dnsmasq.upstream
340
341     echo DEVICE=$device > $scrFile
342     echo ONBOOT=yes >> $scrFile
343     echo NM_CONTROLLED=no >> $scrFile
344     echo HWADDR=$hwaddr >> $scrFile
345     echo USERCTL=no >> $scrFile
346     echo PEERDNS=no >> $scrFile
347     if [ $ip ]; then
348         echo BOOTPROTO=static >> $scrFile
349         echo IPADDR=$ip >> $scrFile
350         echo NETMASK=$netmask >> $scrFile
351     else
352         echo BOOTPROTO=dhcp >> $scrFile
353     fi
354     scrDHCPFile="/etc/sysconfig/network-scripts/ifcfg-$dhcp_interface"
355     #Ignore gateway and set up DHCP if it is used, otherwise apply it
356     if [ $dhcp_interface ] && [ "$dhcp_interface" != "$device" ]; then
357         echo "DEVICE=$dhcp_interface" > $scrDHCPFile
358         echo "BOOTPROTO=dhcp" >> $scrDHCPFile
359         echo "ONBOOT=yes" >> $scrDHCPFile
360         echo "USERCTL=no" >> $scrDHCPFile
361     else
362         echo GATEWAY=$gw >> /etc/sysconfig/network
363     fi
364     [ -n "$build_images" -a "$build_images" != "0" ] && echo -e "$build_images" > /root/.build_images
365 }
366
367 # Default FQDN
368 hostname="nailgun.mirantis.com"
369
370 for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
371 hostname=$hostname
372 domain=${hostname#*.}
373 ip=$ip
374 netmask=$netmask
375 gw=$gw
376 device="eth0"
377 hwaddr=`ifconfig $device | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
378 dhcp_interface=$dhcp_interface
379 build_images=$build_images
380 save_cfg
381
382 # Mounting installation source
383 SOURCE=/tmp/source
384 FS=/tmp/fs
385
386 echo
387 mkdir -p ${SOURCE}
388 mkdir -p ${FS}
389
390 if test -e /dev/disk/by-label/"OpenStack_Fuel"; then
391     mount /dev/disk/by-label/"OpenStack_Fuel" ${SOURCE}
392 elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
393     mount /dev/disk/by-uuid/will_be_substituted_with_actual_uuid ${FS}
394     mount -o loop ${FS}/nailgun.iso ${SOURCE}
395 fi
396
397 OPENSTACK_VERSION=`cat ${SOURCE}/openstack_version`
398
399 # ----------------------
400 # UNPACKING REPOSITORIES
401 # ----------------------
402
403 wwwdir="/var/www/nailgun"
404 repodir="${wwwdir}/${OPENSTACK_VERSION}"
405
406 # Copying Centos files
407 mkdir -p ${repodir}/centos/x86_64
408 cp -r ${SOURCE}/images ${repodir}/centos/x86_64
409 cp -r ${SOURCE}/isolinux ${repodir}/centos/x86_64
410 cp -r ${SOURCE}/repodata ${repodir}/centos/x86_64
411 cp -r ${SOURCE}/Packages ${repodir}/centos/x86_64
412 cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
413
414 # Copying Ubuntu files
415 mkdir -p ${repodir}/ubuntu/x86_64/images
416 cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
417 cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
418
419 # We do not ship debian-installer kernel and initrd on ISO.
420 # But we still need to be able to create ubuntu cobbler distro
421 # which requires kernel and initrd to be available. So, we
422 # just touch these files to work around cobbler's limitation.
423 touch ${repodir}/ubuntu/x86_64/images/linux
424 touch ${repodir}/ubuntu/x86_64/images/initrd.gz
425
426 # make links for backward compatibility
427 ln -s ${repodir}/centos ${wwwdir}/centos
428 ln -s ${repodir}/ubuntu ${wwwdir}/ubuntu
429
430 # --------------------------
431 # UNPACKING PUPPET MANIFESTS
432 # --------------------------
433
434 # create folders
435 #mkdir -p /etc/puppet/${OPENSTACK_VERSION}/manifests/
436 #mkdir -p /etc/puppet/${OPENSTACK_VERSION}/modules/
437 #rm -rf /etc/puppet/modules/
438
439 # TODO(ikalnitsky): investigate why we need this
440 #cp ${SOURCE}/puppet-slave.tgz ${wwwdir}/
441
442 # place modules and manifests
443 #tar zxf ${SOURCE}/puppet-slave.tgz -C /etc/puppet/${OPENSTACK_VERSION}/modules
444 #cp /etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/examples/site.pp /etc/puppet/${OPENSTACK_VERSION}/manifests/site.pp
445 cp ${SOURCE}/centos-versions.yaml ${SOURCE}/ubuntu-versions.yaml /etc/puppet/${OPENSTACK_VERSION}/manifests/
446
447 # make links for backward compatibility
448 #pushd /etc/puppet
449 #ln -s ${OPENSTACK_VERSION}/manifests/ /etc/puppet/manifests
450 #ln -s ${OPENSTACK_VERSION}/modules/ /etc/puppet/modules
451 #popd
452
453 cp ${SOURCE}/send2syslog.py /bin/send2syslog.py
454 mkdir -p /var/lib/hiera
455 touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
456
457 # Prepare local repository specification
458 rm /etc/yum.repos.d/CentOS*.repo
459 cat > /etc/yum.repos.d/nailgun.repo << EOF
460 [nailgun]
461 name=Nailgun Local Repo
462 baseurl=file:/var/www/nailgun/${OPENSTACK_VERSION}/centos/x86_64
463 gpgcheck=0
464 EOF
465
466 # Disable subscription-manager plugins
467 sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/product-id.conf || :
468 sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/subscription-manager.conf || :
469
470 # Disable GSSAPI in ssh server config
471 sed -i -e "/^\s*GSSAPICleanupCredentials yes/d" -e "/^\s*GSSAPIAuthentication yes/d" /etc/ssh/sshd_config
472
473 # Enable MOTD banner in sshd
474 sed -i -e "s/^\s*PrintMotd no/PrintMotd yes/g" /etc/ssh/sshd_config
475
476 # Add note regarding local repos creation to MOTD
477 cat >> /etc/motd << EOF
478
479 All environments use online repositories by default.
480 Use the following commands to create local repositories
481 on master node and change default repository settings:
482
483 * CentOS: fuel-package-updates (see --help for options)
484 * Ubuntu: fuel-createmirror (see --help for options)
485
486 Please refer to the following guide for more information:
487 https://docs.mirantis.com/openstack/fuel/fuel-6.1/reference-architecture.html#fuel-rep-mirror
488
489 EOF
490
491 # Copying bootstrap_admin_node.sh, chmod it and
492 # adding /etc/init/bootstrap_admin_node.conf
493 cp ${SOURCE}/bootstrap_admin_node.sh /usr/local/sbin/bootstrap_admin_node.sh
494 chmod 0777 /usr/local/sbin/bootstrap_admin_node.sh
495 cp ${SOURCE}/bootstrap_admin_node.conf /etc/init/bootstrap_admin_node.conf
496 echo "ENABLED=1" > /etc/sysconfig/bootstrap_admin_node
497
498 # Copying version.yaml file. It contains COMMIT_SHA of last commit.
499 RELEASE=$(awk '/release/{gsub(/"/, "");print $2}' ${SOURCE}/version.yaml)
500 mkdir -p /etc/nailgun /etc/fuel/${RELEASE} /etc/fuel/release_versions
501 cp ${SOURCE}/version.yaml /etc/nailgun/version.yaml
502 cp ${SOURCE}/version.yaml /etc/fuel/${RELEASE}/version.yaml
503 ln -s /etc/fuel/${RELEASE}/version.yaml /etc/fuel/version.yaml
504 cp ${SOURCE}/version.yaml /etc/fuel/release_versions/`cat  ${SOURCE}/openstack_version`.yaml
505
506 # Generete Fuel UUID
507 uuidgen > /etc/fuel/fuel-uuid
508
509 ###Run fuel menu
510 [ -z "$showmenu" ] && showmenu="no"
511 cat > /root/.showfuelmenu << EOF
512 #Set to yes to run Fuel Setup
513 #Set to no to accept default settings
514 showmenu=$showmenu
515 EOF
516
517 # Prepare custom /etc/issue logon banner and script for changing IP in it
518 cat > /etc/issue << EOF
519 #########################################
520 #       Welcome to the Fuel server      #
521 #########################################
522 Server is running on \m platform
523
524 Fuel UI is available on:
525 http://:8000
526
527 Default administrator login:    root
528 Default administrator password: r00tme
529
530 Default Fuel UI login: admin
531 Default Fuel UI password: admin
532
533 Please change root password on first login.
534
535 EOF
536
537
538 cat >> '/etc/rc.local' << EOF
539 first=yes
540 for ip in \$(ip -o -4 addr | grep "eth." | awk '{print \$4 }' | cut -d/ -f1); do
541 if [ "\$first" = "yes" ]; then
542   ipstr="Fuel UI is available on: http://\$ip:8000"
543   first=no
544 else
545   ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "http://\$ip:8000")
546 fi
547 done
548 tmpissue=\$(mktemp)
549 while read -r line; do
550   if [[ "\$line" =~ "Fuel UI is available on" ]]; then
551     echo -e "\$ipstr" >> \$tmpissue
552   elif [[ "\$line" =~ :8000$ ]]; then
553     :
554   else
555     echo -e "\$line" >> \$tmpissue
556   fi
557 done < /etc/issue
558 mv "\$tmpissue" /etc/issue
559
560 EOF
561
562
563 # Unmounting source
564 umount -f ${SOURCE}
565 rm -rf ${SOURCE}
566
567 umount -f ${FS} || true
568 rm -rf ${FS}
569
570 echo "tos orphan 7" >> /etc/ntp.conf
571
572 # Do not show error message on ntpdate failure. Customers should not be confused
573 # if admin node does not have access to the internet time servers.
574 sed -i /etc/rc.d/init.d/ntpdate -e 's/\([ $RETVAL -eq 0 ] && success || \)failure/\1success/'
575
576 # Disabling splash
577 sed -i --follow-symlinks -e '/^\skernel/ s/rhgb//' /etc/grub.conf
578 sed -i --follow-symlinks -e '/^\skernel/ s/quiet//' /etc/grub.conf
579
580 # Disabling console clearing
581 sed -i 's/getty/getty --noclear/' /etc/init/tty.conf
582
583 # Disabling starting first console from start-ttys service
584 sed -i --follow-symlinks -e 's/ACTIVE_CONSOLES=.*/ACTIVE_CONSOLES=\/dev\/tty\[2-6\]/' /etc/sysconfig/init
585
586 # Copying default bash settings to the root directory
587 cp -f /etc/skel/.bash* /root/
588
589 # Blacklist i2c_piix4 module for VirtualBox so it does not create kernel errors
590 [[ $(virt-what) = "virtualbox" ]] && echo "blacklist i2c_piix4" > /etc/modprobe.d/blacklist-i2c-piix4.conf
591
592 %end