-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathks.cfg
117 lines (106 loc) · 2.49 KB
/
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
115
116
117
#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T
#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone Asia/Tokyo
#Root password
rootpw --iscrypted $1$KyxNFyek$P4F8QexivzqoX7iwTxwBT0
#Initial user
user user --fullname "User Name" --iscrypted --password $1$u/ghYI94$kcQEiU6IbD6E5YdgYC5wY.
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use CDROM installation media
cdrom
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part swap --size 256
part / --fstype ext4 --size 1 --grow
#System authorization infomation
auth --useshadow --enablemd5
#Firewall configuration
#firewall --disabled
firewall --enabled --ssh
#Do not configure the X Window System
skipx
#Package install information
%packages
vim
openssh-server
curl
net-tools # this includes commands like ifconfig and netstat
wget
man
make
%pre
# Reading and setting variables of the installation parameters
# TTY switch
exec < /dev/tty6 > /dev/tty6
# Switch to TTY6
chvt 6
# Clear the console
clear
# Set Keyboard #
loadkeys us
# Requesting hostname #
echo "Please enter Hostname ! "
read hostn
hostname $hostn
echo -e "NETWORKING=yes\nHOSTNAME=$hostn" > /etc/sysconfig/network
# Display the summary #
echo " "
echo " "
echo "-------------------------------------------------"
echo " Installation Summary"
echo "-------------------------------------------------"
echo " "
echo " "
echo "-------------------------------------------------"
echo " Hostname = $hostn"
echo " User name = User Name"
echo " Login = user"
echo " Password = pass"
echo " Login Root = root"
echo " Root Password = pass"
echo " Distribution = Ubuntu 18.04 LTS"
echo "-------------------------------------------------"
echo " "
echo " "
echo "-------------------------------------------------"
echo " Installation will destroy"
echo " all the contents on the disk !"
echo " "
echo " To cancel the installation,"
echo " reboot the machine within 15 seconds!"
echo "--------------------------------------------------"
echo " "
echo " "
sleep 15
# Switch back to TTY1 console
chvt 1
%end
# %post --nochroot
# UNCOMMENT HERE IF YOU NEED TO USE IT
# %end
%post
# add username to sudoer list
echo "user ALL=(ALL) ALL" >> /etc/sudoers
# TODO: Install all the software here
apt update
%end
## END ##