-
Notifications
You must be signed in to change notification settings - Fork 7
/
ubuntu-server-14.04-unattended-cobbler.seed
268 lines (225 loc) · 8.19 KB
/
ubuntu-server-14.04-unattended-cobbler.seed
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
#
# Ubuntu Server 14.04 Preseed
#
# Usage:
#
# This Ubuntu Preseed file is meant to be used with Cobbler. It has been
# tested only on Cobbler 2.4.1. It is a completely unattended install.
#
# References:
#
# https://help.ubuntu.com/14.04/installation-guide/example-preseed.txt
# http://www.claudiokuenzler.com/blog/513/debian-ubuntu-preseed-create-two-volume-groups-same-disk
#############
#
# Kernel Options
#
#############
# Use the following option to add additional boot parameters for the
# installed system (if supported by the bootloader installer).
# Note: options passed to the installer will be added automatically.
d-i debian-installer/add-kernel-opts string $kernel_options_post
#############
#
# Networking
#
#############
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string $hostname
#############
#
# Pre Install
#
#############
# Command Line 1: This is necessary otherwise you will be prompted to umount /dev/sda. See Ubuntu bug #1347726.
d-i preseed/early_command string \
umount /media || true
#############
#
# Net Image
#
#############
# Required at least for 12.10+
d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs
#############
#
# Localization
#
#############
d-i debian-installer/locale string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/language string en
#############
#
# Keyboard
#
#############
# Disable automatic (interactive) keymap detection.
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/variantcode string
d-i keyboard-configuration/layoutcode string us
#############
#
# Mirror
#
#############
d-i mirror/country string manual
d-i mirror/http/proxy string
d-i mirror/http/hostname string $http_server
d-i mirror/http/directory string $install_source_directory
#############
#
# Clock and Time Zone
#
#############
# Controls whether to use NTP to set the clock during the install
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.ubuntu.com
# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string UTC
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true
#############
#
# Partitioning
#
#############
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away...
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto/method string lvm
d-i partman-auto/disk string /dev/sda
# For LVM partitioning, you can select how much of the volume group to use
# for logical volumes.
d-i partman-auto-lvm/guided_size string max
#
# The custom partitioning below will create the following
# partitions, LVM Volume Group, and LVM Logical Volumes.
#
# root@ubuntu:~# parted /dev/sda print
# Model: VMware, VMware Virtual S (scsi)
# Disk /dev/sda: 21.5GB
# Sector size (logical/physical): 512B/512B
# Partition Table: msdos
#
# Number Start End Size Type File system Flags
# 1 1049kB 512MB 511MB primary ext2 boot
# 2 512MB 21.5GB 21.0GB primary lvm
#
# root@ubuntu:~# vgs
# VG #PV #LV #SN Attr VSize VFree
# lxc 1 2 0 wz--n- 19.52g 0
#
# root@ubuntu:~# lvs
# LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
# root00 lxc -wi-ao--- 18.57g
# swap00 lxc -wi-ao--- 976.00m
#
d-i partman-auto/choose_recipe select custompartitioning
d-i partman-auto/expert_recipe string \
custompartitioning :: \
512 1 512 ext2 \
$primary{ } \
$bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext2 } \
label{ boot } \
mountpoint{ /boot } \
. \
1024 1 100% ext4 \
$primary{ } \
method{ lvm } \
device{ /dev/sda2 } \
vg_name{ lxc } \
. \
1024 1 1024 linux-swap \
$lvmok{ } in_vg{ lxc } \
lv_name{ swap00 } \
method{ swap } format{ } \
. \
5120 1 1000000000 ext4 \
$lvmok{ } in_vg{ lxc } \
lv_name{ root00 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ root } \
mountpoint{ / } \
. \
# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
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
#############
#
# Packages
#
#############
# Package selection
tasksel tasksel/first multiselect openssh-server
# Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select none
# Policy for applying updates. May be "none" (no automatic updates),
# "unattended-upgrades" (install security updates automatically), or
# "landscape" (manage system with Landscape).
d-i pkgsel/update-policy select none
# Some versions of the installer can report back on what software you have
# installed, and what software you use. The default is not to report back,
# but sending reports helps the project determine what software is most
# popular and include it on CDs.
popularity-contest popularity-contest/participate boolean false
#############
#
# Users and Password
#
#############
# Skip creation of a root account (normal user account will be able to
# use sudo). The default is false; preseed this to true if you want to set
# a root password.
d-i passwd/root-login boolean true
# Alternatively, to skip creation of a normal user account.
d-i passwd/make-user boolean false
# The installer will warn about weak passwords. If you are sure you know
# what you're doing and want to override it, uncomment this.
d-i user-setup/allow-password-weak boolean true
# Root password, either in clear text
d-i passwd/root-password password cobbler
d-i passwd/root-password-again password cobbler
#############
#
# Bootloader
#
#############
# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true
#############
#
# Post Install
#
#############
# Command Line 1: Allow root to SSH.
# Command Line 2: Cobbler overwrites sources.list with its own repos. Put the default Ubuntu sources.list back.
# Command Line 3: Cobbler API call to turn off netboot.
d-i preseed/late_command string \
sed -i '/PermitRootLogin / s/ .*/ yes/' /target/etc/ssh/sshd_config; \
wget http://$http_server/trusty-sources.list -O /target/etc/apt/sources.list; \
wget http://$http_server/cblr/svc/op/nopxe/system/$system_name -O /dev/null
#############
#
# Finish
#
#############
# Reboot after the install is finished.
finish-install finish-install/reboot_in_progress note