-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.cfg
157 lines (143 loc) · 4.9 KB
/
template.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Works with Ubuntu 18.04 (bionic)
# Works with Ubuntu 18.10 (cosmic)
# Works with Ubuntu 19.04 (disco)
# https://help.ubuntu.com/lts/installation-guide/amd64/apbs04.html
# LOCALIZATION
d-i debian-installer/locale string en_US.UTF-8
d-i keyboard-configuration/xkb-keymap select us
d-i console-setup/ask_detect boolean false
# NETWORK
d-i hw-detect/load_firmware boolean true
d-i netcfg/choose_interface select auto
d-i netcfg/use_vlan boolean false
d-i netcfg/link_wait_timeout boolean false
d-i netcfg/use_autoconfig boolean true
d-i netcfg/hostname string ${HOSTNAME}
d-i netcfg/get_hostname string ${HOSTNAME}
# MIRROR
d-i mirror/country select US
<% if(typeof(URL_PROXY)==='string' && URL_PROXY.length) { %>
d-i mirror/http/proxy string ${URL_PROXY}
<% } %>
# USER ACCOUNTS
d-i passwd/root-login boolean true
d-i passwd/root-password-crypted password ${CRYPT_PASSWD_ROOT}
d-i passwd/user-fullname string ${FULLNAME}
d-i passwd/username string ${USERNAME}
d-i user-setup/encrypt-home boolean false
d-i passwd/user-password-crypted password ${CRYPT_PASSWD_USER}
d-i user-setup/allow-password-weak boolean true
d-i passwd/user-default-groups string root adm sudo staff \
dialout cdrom plugdev lpadmin sambashare wireshark vboxusers
# CLOCK / TIMEZONE
d-i clock-setup/utc boolean true
d-i time/zone string ${TIMEZONE}
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ${SERVER_NTP}
# PARTITIONING
d-i partman-auto/init_automatically_partition select some_device_crypto
d-i partman-auto/method string crypto
d-i partman-crypto/passphrase string ${ENCRYPTION_PASSPHRASE}
d-i partman-crypto/passphrase-again string ${ENCRYPTION_PASSPHRASE}
d-i partman-crypto/weak_passphrase boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
## https://salsa.debian.org/installer-team/partman-auto/blob/master/recipes-amd64-efi/
d-i partman-auto/choose_recipe select crypted-root-home
d-i partman-auto/expert_recipe string \
crypted-root-home :: \
135 135 269 free \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } \
format{ } \
. \
269 537 537 ext4 \
$defaultignore{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
label{ boot } \
mountpoint{ /boot } \
. \
10738 16107 21475 $default_filesystem \
$lvmok{ } \
method{ format } \
format{ } \
use_filesystem{ } \
$default_filesystem{ } \
label{ linux } \
mountpoint{ / } \
. \
537 1074 2148 linux-swap \
$lvmok{ } \
$reusemethod{ } \
method{ swap } \
format{ } \
label{ swap } \
. \
21475 107375 -1 $default_filesystem \
$lvmok{ } \
method{ format } \
format{ } \
use_filesystem{ } \
$default_filesystem{ } \
label{ home } \
mountpoint{ /home } \
.
d-i partman/default_filesystem string ext4
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
# BASE SYSTEM
d-i base-installer/kernel/image string linux-generic
# APT SETUP
d-i apt-setup/universe boolean true
d-i apt-setup/restricted boolean true
d-i apt-setup/non-free boolean true
d-i apt-setup/backports boolean true
d-i apt-setup/services-select multiselect security
# PACKAGE SELECTION
tasksel tasksel/first multiselect ${TASK_SELECTION}
d-i pkgsel/install-language-support boolean false
d-i apt-setup/extras boolean false
d-i pkgsel/include string \
${PACKAGE_DESKTOP_ENV} light-themes plymouth-themes build-essential \
intel-microcode byobu vim vlc gawk tree curl git hexedit tldr sl deborphan \
${PACKAGES_ADDITIONAL}
d-i pkgsel/upgrade select full-upgrade
d-i pkgsel/update-policy select unattended-upgrades
d-i pkgsel/updatedb boolean false
popularity-contest popularity-contest/participate boolean false
wireshark-common wireshark-common/install-setuid boolean true
# BOOTLOADER
d-i grub-installer/with_other_os boolean true
d-i grub-installer/force-efi-extra-removable boolean false
# POST INSTALL SCRIPT
d-i preseed/late_command string \
<% _.forEach(RESOURCES, function(resource) { %>
wget -N -T 3 -t 3 -qP /target/home/${USERNAME} ${URL_RESOURCES}/${resource} ; \
<% }); %>
<%
_.forEach(SCRIPTS, function(script) {
if(typeof(script) === 'object') { // script is an array with arguments
scriptArr = script
script = scriptArr[0]
args = scriptArr.slice(1).join(" ")
} else { // script is a string filename
args = ""
}
%>
wget -N -T 3 -t 3 -qO /target/root/${script} ${URL_SCRIPTS}/${script} ; \
chroot /target bash /root/${script} ${args} >> /target/root/${script}.log 2>&1; \
<% }); %>
rm /target/etc/apt/apt.conf;
# FINISHING UP
d-i cdrom-detect/eject boolean true
# skip final reboot message:
# d-i finish-install/reboot_in_progress note