-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanaconda-ks.cfg
114 lines (89 loc) · 2.91 KB
/
anaconda-ks.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
#version=RHEL7
#Reference for ks.config: http://marclop.svbtle.com/creating-an-automated-centos-7-install-via-kickstart-file
# Text mode or graphical mode?
#graphical
text
# Action
install
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# installation path for network installation
#url --url=http://192.168.0.3:8000/RPM/
#repo --name="EPEL" --baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64/
# System language
lang en_US.UTF-8
# Keyboard layouts
keyboard --vckeymap=in-eng --xlayouts='in (eng)'
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Network information
network --bootproto=dhcp --device=enp0s3 --noipv6 --activate
# Modify the static ip to a relevant value
network --bootproto=static --device=enp0s8 --ip=<static_ip> --netmask=255.255.255.0 --noipv6 --activate
# Specify a hostname
network --hostname=<hostname>
# Root password
rootpw --iscrypted $6$8qxjjbNHuAXaJ2/K$kWQ9QEQAmv/FEKmpv7q4RtVsEuOBccfLQjcdZjwk2DM3HOuXIEXrC2E0nNs9SurFC28gMT4hnH.XgHk/pH3ch0
# System timezone
timezone Asia/Kolkata --isUtc
# Partition clearing information
clearpart --linux --drives=sda
zerombr
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
autopart --type=lvm
# Reboot after installation?
shutdown
##############################################################################
#
# packages part of the KickStart configuration file
#
##############################################################################
%packages
@core
kexec-tools
make
%end
##############################################################################
#
# post installation part of the KickStart configuration file
#
##############################################################################
%post
#
# This section describes all the post-Anaconda steps to fine-tune the installation
#
# This line allows printing to console, which otherwise is invisible.
exec < /dev/console > /dev/console
# Install rpm repo epel-release
/usr/bin/yum -y install epel-release
# Install net-tools for ifconfig command
echo "Installing net-tools for ifconfig command."
/usr/bin/yum -y install net-tools
# Install other dependencies
echo "Installing other dependencies."
/usr/bin/yum -y install wget
#/usr/bin/rpm -i https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
/usr/bin/yum -y epel-release
# Update the RPMs
echo "Updating the RPMs.."
/usr/bin/yum -y --skip-broken --obsolete update
# Housekeeping
echo "Housekeeping.."
/usr/bin/yum autoremove
/usr/bin/yum clean all
# Guest Additions
echo "Installing other dependencies for Guest Additions."
/usr/bin/yum -y install bzip2
/usr/bin/yum -y install gcc
/usr/bin/yum -y install dkms
/usr/bin/yum -y install kernel-devel
#mkdir -p /mnt/cdrom
#mount -o ro -t iso9660 /dev/sr1 /mnt/cdrom
#/usr/bin/yum -y --skip-broken update
#echo 'yes'|/mnt/cdrom/VBoxLinuxAdditions.run
#umount /dev/sr1
%end