summaryrefslogtreecommitdiff
path: root/it/appendix/example-preseed-etch.xml
blob: 79d3e143f94c76548503c9c6941e2e25e096ec31 (plain)
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!-- retain these comments for translator revision tracking -->
<!-- original version: 30373 untranslated -->

<informalexample condition="etch"><screen>
#### Startup.

# To use a preseed file, you'll first need to boot the installer,
# and tell it what preseed file to use. This is done by passing the
# kernel a boot parameter, either manually at boot or by editing the
# syslinux.cfg (or similar) file and adding the parameter to the end
# of the append line(s) for the kernel.
#
# If you're netbooting, use this:
#   preseed/url=http://host/path/to/preseed
# If you're remastering a CD, you could use this:
#   preseed/file=/cdrom/preseed
# If you're installing from USB media, use this, and put the preseed file
# in the toplevel directory of the USB stick.
#   preseed/file=/hd-media/preseed
#
# If you feel comfortable modifying the installer's initrd image,
# you can also place a preseed file in the root directory of the initrd's
# filesystem, named "preseed.cfg" -- the installer will always use this
# file if it is present. Otherwise, be sure to copy this file to the location
# you specify.
#
# To make sure the installer gets the right preseed file, you can specify
# a checksum for the file. Currently this needs to be a md5sum, and if
# specified it must match the file or the installer will refuse to use the
# file.
#   preseed/url/checksum=5da499872becccfeda2c4872f9171c3d
#   preseed/file/checksum=5da499872becccfeda2c4872f9171c3d
#
# Some parts of the installation process cannot be automated using
# some forms of preseeding, because the questions are asked before
# the preseed file is loaded. For example, if the preseed file is
# downloaded over the network, the network setup must be done first.
# One reason to use initrd preseeding is that it allows preseeding
# of even these early steps of the installation process.
#
# If a preseed file cannot be used to preseed some steps, the install can
# still be fully automated, since you can pass preseed values to the kernel
# on the command line. Just pass path/to/var=value for any of the preseed
# variables listed below.
#
# While you're at it, you may want to throw a debconf/priority=critical in
# there, to avoid most questions even if the preseeding below misses some.
# And you might set the timeout to 1 in syslinux.cfg to avoid needing to hit
# enter to boot the installer.
#
# Note that the 2.4 kernel accepts a maximum of 8 command line options and
# 8 environment options (including any options added by default for the
# installer). If these numbers are exceeded, 2.4 kernels will drop any
# excess options and 2.6 kernels will panic. With kernel 2.6.9 or newer,
# you can use 32 command line options and 32 environment options.
#
# Some of the default options, like 'vga=normal' may be safely removed
# for most installations, which may allow you to add more options for
# preseeding.

# To select your language and country, use this setting, but remember
# that this will only work for initrd based preseeding, for other forms of
# preseeding you must convert it into a kernel parameter,
# such as debian-installer/locale=en_US
d-i debian-installer/locale string en_US

# To select your keyboard, use this setting. Again it will need to be
# passed as a kernel parameter for most preseed setups.
d-i console-keymaps-at/keymap select us

#### Network configuration.

# Of course, this won't work if you're loading your preseed file from the
# network! But it's great if you're booting from CD or USB stick. You can
# also pass network config parameters in on the kernel params if you are
# loading preseed files from the network.

# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select auto

# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
#d-i netcfg/dhcp_timeout string 60

# If you prefer to configure the network manually, here's how:
#d-i netcfg/disable_dhcp boolean true
#d-i netcfg/get_nameservers string 192.168.1.1
#d-i netcfg/get_ipaddress string 192.168.1.42
#d-i netcfg/get_netmask string 255.255.255.0
#d-i netcfg/get_gateway string 192.168.1.1
#d-i netcfg/confirm_static boolean true

# Note that any hostname and domain names assigned from dhcp take
# precedence over values set here. However, setting the values still
# prevents the questions from being shown even if values come from dhcp.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain

# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
# The wacky dhcp hostname that some ISPs use as a password of sorts.
#d-i netcfg/dhcp_hostname string radish

#### Mirror settings.

d-i mirror/country string enter information manually
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string

# What suite of Debian to install.
#d-i mirror/suite string testing
# What suite of Debian to use for loading installer components.
# (Defaults to same as mirror/suite.)
#d-i mirror/udeb/suite string testing

#### Partitioning.

# If the system has free space you can choose to only partition that space.
#d-i partman-auto/init_automatically_partition \
#      select Use the largest continuous free space

# Alternatively, you can specify a disk to partition. The device name can
# be given in either devfs or traditional non-devfs format.
# For example, to use the first disk devfs knows of:
d-i partman-auto/disk string /dev/discs/disc0/disc

# You can choose from any of the predefined partitioning recipes:
d-i partman-auto/choose_recipe \
       select All files in one partition (recommended for new users)
#d-i partman-auto/choose_recipe select Desktop machine
#d-i partman-auto/choose_recipe select Multi-user workstation

# Or provide a recipe of your own...
# The recipe format is documented in the file devel/partman-auto-recipe.txt.
# If you have a way to get a recipe file into the d-i environment, you can
# just point at it.
#d-i partman-auto/expert_recipe_file string /hd-media/recipe

# If not, you can put an entire recipe the preseed file in one (logical)
# line. This example creates a small /boot partition, suitable swap, and
# uses the rest of the space for the root partition:
#d-i partman-auto/expert_recipe string                         \
#      boot-root ::                                            \
#              40 50 100 ext3                                  \
#                      $primary{ } $bootable{ }                \
#                      method{ format } format{ }              \
#                      use_filesystem{ } filesystem{ ext3 }    \
#                      mountpoint{ /boot }                     \
#              .                                               \
#              500 10000 1000000000 ext3                       \
#                      method{ format } format{ }              \
#                      use_filesystem{ } filesystem{ ext3 }    \
#                      mountpoint{ / }                         \
#              .                                               \
#              64 512 300% linux-swap                          \
#                      method{ swap } format{ }                \
#              .

# This makes partman automatically partition without confirmation.
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition \
       select Finish partitioning and write changes to disk
d-i partman/confirm boolean true

#### Boot loader installation.

# Grub is the default boot loader (for x86). If you want lilo installed
# instead, uncomment this:
#d-i grub-installer/skip boolean true

# 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

# This one makes grub-installer install to the MBR if if finds some other OS
# too, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true

# Alternatively, if you want to install to a location other than the mbr,
# uncomment and edit these lines:
#d-i grub-installer/bootdev  string (hd0,0)
#d-i grub-installer/only_debian boolean false
#d-i grub-installer/with_other_os boolean false

#### Finishing up the first stage install.

# Avoid that last message about the install being complete.
d-i prebaseconfig/reboot_in_progress note

# This will prevent the installer from ejecting the CD during the reboot,
# which is useful in some situations.
#d-i cdrom-detect/eject boolean false

#### Shell commands.

# d-i preseeding is inherently not secure. Nothing in the installer checks
# for attempts at buffer overflows or other exploits of the values of a
# preseed file like this one. Only use preseed files from trusted
# locations! To drive that home, and because it's generally useful, here's
# a way to run any shell command you'd like inside the installer,
# automatically.

# This first command is run as early as possible, just after
# preseeding is read.
#d-i preseed/early_command string anna-install some-udeb

# This command is run just before the install finishes, but when there is
# still a usable /target directory.
#d-i preseed/late_command string echo foo > /target/etc/bar

# This command is run just as base-config is starting up.
#base-config base-config/early_command string echo hi mom

# This command is run after base-config is done, just before the login:
# prompt. This is a good way to install a set of packages you want, or to
# tweak the configuration of the system.
#base-config base-config/late_command \
#      string apt-get install zsh; chsh -s /bin/zsh

###### Preseeding the 2nd stage of the installation.

#### Preseeding base-config.

# Avoid the introductory message.
base-config base-config/intro note

# Avoid the final message.
base-config base-config/login note

# If you installed a display manager, but don't want to start it immediately
# after base-config finishes.
#base-config base-config/start-display-manager boolean false

# Some versions of the installer can report back on what you've installed.
# 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

#### Clock and time zone setup.

# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true

# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for options.
d-i time/zone string US/Eastern

#### Account setup.

# To preseed the root password, you have to put it in the clear in this
# file. That is not a very good idea, use caution!
#passwd passwd/root-password password r00tme
#passwd passwd/root-password-again password r00tme

# If you want to skip creation of a normal user account.
#passwd passwd/make-user boolean false

# Alternatively, you can preseed the user's name and login.
#passwd passwd/user-fullname string Debian User
#passwd passwd/username string debian
# And their password, but use caution!
#passwd passwd/user-password password insecure
#passwd passwd/user-password-again password insecure

#### Apt setup.

# This question controls what source the second stage installation uses
# for packages. Choices are cdrom, http, ftp, filesystem, edit sources list
# by hand
base-config apt-setup/uri_type select http

# If you choose ftp or http, you'll be asked for a country and a mirror.
base-config apt-setup/country select enter information manually
base-config apt-setup/hostname string http.us.debian.org
base-config apt-setup/directory string /debian
# Stop after choosing one mirror.
base-config apt-setup/another boolean false

# You can choose to install non-free and contrib software.
#base-config apt-setup/non-free boolean true
#base-config apt-setup/contrib boolean true

# Do enable security updates.
base-config apt-setup/security-updates boolean true

#### Package selection.

# You can choose to install any combination of tasks that are available.
# Available tasks as of this writing include: Desktop environment,
# Web server, Print server, DNS server, File server, Mail server,
# SQL database, Laptop, Standard system, manual package selection. The
# last of those will run aptitude. You can also choose to install no
# tasks, and force the installation of a set of packages in some other
# way. We recommend always including the Standard system task.
tasksel tasksel/first multiselect Desktop environment, Standard system
#tasksel tasksel/first multiselect Web server, Standard system

#### Mailer configuration.

# During a normal install, exim asks only a few questions. Here's how to
# avoid even those. More complicated preseeding is possible.
exim4-config exim4/dc_eximconfig_configtype \
       select no configuration at this time
exim4-config exim4/no_config boolean true
exim4-config exim4/no_config boolean true

# It's a good idea to set this to whatever user account you choose to
# create. Leaving the value blank results in postmaster mail going to
# /var/mail/mail.
exim4-config exim4/dc_postmaster string

#### X Configuration.

# Preseeding Debian's X config is possible, but you probably need to know
# some details about the video hardware of the machine, since Debian's X
# configurator does not do fully automatic configuration of everything.

# X can detect the right driver for some cards, but if you're preseeding,
# you override whatever it chooses. Still, vesa will work most places.
#xserver-xfree86 xserver-xfree86/config/device/driver select vesa

# A caveat with mouse autodetection is that if it fails, X will retry it
# over and over. So if it's preseeded to be done, there is a possibility of
# an infinite loop if the mouse is not autodetected.
#xserver-xfree86 xserver-xfree86/autodetect_mouse boolean true

# Monitor autodetection is recommended.
xserver-xfree86 xserver-xfree86/autodetect_monitor boolean true
# Uncomment if you have an LCD display.
#xserver-xfree86 xserver-xfree86/config/monitor/lcd boolean true
# X has three configuration paths for the monitor. Here's how to preseed
# the "medium" path, which is always available. The "simple" path may not
# be available, and the "advanced" path asks too many questions.
xserver-xfree86 xserver-xfree86/config/monitor/selection-method \
       select medium
xserver-xfree86 xserver-xfree86/config/monitor/mode-list \
       select 1024x768 @ 60 Hz

#### Everything else.

# Depending on what software you choose to install, or if things go wrong
# during the installation process, it's possible that other questions may
# be asked. You can preseed those too, of course. To get a list of every
# possible question that could be asked during an install, do an
# installation, and then run these commands:
#   debconf-get-selections --installer > file
#   debconf-get-selections >> file

# If you like, you can include other preseed files into this one.
# Any settings in those files will override pre-existing settings from this
# file. More that one file can be listed, separated by spaces; all will be
# loaded. The included files can have preseed/include directives of their
# own as well. Note that if the filenames are relative, they are taken from
# the same directory as the preseed file that includes them.
#d-i preseed/include string x.cfg

# The installer can optionally verify checksums of preseed files before
# using them. Currently only md5sums are supported, list the md5sums
# in the same order as the list of files to include.
#d-i preseed/include/checksum string 5da499872becccfeda2c4872f9171c3d

# More flexibly, this runs a shell command and if it outputs the names of
# preseed files, includes those files. 
#d-i preseed/include_command \
#      string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi

# To check the format of your preseed file before performing an install,
# you can use debconf-set-selections:
#   debconf-set-selections -c preseed.cfg
</screen></informalexample>