Browse code

Merge "XenServer new install: Keep preseed file in dom0"

Jenkins authored on 2012/04/15 08:00:16
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,470 @@
0
+### Contents of the preconfiguration file (for squeeze)
1
+### Localization
2
+# Preseeding only locale sets language, country and locale.
3
+d-i debian-installer/locale string en_US
4
+
5
+# The values can also be preseeded individually for greater flexibility.
6
+#d-i debian-installer/language string en
7
+#d-i debian-installer/country string NL
8
+#d-i debian-installer/locale string en_GB.UTF-8
9
+# Optionally specify additional locales to be generated.
10
+#d-i localechooser/supported-locales en_US.UTF-8, nl_NL.UTF-8
11
+
12
+# Keyboard selection.
13
+# Disable automatic (interactive) keymap detection.
14
+d-i console-setup/ask_detect boolean false
15
+#d-i keyboard-configuration/modelcode string pc105
16
+d-i keyboard-configuration/layoutcode string us
17
+# To select a variant of the selected layout (if you leave this out, the
18
+# basic form of the layout will be used):
19
+#d-i keyboard-configuration/variantcode string dvorak
20
+
21
+### Network configuration
22
+# Disable network configuration entirely. This is useful for cdrom
23
+# installations on non-networked devices where the network questions,
24
+# warning and long timeouts are a nuisance.
25
+#d-i netcfg/enable boolean false
26
+
27
+# netcfg will choose an interface that has link if possible. This makes it
28
+# skip displaying a list if there is more than one interface.
29
+d-i netcfg/choose_interface select auto
30
+
31
+# To pick a particular interface instead:
32
+#d-i netcfg/choose_interface select eth1
33
+
34
+# If you have a slow dhcp server and the installer times out waiting for
35
+# it, this might be useful.
36
+#d-i netcfg/dhcp_timeout string 60
37
+
38
+# If you prefer to configure the network manually, uncomment this line and
39
+# the static network configuration below.
40
+#d-i netcfg/disable_autoconfig boolean true
41
+
42
+# If you want the preconfiguration file to work on systems both with and
43
+# without a dhcp server, uncomment these lines and the static network
44
+# configuration below.
45
+#d-i netcfg/dhcp_failed note
46
+#d-i netcfg/dhcp_options select Configure network manually
47
+
48
+# Static network configuration.
49
+#d-i netcfg/get_nameservers string 192.168.1.1
50
+#d-i netcfg/get_ipaddress string 192.168.1.42
51
+#d-i netcfg/get_netmask string 255.255.255.0
52
+#d-i netcfg/get_gateway string 192.168.1.1
53
+#d-i netcfg/confirm_static boolean true
54
+
55
+# Any hostname and domain names assigned from dhcp take precedence over
56
+# values set here. However, setting the values still prevents the questions
57
+# from being shown, even if values come from dhcp.
58
+d-i netcfg/get_hostname string stack
59
+d-i netcfg/get_domain string stackpass
60
+
61
+# Disable that annoying WEP key dialog.
62
+d-i netcfg/wireless_wep string
63
+# The wacky dhcp hostname that some ISPs use as a password of sorts.
64
+#d-i netcfg/dhcp_hostname string radish
65
+
66
+# If non-free firmware is needed for the network or other hardware, you can
67
+# configure the installer to always try to load it, without prompting. Or
68
+# change to false to disable asking.
69
+#d-i hw-detect/load_firmware boolean true
70
+
71
+### Network console
72
+# Use the following settings if you wish to make use of the network-console
73
+# component for remote installation over SSH. This only makes sense if you
74
+# intend to perform the remainder of the installation manually.
75
+#d-i anna/choose_modules string network-console
76
+#d-i network-console/password password r00tme
77
+#d-i network-console/password-again password r00tme
78
+
79
+### Mirror settings
80
+# If you select ftp, the mirror/country string does not need to be set.
81
+#d-i mirror/protocol string ftp
82
+d-i mirror/country string manual
83
+d-i mirror/http/hostname string archive.ubuntu.com
84
+d-i mirror/http/directory string /ubuntu
85
+d-i mirror/http/proxy string
86
+
87
+# Alternatively: by default, the installer uses CC.archive.ubuntu.com where
88
+# CC is the ISO-3166-2 code for the selected country. You can preseed this
89
+# so that it does so without asking.
90
+#d-i mirror/http/mirror select CC.archive.ubuntu.com
91
+
92
+# Suite to install.
93
+#d-i mirror/suite string squeeze
94
+# Suite to use for loading installer components (optional).
95
+#d-i mirror/udeb/suite string squeeze
96
+# Components to use for loading installer components (optional).
97
+#d-i mirror/udeb/components multiselect main, restricted
98
+
99
+### Clock and time zone setup
100
+# Controls whether or not the hardware clock is set to UTC.
101
+d-i clock-setup/utc boolean true
102
+
103
+# You may set this to any valid setting for $TZ; see the contents of
104
+# /usr/share/zoneinfo/ for valid values.
105
+d-i time/zone string US/Pacific
106
+
107
+# Controls whether to use NTP to set the clock during the install
108
+d-i clock-setup/ntp boolean true
109
+# NTP server to use. The default is almost always fine here.
110
+d-i clock-setup/ntp-server string 0.us.pool.ntp.org
111
+
112
+### Partitioning
113
+## Partitioning example
114
+# If the system has free space you can choose to only partition that space.
115
+# This is only honoured if partman-auto/method (below) is not set.
116
+# Alternatives: custom, some_device, some_device_crypto, some_device_lvm.
117
+#d-i partman-auto/init_automatically_partition select biggest_free
118
+
119
+# Alternatively, you may specify a disk to partition. If the system has only
120
+# one disk the installer will default to using that, but otherwise the device
121
+# name must be given in traditional, non-devfs format (so e.g. /dev/hda or
122
+# /dev/sda, and not e.g. /dev/discs/disc0/disc).
123
+# For example, to use the first SCSI/SATA hard disk:
124
+#d-i partman-auto/disk string /dev/sda
125
+# In addition, you'll need to specify the method to use.
126
+# The presently available methods are:
127
+# - regular: use the usual partition types for your architecture
128
+# - lvm:     use LVM to partition the disk
129
+# - crypto:  use LVM within an encrypted partition
130
+d-i partman-auto/method string regular
131
+
132
+# If one of the disks that are going to be automatically partitioned
133
+# contains an old LVM configuration, the user will normally receive a
134
+# warning. This can be preseeded away...
135
+d-i partman-lvm/device_remove_lvm boolean true
136
+# The same applies to pre-existing software RAID array:
137
+d-i partman-md/device_remove_md boolean true
138
+# And the same goes for the confirmation to write the lvm partitions.
139
+d-i partman-lvm/confirm boolean true
140
+
141
+# For LVM partitioning, you can select how much of the volume group to use
142
+# for logical volumes.
143
+#d-i partman-auto-lvm/guided_size string max
144
+#d-i partman-auto-lvm/guided_size string 10GB
145
+#d-i partman-auto-lvm/guided_size string 50%
146
+
147
+# You can choose one of the three predefined partitioning recipes:
148
+# - atomic: all files in one partition
149
+# - home:   separate /home partition
150
+# - multi:  separate /home, /usr, /var, and /tmp partitions
151
+d-i partman-auto/choose_recipe select atomic
152
+
153
+# Or provide a recipe of your own...
154
+# If you have a way to get a recipe file into the d-i environment, you can
155
+# just point at it.
156
+#d-i partman-auto/expert_recipe_file string /hd-media/recipe
157
+
158
+# If not, you can put an entire recipe into the preconfiguration file in one
159
+# (logical) line. This example creates a small /boot partition, suitable
160
+# swap, and uses the rest of the space for the root partition:
161
+#d-i partman-auto/expert_recipe string                         \
162
+#      boot-root ::                                            \
163
+#              40 50 100 ext3                                  \
164
+#                      $primary{ } $bootable{ }                \
165
+#                      method{ format } format{ }              \
166
+#                      use_filesystem{ } filesystem{ ext3 }    \
167
+#                      mountpoint{ /boot }                     \
168
+#              .                                               \
169
+#              500 10000 1000000000 ext3                       \
170
+#                      method{ format } format{ }              \
171
+#                      use_filesystem{ } filesystem{ ext3 }    \
172
+#                      mountpoint{ / }                         \
173
+#              .                                               \
174
+#              64 512 300% linux-swap                          \
175
+#                      method{ swap } format{ }                \
176
+#              .
177
+
178
+# If you just want to change the default filesystem from ext3 to something
179
+# else, you can do that without providing a full recipe.
180
+d-i partman/default_filesystem string ext3
181
+
182
+# The full recipe format is documented in the file partman-auto-recipe.txt
183
+# included in the 'debian-installer' package or available from D-I source
184
+# repository. This also documents how to specify settings such as file
185
+# system labels, volume group names and which physical devices to include
186
+# in a volume group.
187
+
188
+# This makes partman automatically partition without confirmation, provided
189
+# that you told it what to do using one of the methods above.
190
+d-i partman-partitioning/confirm_write_new_label boolean true
191
+d-i partman/choose_partition select finish
192
+d-i partman/confirm boolean true
193
+d-i partman/confirm_nooverwrite boolean true
194
+
195
+## Partitioning using RAID
196
+# The method should be set to "raid".
197
+#d-i partman-auto/method string raid
198
+# Specify the disks to be partitioned. They will all get the same layout,
199
+# so this will only work if the disks are the same size.
200
+#d-i partman-auto/disk string /dev/sda /dev/sdb
201
+
202
+# Next you need to specify the physical partitions that will be used. 
203
+#d-i partman-auto/expert_recipe string \
204
+#      multiraid ::                                         \
205
+#              1000 5000 4000 raid                          \
206
+#                      $primary{ } method{ raid }           \
207
+#              .                                            \
208
+#              64 512 300% raid                             \
209
+#                      method{ raid }                       \
210
+#              .                                            \
211
+#              500 10000 1000000000 raid                    \
212
+#                      method{ raid }                       \
213
+#              .
214
+
215
+# Last you need to specify how the previously defined partitions will be
216
+# used in the RAID setup. Remember to use the correct partition numbers
217
+# for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported;
218
+# devices are separated using "#".
219
+# Parameters are:
220
+# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
221
+#          <devices> <sparedevices>
222
+
223
+#d-i partman-auto-raid/recipe string \
224
+#    1 2 0 ext3 /                    \
225
+#          /dev/sda1#/dev/sdb1       \
226
+#    .                               \
227
+#    1 2 0 swap -                    \
228
+#          /dev/sda5#/dev/sdb5       \
229
+#    .                               \
230
+#    0 2 0 ext3 /home                \
231
+#          /dev/sda6#/dev/sdb6       \
232
+#    .
233
+
234
+# For additional information see the file partman-auto-raid-recipe.txt
235
+# included in the 'debian-installer' package or available from D-I source
236
+# repository.
237
+
238
+# This makes partman automatically partition without confirmation.
239
+d-i partman-md/confirm boolean true
240
+d-i partman-partitioning/confirm_write_new_label boolean true
241
+d-i partman/choose_partition select finish
242
+d-i partman/confirm boolean true
243
+d-i partman/confirm_nooverwrite boolean true
244
+
245
+## Controlling how partitions are mounted
246
+# The default is to mount by UUID, but you can also choose "traditional" to
247
+# use traditional device names, or "label" to try filesystem labels before
248
+# falling back to UUIDs.
249
+#d-i partman/mount_style select uuid
250
+
251
+### Base system installation
252
+# Configure APT to not install recommended packages by default. Use of this
253
+# option can result in an incomplete system and should only be used by very
254
+# experienced users.
255
+#d-i base-installer/install-recommends boolean false
256
+
257
+# The kernel image (meta) package to be installed; "none" can be used if no
258
+# kernel is to be installed.
259
+#d-i base-installer/kernel/image string linux-generic
260
+
261
+### Account setup
262
+# Skip creation of a root account (normal user account will be able to
263
+# use sudo). The default is false; preseed this to true if you want to set
264
+# a root password.
265
+d-i passwd/root-login boolean true
266
+# Alternatively, to skip creation of a normal user account.
267
+d-i passwd/make-user boolean false
268
+
269
+# Root password, either in clear text
270
+d-i passwd/root-password password stackpass
271
+d-i passwd/root-password-again password stackpass
272
+# or encrypted using an MD5 hash.
273
+#d-i passwd/root-password-crypted password [MD5 hash]
274
+
275
+# To create a normal user account.
276
+#d-i passwd/user-fullname string Ubuntu User
277
+#d-i passwd/username string ubuntu
278
+# Normal user's password, either in clear text
279
+#d-i passwd/user-password password insecure
280
+#d-i passwd/user-password-again password insecure
281
+# or encrypted using an MD5 hash.
282
+#d-i passwd/user-password-crypted password [MD5 hash]
283
+# Create the first user with the specified UID instead of the default.
284
+#d-i passwd/user-uid string 1010
285
+# The installer will warn about weak passwords. If you are sure you know
286
+# what you're doing and want to override it, uncomment this.
287
+d-i user-setup/allow-password-weak boolean true
288
+
289
+# The user account will be added to some standard initial groups. To
290
+# override that, use this.
291
+#d-i passwd/user-default-groups string audio cdrom video
292
+
293
+# Set to true if you want to encrypt the first user's home directory.
294
+d-i user-setup/encrypt-home boolean false
295
+
296
+### Apt setup
297
+# You can choose to install restricted and universe software, or to install
298
+# software from the backports repository.
299
+#d-i apt-setup/restricted boolean true
300
+#d-i apt-setup/universe boolean true
301
+#d-i apt-setup/backports boolean true
302
+# Uncomment this if you don't want to use a network mirror.
303
+#d-i apt-setup/use_mirror boolean false
304
+# Select which update services to use; define the mirrors to be used.
305
+# Values shown below are the normal defaults.
306
+#d-i apt-setup/services-select multiselect security
307
+#d-i apt-setup/security_host string security.ubuntu.com
308
+#d-i apt-setup/security_path string /ubuntu
309
+
310
+# Additional repositories, local[0-9] available
311
+#d-i apt-setup/local0/repository string \
312
+#       http://local.server/ubuntu squeeze main
313
+#d-i apt-setup/local0/comment string local server
314
+# Enable deb-src lines
315
+#d-i apt-setup/local0/source boolean true
316
+# URL to the public key of the local repository; you must provide a key or
317
+# apt will complain about the unauthenticated repository and so the
318
+# sources.list line will be left commented out
319
+#d-i apt-setup/local0/key string http://local.server/key
320
+
321
+# By default the installer requires that repositories be authenticated
322
+# using a known gpg key. This setting can be used to disable that
323
+# authentication. Warning: Insecure, not recommended.
324
+#d-i debian-installer/allow_unauthenticated boolean true
325
+
326
+### Package selection
327
+#tasksel tasksel/first multiselect ubuntu-desktop
328
+#tasksel tasksel/first multiselect lamp-server, print-server
329
+#tasksel tasksel/first multiselect kubuntu-desktop
330
+tasksel tasksel/first multiselect openssh-server
331
+
332
+# Individual additional packages to install
333
+#d-i pkgsel/include string openssh-server build-essential
334
+# Whether to upgrade packages after debootstrap.
335
+# Allowed values: none, safe-upgrade, full-upgrade
336
+#d-i pkgsel/upgrade select none
337
+
338
+# Language pack selection
339
+#d-i pkgsel/language-packs multiselect de, en, zh
340
+
341
+# Policy for applying updates. May be "none" (no automatic updates),
342
+# "unattended-upgrades" (install security updates automatically), or
343
+# "landscape" (manage system with Landscape).
344
+d-i pkgsel/update-policy select unattended-upgrades
345
+
346
+# Some versions of the installer can report back on what software you have
347
+# installed, and what software you use. The default is not to report back,
348
+# but sending reports helps the project determine what software is most
349
+# popular and include it on CDs.
350
+#popularity-contest popularity-contest/participate boolean false
351
+
352
+# By default, the system's locate database will be updated after the
353
+# installer has finished installing most packages. This may take a while, so
354
+# if you don't want it, you can set this to "false" to turn it off.
355
+d-i pkgsel/updatedb boolean false
356
+
357
+### Boot loader installation
358
+# Grub is the default boot loader (for x86). If you want lilo installed
359
+# instead, uncomment this:
360
+#d-i grub-installer/skip boolean true
361
+# To also skip installing lilo, and install no bootloader, uncomment this
362
+# too:
363
+#d-i lilo-installer/skip boolean true
364
+
365
+# With a few exceptions for unusual partitioning setups, GRUB 2 is now the
366
+# default. If you need GRUB Legacy for some particular reason, then
367
+# uncomment this:
368
+#d-i grub-installer/grub2_instead_of_grub_legacy boolean false
369
+
370
+# This is fairly safe to set, it makes grub install automatically to the MBR
371
+# if no other operating system is detected on the machine.
372
+d-i grub-installer/only_debian boolean true
373
+
374
+# This one makes grub-installer install to the MBR if it also finds some other
375
+# OS, which is less safe as it might not be able to boot that other OS.
376
+d-i grub-installer/with_other_os boolean true
377
+
378
+# Alternatively, if you want to install to a location other than the mbr,
379
+# uncomment and edit these lines:
380
+#d-i grub-installer/only_debian boolean false
381
+#d-i grub-installer/with_other_os boolean false
382
+#d-i grub-installer/bootdev  string (hd0,0)
383
+# To install grub to multiple disks:
384
+#d-i grub-installer/bootdev  string (hd0,0) (hd1,0) (hd2,0)
385
+
386
+# Optional password for grub, either in clear text
387
+#d-i grub-installer/password password r00tme
388
+#d-i grub-installer/password-again password r00tme
389
+# or encrypted using an MD5 hash, see grub-md5-crypt(8).
390
+#d-i grub-installer/password-crypted password [MD5 hash]
391
+
392
+# Use the following option to add additional boot parameters for the
393
+# installed system (if supported by the bootloader installer).
394
+# Note: options passed to the installer will be added automatically.
395
+#d-i debian-installer/add-kernel-opts string nousb
396
+
397
+### Finishing up the installation
398
+# During installations from serial console, the regular virtual consoles
399
+# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next
400
+# line to prevent this.
401
+d-i finish-install/keep-consoles boolean true
402
+
403
+# Avoid that last message about the install being complete.
404
+d-i finish-install/reboot_in_progress note
405
+
406
+# This will prevent the installer from ejecting the CD during the reboot,
407
+# which is useful in some situations.
408
+#d-i cdrom-detect/eject boolean false
409
+
410
+# This is how to make the installer shutdown when finished, but not
411
+# reboot into the installed system.
412
+#d-i debian-installer/exit/halt boolean true
413
+# This will power off the machine instead of just halting it.
414
+#d-i debian-installer/exit/poweroff boolean true
415
+
416
+### X configuration
417
+# X can detect the right driver for some cards, but if you're preseeding,
418
+# you override whatever it chooses. Still, vesa will work most places.
419
+#xserver-xorg xserver-xorg/config/device/driver select vesa
420
+
421
+# A caveat with mouse autodetection is that if it fails, X will retry it
422
+# over and over. So if it's preseeded to be done, there is a possibility of
423
+# an infinite loop if the mouse is not autodetected.
424
+#xserver-xorg xserver-xorg/autodetect_mouse boolean true
425
+
426
+# Monitor autodetection is recommended.
427
+xserver-xorg xserver-xorg/autodetect_monitor boolean true
428
+# Uncomment if you have an LCD display.
429
+#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
430
+# X has three configuration paths for the monitor. Here's how to preseed
431
+# the "medium" path, which is always available. The "simple" path may not
432
+# be available, and the "advanced" path asks too many questions.
433
+xserver-xorg xserver-xorg/config/monitor/selection-method \
434
+       select medium
435
+xserver-xorg xserver-xorg/config/monitor/mode-list \
436
+       select 1024x768 @ 60 Hz
437
+
438
+### Preseeding other packages
439
+# Depending on what software you choose to install, or if things go wrong
440
+# during the installation process, it's possible that other questions may
441
+# be asked. You can preseed those too, of course. To get a list of every
442
+# possible question that could be asked during an install, do an
443
+# installation, and then run these commands:
444
+#   debconf-get-selections --installer > file
445
+#   debconf-get-selections >> file
446
+
447
+
448
+#### Advanced options
449
+### Running custom commands during the installation
450
+# d-i preseeding is inherently not secure. Nothing in the installer checks
451
+# for attempts at buffer overflows or other exploits of the values of a
452
+# preconfiguration file like this one. Only use preconfiguration files from
453
+# trusted locations! To drive that home, and because it's generally useful,
454
+# here's a way to run any shell command you'd like inside the installer,
455
+# automatically.
456
+
457
+# This first command is run as early as possible, just after
458
+# preseeding is read.
459
+#d-i preseed/early_command string anna-install some-udeb
460
+# This command is run immediately before the partitioner starts. It may be
461
+# useful to apply dynamic partitioner preseeding that depends on the state
462
+# of the disks (which may not be visible when preseed/early_command runs).
463
+#d-i partman/early_command \
464
+#       string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
465
+# This command is run just before the install finishes, but when there is
466
+# still a usable /target directory. You can chroot to /target and use it
467
+# directly, or use the apt-install and in-target commands to easily install
468
+# packages and run commands in the target system.
469
+#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
... ...
@@ -179,7 +179,8 @@ else
179 179
     template=$(xe_min template-list name-label="Ubuntu 11.10 (64-bit)")
180 180
     if [ -z "$template" ]
181 181
     then
182
-        $TOP_DIR/scripts/xenoneirictemplate.sh
182
+        cp $TOP_DIR/devstackubuntupreseed.cfg /opt/xensource/www/
183
+        $TOP_DIR/scripts/xenoneirictemplate.sh "${HOST_IP}/devstackubuntupreseed.cfg"
183 184
     fi
184 185
     $TOP_DIR/scripts/install-os-vpx.sh -t "Ubuntu 11.10 (64-bit)" -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -r $OSDOMU_MEM_MB -k "flat_network_bridge=${VM_BR}"
185 186
 
... ...
@@ -15,6 +15,7 @@ fi
15 15
 distro="Ubuntu 11.10"
16 16
 arches=("32-bit" "64-bit")
17 17
 
18
+preseedurl=${1:-"http://images.ansolabs.com/devstackubuntupreseed.cfg"}
18 19
 
19 20
 for arch in ${arches[@]} ; do
20 21
     echo "Attempting $distro ($arch)"
... ...
@@ -25,7 +26,7 @@ for arch in ${arches[@]} ; do
25 25
         NEWUUID=$(xe vm-clone uuid=$LENNY new-name-label="$distro ($arch)")
26 26
         xe template-param-set uuid=$NEWUUID other-config:install-methods=http,ftp \
27 27
          other-config:install-repository=http://archive.ubuntu.net/ubuntu \
28
-         PV-args="-- quiet console=hvc0 partman/default_filesystem=ext3 locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us netcfg/choose_interface=eth3 netcfg/get_hostname=unassigned-hostname netcfg/get_domain=unassigned-domain auto url=http://images.ansolabs.com/devstackubuntupreseed.cfg" \
28
+         PV-args="-- quiet console=hvc0 partman/default_filesystem=ext3 locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us netcfg/choose_interface=eth3 netcfg/get_hostname=os netcfg/get_domain=os auto url=${preseedurl}" \
29 29
          other-config:debian-release=oneiric \
30 30
          other-config:default_template=true
31 31